From 1207c2ce6face0d9f00666196b85739e7783f8d8 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 7 Apr 2020 12:33:14 +0200 Subject: implemented CShinyTexts --- src/core/config.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/config.h b/src/core/config.h index d813a1f2..2422ab13 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -73,6 +73,7 @@ enum Config { NUMCORONAS = 56, NUMPOINTLIGHTS = 32, NUM3DMARKERS = 32, + NUMSHINYTEXTS = 32, NUMMONEYMESSAGES = 16, NUMPICKUPMESSAGES = 16, NUMBULLETTRACES = 16, -- cgit v1.2.3 From 51512db0063385bfb823edee150e3cc59eae7b1b Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 7 Apr 2020 16:48:49 +0200 Subject: implemented CRubbish --- src/core/config.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/config.h b/src/core/config.h index 2422ab13..1dc6abe9 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -73,6 +73,7 @@ enum Config { NUMCORONAS = 56, NUMPOINTLIGHTS = 32, NUM3DMARKERS = 32, + NUMBRIGHTLIGHTS = 32, NUMSHINYTEXTS = 32, NUMMONEYMESSAGES = 16, NUMPICKUPMESSAGES = 16, -- cgit v1.2.3 From daaf443cfaa0532aad8a0ede0cad826c66650593 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 7 Apr 2020 22:26:01 +0200 Subject: finished CMotionBlurStreaks, CSpecialFX --- src/core/config.h | 1 + src/core/main.cpp | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 19 deletions(-) (limited to 'src/core') diff --git a/src/core/config.h b/src/core/config.h index 1dc6abe9..dfc454a8 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -78,6 +78,7 @@ enum Config { NUMMONEYMESSAGES = 16, NUMPICKUPMESSAGES = 16, NUMBULLETTRACES = 16, + NUMMBLURSTREAKS = 4, NUMONSCREENTIMERENTRIES = 1, NUMRADARBLIPS = 32, diff --git a/src/core/main.cpp b/src/core/main.cpp index 674527f5..fb5beee0 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -162,17 +162,17 @@ Idle(void *arg) } else { CPointLights::InitPerFrame(); #ifdef TIMEBARS - tbStartTimer(0, "CGame::Process"); + tbStartTimer(0, "CGame::Process"); #endif CGame::Process(); #ifdef TIMEBARS tbEndTimer("CGame::Process"); - tbStartTimer(0, "DMAudio.Service"); + tbStartTimer(0, "DMAudio.Service"); #endif DMAudio.Service(); #ifdef TIMEBARS - tbEndTimer("DMAudio.Service"); + tbEndTimer("DMAudio.Service"); #endif } @@ -181,18 +181,18 @@ Idle(void *arg) #else CPointLights::InitPerFrame(); #ifdef TIMEBARS - tbStartTimer(0, "CGame::Process"); + tbStartTimer(0, "CGame::Process"); #endif CGame::Process(); #ifdef TIMEBARS tbEndTimer("CGame::Process"); - tbStartTimer(0, "DMAudio.Service"); + tbStartTimer(0, "DMAudio.Service"); #endif DMAudio.Service(); #ifdef TIMEBARS - tbEndTimer("DMAudio.Service"); + tbEndTimer("DMAudio.Service"); #endif #endif @@ -222,16 +222,16 @@ Idle(void *arg) } #endif #ifdef TIMEBARS - tbStartTimer(0, "CnstrRenderList"); + tbStartTimer(0, "CnstrRenderList"); #endif CRenderer::ConstructRenderList(); #ifdef TIMEBARS tbEndTimer("CnstrRenderList"); - tbStartTimer(0, "PreRender"); + tbStartTimer(0, "PreRender"); #endif CRenderer::PreRender(); #ifdef TIMEBARS - tbEndTimer("PreRender"); + tbEndTimer("PreRender"); #endif if(CWeather::LightningFlash && !CCullZones::CamNoRain()){ @@ -251,17 +251,17 @@ Idle(void *arg) RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart()); #ifdef TIMEBARS - tbStartTimer(0, "RenderScene"); + tbStartTimer(0, "RenderScene"); #endif RenderScene(); #ifdef TIMEBARS - tbEndTimer("RenderScene"); + tbEndTimer("RenderScene"); #endif RenderDebugShit(); RenderEffects(); -#ifdef TIMEBARS - tbStartTimer(0, "RenderMotionBlur"); +#ifdef TIMEBARS + tbStartTimer(0, "RenderMotionBlur"); #endif if((TheCamera.m_BlurType == MBLUR_NONE || TheCamera.m_BlurType == MBLUR_NORMAL) && TheCamera.m_ScreenReductionPercentage > 0.0f) @@ -269,11 +269,11 @@ Idle(void *arg) TheCamera.RenderMotionBlur(); #ifdef TIMEBARS tbEndTimer("RenderMotionBlur"); - tbStartTimer(0, "Render2dStuff"); + tbStartTimer(0, "Render2dStuff"); #endif Render2dStuff(); #ifdef TIMEBARS - tbEndTimer("Render2dStuff"); + tbEndTimer("Render2dStuff"); #endif }else{ float viewWindow = DEFAULT_VIEWWINDOW; @@ -293,21 +293,21 @@ Idle(void *arg) DefinedState(); #endif #ifdef TIMEBARS - tbStartTimer(0, "RenderMenus"); + tbStartTimer(0, "RenderMenus"); #endif RenderMenus(); #ifdef TIMEBARS tbEndTimer("RenderMenus"); - tbStartTimer(0, "DoFade"); + tbStartTimer(0, "DoFade"); #endif DoFade(); #ifdef TIMEBARS tbEndTimer("DoFade"); - tbStartTimer(0, "Render2dStuff-Fade"); + tbStartTimer(0, "Render2dStuff-Fade"); #endif Render2dStuffAfterFade(); #ifdef TIMEBARS - tbEndTimer("Render2dStuff-Fade"); + tbEndTimer("Render2dStuff-Fade"); #endif CCredits::Render(); -- cgit v1.2.3 From 560fc655388ac8cc017b4127e9444fc8702ffd45 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Wed, 8 Apr 2020 09:58:08 +0300 Subject: Small camera fixes --- src/core/Cam.cpp | 16 +++++----- src/core/Camera.cpp | 86 ++++++++++++++++++++++++++--------------------------- src/core/Camera.h | 23 ++++++++++---- 3 files changed, 67 insertions(+), 58 deletions(-) (limited to 'src/core') diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index 5b7a53e9..dc9ef74f 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -4672,15 +4672,15 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, else { switch ((int)TheCamera.CarZoomIndicator) { // near - case 1: + case CAM_ZOOM_1: zoomModeAlphaOffset = ZmOneAlphaOffsetLCS[alphaArrPos]; break; // mid - case 2: + case CAM_ZOOM_2: zoomModeAlphaOffset = ZmTwoAlphaOffsetLCS[alphaArrPos]; break; // far - case 3: + case CAM_ZOOM_3: zoomModeAlphaOffset = ZmThreeAlphaOffsetLCS[alphaArrPos]; break; default: @@ -4705,14 +4705,12 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, } } else { // 0.6f = fTestShiftHeliCamTarget - TargetCoors.x += 0.6f * car->GetUp().x * colMaxZ; - TargetCoors.y += 0.6f * car->GetUp().y * colMaxZ; - TargetCoors.z += 0.6f * car->GetUp().z * colMaxZ; + TargetCoors += 0.6f * car->GetUp() * colMaxZ; } float minDistForVehType = CARCAM_SET[camSetArrPos][4]; - if ((int)TheCamera.CarZoomIndicator == 1 && (camSetArrPos < 2 || camSetArrPos == 7)) { + if (TheCamera.CarZoomIndicator == CAM_ZOOM_1 && (camSetArrPos < 2 || camSetArrPos == 7)) { minDistForVehType = minDistForVehType * 0.65f; } @@ -4904,8 +4902,8 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, // yMovement = 0.0; if (!nextDirectionIsForward) { - yMovement = 0.0; - xMovement = 0.0; + yMovement = 0.0f; + xMovement = 0.0f; } if (camSetArrPos == 0 || camSetArrPos == 7) { diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 9d927354..46c17cd2 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -65,8 +65,8 @@ bool &bDidWeProcessAnyCinemaCam = *(bool*)0x95CD46; #define KEYJUSTDOWN(k) ControlsManager.GetIsKeyboardKeyJustDown((RsKeyCodes)k) #define KEYDOWN(k) ControlsManager.GetIsKeyboardKeyDown((RsKeyCodes)k) #define CTRLJUSTDOWN(key) \ - ((KEYDOWN(rsLCTRL) || KEYDOWN(rsRCTRL)) && KEYJUSTDOWN((RsKeyCodes)key) || \ - (KEYJUSTDOWN(rsLCTRL) || KEYJUSTDOWN(rsRCTRL)) && KEYDOWN((RsKeyCodes)key)) + ((KEYDOWN(rsLCTRL) || KEYDOWN(rsRCTRL)) && KEYJUSTDOWN((RsKeyCodes)key) || \ + (KEYJUSTDOWN(rsLCTRL) || KEYJUSTDOWN(rsRCTRL)) && KEYDOWN((RsKeyCodes)key)) #define CTRLDOWN(key) ((KEYDOWN(rsLCTRL) || KEYDOWN(rsRCTRL)) && KEYDOWN((RsKeyCodes)key)) #endif @@ -124,8 +124,8 @@ CCamera::Init(void) m_WideScreenOn = false; m_fFOV_Wide_Screen = 0.0f; m_bRestoreByJumpCut = false; - CarZoomIndicator = 2.0f; - PedZoomIndicator = 2.0f; + CarZoomIndicator = CAM_ZOOM_2; + PedZoomIndicator = CAM_ZOOM_2; CarZoomValueSmooth = 0.0f; m_fPedZoomValueSmooth = 0.0f; pTargetEntity = nil; @@ -623,11 +623,11 @@ CCamera::CamControl(void) if(CPad::GetPad(0)->CycleCameraModeUpJustDown() && !CReplay::IsPlayingBack() && (m_bLookingAtPlayer || WhoIsInControlOfTheCamera == CAMCONTROL_OBBE) && !m_WideScreenOn) - CarZoomIndicator -= 1.0f; + CarZoomIndicator--; if(CPad::GetPad(0)->CycleCameraModeDownJustDown() && !CReplay::IsPlayingBack() && (m_bLookingAtPlayer || WhoIsInControlOfTheCamera == CAMCONTROL_OBBE) && !m_WideScreenOn) - CarZoomIndicator += 1.0f; + CarZoomIndicator++; if(!m_bFailedCullZoneTestPreviously){ if(CarZoomIndicator < CAM_ZOOM_1STPRS) CarZoomIndicator = CAM_ZOOM_CINEMATIC; else if(CarZoomIndicator > CAM_ZOOM_CINEMATIC) CarZoomIndicator = CAM_ZOOM_1STPRS; @@ -812,7 +812,7 @@ CCamera::CamControl(void) else PedZoomIndicator = CAM_ZOOM_TOPDOWN; }else - PedZoomIndicator -= 1.0f; + PedZoomIndicator--; } if(CPad::GetPad(0)->CycleCameraModeDownJustDown() && !CReplay::IsPlayingBack() && (m_bLookingAtPlayer || WhoIsInControlOfTheCamera == CAMCONTROL_OBBE) && @@ -823,7 +823,7 @@ CCamera::CamControl(void) else PedZoomIndicator = CAM_ZOOM_TOPDOWN; }else - PedZoomIndicator += 1.0f; + PedZoomIndicator++; } // disabled obbe's cam here if(PedZoomIndicator < CAM_ZOOM_1) PedZoomIndicator = CAM_ZOOM_TOPDOWN; @@ -1223,7 +1223,7 @@ CCamera::CamControl(void) ReqMode == CCam::MODE_1STPERSON_RUNABOUT || ReqMode == CCam::MODE_M16_1STPERSON_RUNABOUT || ReqMode == CCam::MODE_FIGHT_CAM_RUNABOUT || ReqMode == CCam::MODE_HELICANNON_1STPERSON || WhoIsInControlOfTheCamera == CAMCONTROL_SCRIPT || - m_bJustCameOutOfGarage || m_bPlayerIsInGarage) + m_bJustCameOutOfGarage || m_bPlayerIsInGarage) canUseObbeCam = false; if(m_bObbeCinematicPedCamOn && canUseObbeCam) @@ -1468,9 +1468,9 @@ CCamera::CamControl(void) // Ped visibility if((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_SNIPER || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && pTargetEntity->IsPed() || + Cams[ActiveCam].Mode == CCam::MODE_SNIPER || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && pTargetEntity->IsPed() || Cams[ActiveCam].Mode == CCam::MODE_FLYBY) FindPlayerPed()->bIsVisible = false; else @@ -1524,7 +1524,7 @@ CCamera::UpdateTargetEntity(void) cantOpen = false; if(PLAYER->GetPedState() == PED_ENTER_CAR && !cantOpen){ - if(!enteringCar && CarZoomIndicator != 0.0f){ + if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS){ pTargetEntity = PLAYER->m_pMyVehicle; if(PLAYER->m_pMyVehicle == nil) pTargetEntity = PLAYER; @@ -1532,7 +1532,7 @@ CCamera::UpdateTargetEntity(void) } if((PLAYER->GetPedState() == PED_CARJACK || PLAYER->GetPedState() == PED_OPEN_DOOR) && !cantOpen){ - if(!enteringCar && CarZoomIndicator != 0.0f) + if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS) #ifdef GTA_PS2_STUFF // dunno if this has any amazing effects { @@ -1549,7 +1549,7 @@ CCamera::UpdateTargetEntity(void) pTargetEntity = FindPlayerPed(); if(PLAYER->GetPedState() == PED_DRAG_FROM_CAR) pTargetEntity = FindPlayerPed(); - if(pTargetEntity->IsVehicle() && CarZoomIndicator != 0.0f && FindPlayerPed()->GetPedState() == PED_ARRESTED) + if(pTargetEntity->IsVehicle() && CarZoomIndicator != CAM_ZOOM_1STPRS && FindPlayerPed()->GetPedState() == PED_ARRESTED) pTargetEntity = FindPlayerPed(); } } @@ -1566,15 +1566,15 @@ CCamera::UpdateSoundDistances(void) int n; if((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_SNIPER || - Cams[ActiveCam].Mode == CCam::MODE_SNIPER_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_1STPERSON_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_FIGHT_CAM_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_HELICANNON_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && + Cams[ActiveCam].Mode == CCam::MODE_SNIPER || + Cams[ActiveCam].Mode == CCam::MODE_SNIPER_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_1STPERSON_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_FIGHT_CAM_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_HELICANNON_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && pTargetEntity->IsPed()) center = GetPosition() + 0.5f*GetForward(); else @@ -1856,14 +1856,14 @@ CCamera::StartTransition(int16 newMode) m_bUseTransitionBeta = false; if((Cams[ActiveCam].Mode == CCam::MODE_SNIPER || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_SNIPER_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_FIGHT_CAM_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_HELICANNON_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_1STPERSON_RUNABOUT) && + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_SNIPER_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_FIGHT_CAM_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_HELICANNON_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_1STPERSON_RUNABOUT) && pTargetEntity->IsPed()){ float angle = CGeneral::GetATanOfXY(Cams[ActiveCam].Front.x, Cams[ActiveCam].Front.y) - HALFPI; ((CPed*)pTargetEntity)->m_fRotationCur = angle; @@ -2184,12 +2184,12 @@ CCamera::DrawBordersForWideScreen(void) CSprite2d::DrawRect( CRect(0.0f, (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - 8.0f, - SCREEN_WIDTH, 0.0f), + SCREEN_WIDTH, 0.0f), CRGBA(0, 0, 0, 255)); CSprite2d::DrawRect( CRect(0.0f, SCREEN_HEIGHT, - SCREEN_WIDTH, SCREEN_HEIGHT - (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - 8.0f), + SCREEN_WIDTH, SCREEN_HEIGHT - (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - 8.0f), CRGBA(0, 0, 0, 255)); } @@ -2631,8 +2631,8 @@ CCamera::ProcessObbeCinemaCameraCar(void) if(!bDidWeProcessAnyCinemaCam || IsItTimeForNewcam(SequenceOfCams[OldMode], TimeForNext)){ // This is very strange code... for(OldMode = (OldMode+1) % 14; - !TryToStartNewCamMode(SequenceOfCams[OldMode]) && i <= 14; - OldMode = (OldMode+1) % 14) + !TryToStartNewCamMode(SequenceOfCams[OldMode]) && i <= 14; + OldMode = (OldMode+1) % 14) i++; TimeForNext = CTimer::GetTimeInMilliseconds(); if(i >= 14){ @@ -2659,8 +2659,8 @@ CCamera::ProcessObbeCinemaCameraPed(void) if(!bDidWeProcessAnyCinemaCam || IsItTimeForNewcam(SequenceOfPedCams[PedOldMode], PedTimeForNext)){ for(PedOldMode = (PedOldMode+1) % 5; - !TryToStartNewCamMode(SequenceOfPedCams[PedOldMode]); - PedOldMode = (PedOldMode+1) % 5); + !TryToStartNewCamMode(SequenceOfPedCams[PedOldMode]); + PedOldMode = (PedOldMode+1) % 5); PedTimeForNext = CTimer::GetTimeInMilliseconds(); } bDidWeProcessAnyCinemaCam = true; @@ -2813,11 +2813,11 @@ CCamera::Process_Train_Camera_Control(void) uint32 node = m_iCurrentTrainCamNode; for(i = 0; i < m_uiNumberOfTrainCamNodes && !found; i++){ if(target->IsWithinArea(m_arrTrainCamNode[node].m_cvecMinPointInRange.x, - m_arrTrainCamNode[node].m_cvecMinPointInRange.y, - m_arrTrainCamNode[node].m_cvecMinPointInRange.z, - m_arrTrainCamNode[node].m_cvecMaxPointInRange.x, - m_arrTrainCamNode[node].m_cvecMaxPointInRange.y, - m_arrTrainCamNode[node].m_cvecMaxPointInRange.z)){ + m_arrTrainCamNode[node].m_cvecMinPointInRange.y, + m_arrTrainCamNode[node].m_cvecMinPointInRange.z, + m_arrTrainCamNode[node].m_cvecMaxPointInRange.x, + m_arrTrainCamNode[node].m_cvecMaxPointInRange.y, + m_arrTrainCamNode[node].m_cvecMaxPointInRange.z)){ m_iCurrentTrainCamNode = node; found = true; } diff --git a/src/core/Camera.h b/src/core/Camera.h index c22ba9c8..eca4518a 100644 --- a/src/core/Camera.h +++ b/src/core/Camera.h @@ -16,12 +16,15 @@ enum }; #define DEFAULT_NEAR (0.9f) -#define CAM_ZOOM_1STPRS (0.0f) -#define CAM_ZOOM_1 (1.0f) -#define CAM_ZOOM_2 (2.0f) -#define CAM_ZOOM_3 (3.0f) -#define CAM_ZOOM_TOPDOWN (4.0f) -#define CAM_ZOOM_CINEMATIC (5.0f) +enum +{ + CAM_ZOOM_1STPRS, + CAM_ZOOM_1, + CAM_ZOOM_2, + CAM_ZOOM_3, + CAM_ZOOM_TOPDOWN, + CAM_ZOOM_CINEMATIC, +}; #ifdef FREE_CAM // LCS values #define FREE_CAR_ZOOM_VALUE_1 (-1.0f) @@ -412,7 +415,11 @@ uint32 unknown; // some counter having to do with music float CamFrontXNorm; float CamFrontYNorm; +#if 0 // TODO: FIX_BUGS once GenericLoad is done + int32 CarZoomIndicator; +#else float CarZoomIndicator; +#endif float CarZoomValue; float CarZoomValueSmooth; @@ -448,7 +455,11 @@ uint32 unknown; // some counter having to do with music float m_ScreenReductionSpeed; float m_AlphaForPlayerAnim1rstPerson; float Orientation; +#if 0 // TODO: FIX_BUGS once GenericLoad is done + int32 PedZoomIndicator; +#else float PedZoomIndicator; +#endif float PlayerExhaustion; float SoundDistUp, SoundDistLeft, SoundDistRight; float SoundDistUpAsRead, SoundDistLeftAsRead, SoundDistRightAsRead; -- cgit v1.2.3 From 7439d6482ffa8ed7de0a6f3fb8fcc2e11401b97d Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Wed, 8 Apr 2020 10:21:40 +0300 Subject: Reverting tabs back to spaces for aap --- src/core/Camera.cpp | 68 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'src/core') diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 46c17cd2..00c838cf 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -65,8 +65,8 @@ bool &bDidWeProcessAnyCinemaCam = *(bool*)0x95CD46; #define KEYJUSTDOWN(k) ControlsManager.GetIsKeyboardKeyJustDown((RsKeyCodes)k) #define KEYDOWN(k) ControlsManager.GetIsKeyboardKeyDown((RsKeyCodes)k) #define CTRLJUSTDOWN(key) \ - ((KEYDOWN(rsLCTRL) || KEYDOWN(rsRCTRL)) && KEYJUSTDOWN((RsKeyCodes)key) || \ - (KEYJUSTDOWN(rsLCTRL) || KEYJUSTDOWN(rsRCTRL)) && KEYDOWN((RsKeyCodes)key)) + ((KEYDOWN(rsLCTRL) || KEYDOWN(rsRCTRL)) && KEYJUSTDOWN((RsKeyCodes)key) || \ + (KEYJUSTDOWN(rsLCTRL) || KEYJUSTDOWN(rsRCTRL)) && KEYDOWN((RsKeyCodes)key)) #define CTRLDOWN(key) ((KEYDOWN(rsLCTRL) || KEYDOWN(rsRCTRL)) && KEYDOWN((RsKeyCodes)key)) #endif @@ -1223,7 +1223,7 @@ CCamera::CamControl(void) ReqMode == CCam::MODE_1STPERSON_RUNABOUT || ReqMode == CCam::MODE_M16_1STPERSON_RUNABOUT || ReqMode == CCam::MODE_FIGHT_CAM_RUNABOUT || ReqMode == CCam::MODE_HELICANNON_1STPERSON || WhoIsInControlOfTheCamera == CAMCONTROL_SCRIPT || - m_bJustCameOutOfGarage || m_bPlayerIsInGarage) + m_bJustCameOutOfGarage || m_bPlayerIsInGarage) canUseObbeCam = false; if(m_bObbeCinematicPedCamOn && canUseObbeCam) @@ -1468,9 +1468,9 @@ CCamera::CamControl(void) // Ped visibility if((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_SNIPER || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && pTargetEntity->IsPed() || + Cams[ActiveCam].Mode == CCam::MODE_SNIPER || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && pTargetEntity->IsPed() || Cams[ActiveCam].Mode == CCam::MODE_FLYBY) FindPlayerPed()->bIsVisible = false; else @@ -1566,15 +1566,15 @@ CCamera::UpdateSoundDistances(void) int n; if((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_SNIPER || - Cams[ActiveCam].Mode == CCam::MODE_SNIPER_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_1STPERSON_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_FIGHT_CAM_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_HELICANNON_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && + Cams[ActiveCam].Mode == CCam::MODE_SNIPER || + Cams[ActiveCam].Mode == CCam::MODE_SNIPER_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_1STPERSON_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_FIGHT_CAM_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_HELICANNON_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && pTargetEntity->IsPed()) center = GetPosition() + 0.5f*GetForward(); else @@ -1856,14 +1856,14 @@ CCamera::StartTransition(int16 newMode) m_bUseTransitionBeta = false; if((Cams[ActiveCam].Mode == CCam::MODE_SNIPER || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_SNIPER_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_FIGHT_CAM_RUNABOUT || - Cams[ActiveCam].Mode == CCam::MODE_HELICANNON_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_1STPERSON_RUNABOUT) && + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_SNIPER_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_FIGHT_CAM_RUNABOUT || + Cams[ActiveCam].Mode == CCam::MODE_HELICANNON_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_1STPERSON_RUNABOUT) && pTargetEntity->IsPed()){ float angle = CGeneral::GetATanOfXY(Cams[ActiveCam].Front.x, Cams[ActiveCam].Front.y) - HALFPI; ((CPed*)pTargetEntity)->m_fRotationCur = angle; @@ -2184,12 +2184,12 @@ CCamera::DrawBordersForWideScreen(void) CSprite2d::DrawRect( CRect(0.0f, (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - 8.0f, - SCREEN_WIDTH, 0.0f), + SCREEN_WIDTH, 0.0f), CRGBA(0, 0, 0, 255)); CSprite2d::DrawRect( CRect(0.0f, SCREEN_HEIGHT, - SCREEN_WIDTH, SCREEN_HEIGHT - (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - 8.0f), + SCREEN_WIDTH, SCREEN_HEIGHT - (SCREEN_HEIGHT/2) * m_ScreenReductionPercentage/100.0f - 8.0f), CRGBA(0, 0, 0, 255)); } @@ -2631,8 +2631,8 @@ CCamera::ProcessObbeCinemaCameraCar(void) if(!bDidWeProcessAnyCinemaCam || IsItTimeForNewcam(SequenceOfCams[OldMode], TimeForNext)){ // This is very strange code... for(OldMode = (OldMode+1) % 14; - !TryToStartNewCamMode(SequenceOfCams[OldMode]) && i <= 14; - OldMode = (OldMode+1) % 14) + !TryToStartNewCamMode(SequenceOfCams[OldMode]) && i <= 14; + OldMode = (OldMode+1) % 14) i++; TimeForNext = CTimer::GetTimeInMilliseconds(); if(i >= 14){ @@ -2659,8 +2659,8 @@ CCamera::ProcessObbeCinemaCameraPed(void) if(!bDidWeProcessAnyCinemaCam || IsItTimeForNewcam(SequenceOfPedCams[PedOldMode], PedTimeForNext)){ for(PedOldMode = (PedOldMode+1) % 5; - !TryToStartNewCamMode(SequenceOfPedCams[PedOldMode]); - PedOldMode = (PedOldMode+1) % 5); + !TryToStartNewCamMode(SequenceOfPedCams[PedOldMode]); + PedOldMode = (PedOldMode+1) % 5); PedTimeForNext = CTimer::GetTimeInMilliseconds(); } bDidWeProcessAnyCinemaCam = true; @@ -2813,11 +2813,11 @@ CCamera::Process_Train_Camera_Control(void) uint32 node = m_iCurrentTrainCamNode; for(i = 0; i < m_uiNumberOfTrainCamNodes && !found; i++){ if(target->IsWithinArea(m_arrTrainCamNode[node].m_cvecMinPointInRange.x, - m_arrTrainCamNode[node].m_cvecMinPointInRange.y, - m_arrTrainCamNode[node].m_cvecMinPointInRange.z, - m_arrTrainCamNode[node].m_cvecMaxPointInRange.x, - m_arrTrainCamNode[node].m_cvecMaxPointInRange.y, - m_arrTrainCamNode[node].m_cvecMaxPointInRange.z)){ + m_arrTrainCamNode[node].m_cvecMinPointInRange.y, + m_arrTrainCamNode[node].m_cvecMinPointInRange.z, + m_arrTrainCamNode[node].m_cvecMaxPointInRange.x, + m_arrTrainCamNode[node].m_cvecMaxPointInRange.y, + m_arrTrainCamNode[node].m_cvecMaxPointInRange.z)){ m_iCurrentTrainCamNode = node; found = true; } -- cgit v1.2.3