From 408f47fc9d85e930f2dc1a4cc9f50b3c0d4c60b8 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 6 Jun 2020 12:58:10 +0300 Subject: [PATCH 1/5] fixed linux saving --- src/core/common.h | 2 +- src/vehicles/CarGen.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/common.h b/src/core/common.h index 7d339660..ff1feb5c 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -404,7 +404,7 @@ inline T *WriteSaveBuf(uint8 *&buf, const T &value) WriteSaveBuf(buf, b);\ WriteSaveBuf(buf, c);\ WriteSaveBuf(buf, d);\ - WriteSaveBuf(buf, size); + WriteSaveBuf(buf, size); #define CheckSaveHeader(buf,a,b,c,d,size)\ assert(ReadSaveBuf(buf) == a);\ diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp index 72b6c30c..cb21b918 100644 --- a/src/vehicles/CarGen.cpp +++ b/src/vehicles/CarGen.cpp @@ -226,7 +226,7 @@ INITSAVEBUF WriteSaveBuf(buffer, ProcessCounter); WriteSaveBuf(buffer, GenerateEvenIfPlayerIsCloseCounter); WriteSaveBuf(buffer, (int16)0); // alignment - WriteSaveBuf(buffer, sizeof(CarGeneratorArray)); + WriteSaveBuf(buffer, (uint32)sizeof(CarGeneratorArray)); for (int i = 0; i < NUM_CARGENS; i++) WriteSaveBuf(buffer, CarGeneratorArray[i]); VALIDATESAVEBUF(*size) From 3f26250d73d5c196a66262821a7980ccdbd8deed Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 6 Jun 2020 13:31:09 +0300 Subject: [PATCH 2/5] fixing some uninitialized stuff --- src/control/Script.cpp | 4 ++++ src/entities/Physical.cpp | 3 +++ src/math/Matrix.h | 4 ++++ src/peds/Ped.cpp | 3 +++ src/peds/PlayerPed.cpp | 8 ++++++-- src/vehicles/Plane.cpp | 4 ++++ src/vehicles/Train.cpp | 4 ++++ src/vehicles/Vehicle.cpp | 3 +++ 8 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/control/Script.cpp b/src/control/Script.cpp index bc15a695..94590087 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -11763,7 +11763,11 @@ void CTheScripts::UpdateObjectIndices() if (!pModel) continue; strcpy(name, pModel->GetName()); +#ifdef FIX_BUGS + for (int k = 0; k < USED_OBJECT_NAME_LENGTH && name[k]; k++) +#else for (int k = 0; k < USED_OBJECT_NAME_LENGTH; k++) +#endif name[k] = toupper(name[k]); if (strcmp(name, UsedObjectArray[i].name) == 0) { found = true; diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index 9fc5a853..f76c3e29 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -63,6 +63,9 @@ CPhysical::CPhysical(void) m_phy_flagA10 = false; m_phy_flagA20 = false; +#ifdef FIX_BUGS + m_nSurfaceTouched = SURFACE_DEFAULT; +#endif m_nZoneLevel = LEVEL_NONE; } diff --git a/src/math/Matrix.h b/src/math/Matrix.h index 5ec79aba..d8920a65 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -30,7 +30,11 @@ public: RwMatrixDestroy(m_attachment); } void Attach(RwMatrix *matrix, bool owner = false){ +#ifdef FIX_BUGS + if(m_attachment && m_hasRwMatrix) +#else if(m_hasRwMatrix && m_attachment) +#endif RwMatrixDestroy(m_attachment); m_attachment = matrix; m_hasRwMatrix = owner; diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index eebfa099..4e9280e6 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -187,6 +187,9 @@ CPed::CPed(uint32 pedType) : m_pedIK(this) m_queuedSound = SOUND_NO_SOUND; m_objective = OBJECTIVE_NONE; m_prevObjective = OBJECTIVE_NONE; +#ifdef FIX_BUGS + m_objectiveTimer = 0; +#endif CharCreatedBy = RANDOM_CHAR; m_leader = nil; m_pedInObjective = nil; diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 305c329e..6613ea1b 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -35,6 +35,9 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1) { m_fMoveSpeed = 0.0f; SetModelIndex(MI_PLAYER); +#ifdef FIX_BUGS + m_fCurrentStamina = m_fMaxStamina = 150.0f; +#endif SetInitialState(); m_pWanted = new CWanted(); @@ -46,8 +49,9 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1) m_bSpeedTimerFlag = false; m_pPointGunAt = nil; m_nPedState = PED_IDLE; - m_fMaxStamina = 150.0f; - m_fCurrentStamina = m_fMaxStamina; +#ifndef FIX_BUGS + m_fCurrentStamina = m_fMaxStamina = 150.0f; +#endif m_fStaminaProgress = 0.0f; m_nEvadeAmount = 0; field_1367 = 0; diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp index 71189d84..3bf385a0 100644 --- a/src/vehicles/Plane.cpp +++ b/src/vehicles/Plane.cpp @@ -84,6 +84,10 @@ CPlane::CPlane(int32 id, uint8 CreatedBy) SetStatus(STATUS_PLANE); bIsBIGBuilding = true; m_level = LEVEL_NONE; + +#ifdef FIX_BUGS + m_isFarAway = true; +#endif } CPlane::~CPlane() diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index 38bb1300..baf6bfb7 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -63,6 +63,10 @@ CTrain::CTrain(int32 id, uint8 CreatedBy) bUsesCollision = true; SetStatus(STATUS_TRAIN_MOVING); + +#ifdef FIX_BUGS + m_isFarAway = true; +#endif } void diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index dbb15b5d..addbfc3d 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -59,6 +59,9 @@ CVehicle::CVehicle(uint8 CreatedBy) bIsLawEnforcer = false; bIsAmbulanceOnDuty = false; bIsFireTruckOnDuty = false; +#ifdef FIX_BUGS + bIsHandbrakeOn = false; +#endif CCarCtrl::UpdateCarCount(this, false); m_fHealth = 1000.0f; bEngineOn = true; From e099aaaa6b7aa90a632d785c6f83a1fbb110cdd9 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 6 Jun 2020 16:36:26 +0300 Subject: [PATCH 3/5] minor fixes --- src/entities/Physical.cpp | 4 ++++ src/peds/Ped.cpp | 3 +++ src/vehicles/Vehicle.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index f76c3e29..e89b4858 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -21,6 +21,10 @@ CPhysical::CPhysical(void) { int i; +#ifdef FIX_BUGS + m_nLastTimeCollided = 0; +#endif + m_fForceMultiplier = 1.0f; m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 4e9280e6..254f89a6 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -243,6 +243,9 @@ CPed::CPed(uint32 pedType) : m_pedIK(this) m_nPedState = PED_IDLE; m_nLastPedState = PED_NONE; m_nMoveState = PEDMOVE_STILL; +#ifdef FIX_BUGS + m_nPrevMoveState = PEDMOVE_NONE; +#endif m_nStoredMoveState = PEDMOVE_NONE; m_pFire = nil; m_pPointGunAt = nil; diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index addbfc3d..eb6c8d6d 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -99,7 +99,7 @@ CVehicle::CVehicle(uint8 CreatedBy) m_numPedsUseItAsCover = 0; bIsCarParkVehicle = false; bHasAlreadyBeenRecorded = false; - m_bSirenOrAlarm = 0; + m_bSirenOrAlarm = false; m_nCarHornTimer = 0; m_nCarHornPattern = 0; m_nAlarmState = 0; From 44e2fcee393a16a3db5251f14e839506ae544898 Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 7 Jun 2020 00:03:42 +0200 Subject: [PATCH 4/5] disable skidding bugfix --- src/vehicles/Vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index eb6c8d6d..e21ad07c 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -469,7 +469,7 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon static bool bBraking; static bool bDriving; -#ifdef FIX_BUGS +#ifdef FIX_SIGNIFICANT_BUGS bAlreadySkidding = false; #endif From 552205dfbaea70628df56a4966d269a81a97d28e Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 7 Jun 2020 04:10:06 +0300 Subject: [PATCH 5/5] FONT_BANK renamed to FONT_STANDARD --- src/control/Darkel.cpp | 6 +++--- src/control/Garages.cpp | 2 +- src/control/Pickups.cpp | 2 +- src/control/Replay.cpp | 2 +- src/control/SceneEdit.cpp | 4 ++-- src/core/Debug.cpp | 6 +++--- src/core/Frontend.cpp | 32 ++++++++++++++++---------------- src/core/Pad.cpp | 4 ++-- src/core/main.cpp | 4 ++-- src/core/timebars.cpp | 2 +- src/render/Console.cpp | 2 +- src/render/Font.cpp | 12 ++++++------ src/render/Font.h | 2 +- src/render/Hud.cpp | 16 ++++++++-------- src/render/SpecialFX.cpp | 2 +- src/rw/TexRead.cpp | 2 +- 16 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/control/Darkel.cpp b/src/control/Darkel.cpp index cfd58340..5e87aaec 100644 --- a/src/control/Darkel.cpp +++ b/src/control/Darkel.cpp @@ -74,7 +74,7 @@ CDarkel::DrawMessages() CFont::SetScale(SCREEN_SCALE_X(1.3f), SCREEN_SCALE_Y(1.3f)); CFont::SetJustifyOff(); CFont::SetColor(CRGBA(255, 255, 128, CalcFade(timePassedSinceStart, 3000, 11000))); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); if (pStartMessage) { CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, pStartMessage); } @@ -84,7 +84,7 @@ CDarkel::DrawMessages() CFont::SetScale(SCREEN_SCALE_X(1.3f), SCREEN_SCALE_Y(1.3f)); CFont::SetJustifyOff(); CFont::SetColor(CRGBA(255, 255, 128, CalcFade(timePassedSinceStart, 0, 8000))); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); if (pStartMessage) { CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, pStartMessage); } @@ -124,7 +124,7 @@ CDarkel::DrawMessages() CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f)); CFont::SetJustifyOff(); CFont::SetColor(CRGBA(128, 255, 128, CalcFade(timePassedSinceStart, 0, 5000))); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); int y = SCREEN_HEIGHT / 2 + SCREEN_SCALE_Y(25.0f - timePassedSinceStart * 0.01f); CFont::PrintString(SCREEN_WIDTH / 2, y, TheText.Get("KF_3")); } diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index e37df8d4..71f4b5d0 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -1399,7 +1399,7 @@ void CGarages::PrintMessages() CFont::SetBackgroundOff(); CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f)); CFont::SetCentreOn(); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetColor(CRGBA(0, 0, 0, 255)); #if defined(PS2) || defined (FIX_BUGS) diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 32bffa17..33095036 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -975,7 +975,7 @@ CPickups::RenderPickUpText() CFont::SetColor(CRGBA(aMessages[i].m_color.red, aMessages[i].m_color.green, aMessages[i].m_color.blue, aMessages[i].m_color.alpha)); CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::PrintString(aMessages[i].m_pos.x, aMessages[i].m_pos.y, strToPrint); } NumMessages = 0; diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 707f1d87..b2ecf38f 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -1581,7 +1581,7 @@ void CReplay::Display() CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f)); CFont::SetAlignment(ALIGN_LEFT); CFont::SetColor(CRGBA(255, 255, 200, 200)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); if (Mode == MODE_PLAYBACK) CFont::PrintString(SCREEN_SCALE_X(63.5f), SCREEN_SCALE_Y(30.0f), TheText.Get("REPLAY")); } diff --git a/src/control/SceneEdit.cpp b/src/control/SceneEdit.cpp index be8c5519..7b7eb61d 100644 --- a/src/control/SceneEdit.cpp +++ b/src/control/SceneEdit.cpp @@ -269,7 +269,7 @@ void CSceneEdit::Draw(void) CFont::SetRightJustifyWrap(0.0f); CFont::SetBackGroundOnlyTextOff(); #ifdef FIX_BUGS - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::SetPropOn(); CFont::SetDropColor(CRGBA(0, 0, 0, 255)); CFont::SetDropShadowPosition(1); @@ -292,7 +292,7 @@ void CSceneEdit::Draw(void) CFont::SetCentreOff(); CFont::SetScale(SCREEN_SCALE_X(0.7f), SCREEN_SCALE_Y(0.7f)); #ifdef FIX_BUGS - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); #else CFont::SetFontStyle(FONT_HEADING); #endif diff --git a/src/core/Debug.cpp b/src/core/Debug.cpp index e794dcaf..e319388c 100644 --- a/src/core/Debug.cpp +++ b/src/core/Debug.cpp @@ -55,7 +55,7 @@ CDebug::DebugDisplayTextBuffer() CFont::SetJustifyOn(); CFont::SetRightJustifyWrap(0.0f); CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); #else // this is not even readable CFont::SetPropOff(); @@ -65,7 +65,7 @@ CDebug::DebugDisplayTextBuffer() CFont::SetRightJustifyOn(); CFont::SetRightJustifyWrap(0.0f); CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::SetPropOff(); #endif do { @@ -113,7 +113,7 @@ CDebug::DisplayScreenStrings() CFont::SetRightJustifyWrap(0.0f); CFont::SetWrapx(9999.0f); CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); for(i = 0; i < ms_nScreenStrs; i++){ /* diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 3ead688b..9d231648 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -782,7 +782,7 @@ CMenuManager::Draw() nextYToUse += 24.0f + 10.0f; } - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT * MENU_TEXT_SIZE_X), MENU_Y(MENUACTION_SCALE_MULT * MENU_TEXT_SIZE_Y)); CFont::SetRightJustifyOff(); CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); @@ -865,7 +865,7 @@ CMenuManager::Draw() columnWidth = 120; headerHeight = 38; lineHeight = 20; - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = SMALLTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = SMALLTEXT_Y_SCALE)); CFont::SetRightJustifyOff(); break; @@ -902,7 +902,7 @@ CMenuManager::Draw() columnWidth = 180; headerHeight = 60; lineHeight = 24; - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE)); break; #endif @@ -917,7 +917,7 @@ CMenuManager::Draw() } #ifdef PS2_LIKE_MENU - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); #endif switch (m_nCurrScreen) { @@ -1768,7 +1768,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); if (!m_bKeyIsOK) DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0); @@ -1781,7 +1781,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 CFont::PrintString(MENU_X_LEFT_ALIGNED(275.0f), SCREEN_SCALE_FROM_BOTTOM(114.0f), TheText.Get("FET_CIG")); // BACKSPACE TO CLEAR - LMB,RETURN TO CHANGE CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); m_bKeyIsOK = false; m_bKeyChangeNotProcessed = false; } @@ -1793,7 +1793,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8 CFont::PrintString(MENU_X_LEFT_ALIGNED(275.0f), SCREEN_SCALE_FROM_BOTTOM(114.0f), TheText.Get("FET_EIG")); // CANNOT SET A CONTROL FOR THIS ACTION CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); } } } @@ -1956,7 +1956,7 @@ CMenuManager::DrawControllerSetupScreen() CFont::PrintString(MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X), MENU_Y(CONTSETUP_LIST_TOP), TheText.Get("FET_CCR")); CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X_LEFT_ALIGNED(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); int yStart; if (m_ControlMethod == CONTROL_CLASSIC) yStart = CONTSETUP_LIST_HEADER_HEIGHT + 29; @@ -2303,7 +2303,7 @@ CMenuManager::DrawFrontEndNormal() if (CheckHover(xStart, xStart + optionWidth, optionTop, optionBottom)) hoveredBottomBarOption = i; - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetScale(MENU_X(0.35f), MENU_Y(0.7f)); CFont::SetRightJustifyOff(); if (hoveredBottomBarOption == i && hoveredBottomBarOption != curBottomBarOption) @@ -2673,7 +2673,7 @@ CMenuManager::DrawPlayerSetupScreen() // Skin list CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(PLAYERSETUP_ROW_TEXT_X_SCALE), MENU_Y(PLAYERSETUP_ROW_TEXT_Y_SCALE)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); if (m_nSkinsTotal > 0) { for (m_pSelectedSkin = m_pSkinListHead.nextSkin; m_pSelectedSkin->skinId != m_nFirstVisibleRowOnList; m_pSelectedSkin = m_pSelectedSkin->nextSkin); @@ -3340,7 +3340,7 @@ CMenuManager::MessageScreen(const char *text) CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f)); CFont::SetRightJustifyWrap(SCREEN_SCALE_FROM_RIGHT(170.0f)); CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(120.0f), SCREEN_SCALE_Y(150.0f), SCREEN_SCALE_FROM_RIGHT(120.0f), SCREEN_SCALE_FROM_BOTTOM(220.0f)), CRGBA(50, 50, 50, 210)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetCentreSize(SCREEN_SCALE_X(380.0f)); CFont::SetCentreOn(); CFont::SetColor(CRGBA(255, 217, 106, 255)); @@ -3370,7 +3370,7 @@ void CMenuManager::PrintBriefs() { CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetRightJustifyOff(); CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X * 0.7), MENU_Y(MENU_TEXT_SIZE_Y * 0.9)); // second mulipliers are double, idk why @@ -3425,7 +3425,7 @@ CMenuManager::PrintErrorMessage() return; CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(20.0f), SCREEN_SCALE_Y(140.0f), SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f)), CRGBA(64, 16, 16, 224)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetBackgroundOff(); CFont::SetPropOn(); CFont::SetCentreOff(); @@ -3446,7 +3446,7 @@ CMenuManager::PrintStats() { int rowNum = ConstructStatLine(99999); #ifdef GTA3_1_1_PATCH - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); #endif CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X * 0.7), MENU_Y(MENU_TEXT_SIZE_Y * 0.9)); // second mulipliers are double, idk why float nextYChange, y, alphaMult; @@ -5351,7 +5351,7 @@ CMenuManager::PrintController(void) m_aFrontEndSprites[FE_ARROWS4].Draw(MENU_X_LEFT_ALIGNED(160.0f), MENU_Y(160.0f), MENU_X(235.2f), MENU_Y(175.2f), CRGBA(255, 255, 255, 255)); } - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); // X + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); // X // CFont::SetScale(0.4f, 0.4f); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); // X @@ -5736,7 +5736,7 @@ CMenuManager::PrintMap(void) CRGBA(235, 170, 50, 255)); CFont::SetScale(MENU_X(0.4f), MENU_Y(0.7f)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); float nextX = MENU_X(30.0f), nextY = 95.0f; diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index 924d4724..a0fd0535 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -2286,7 +2286,7 @@ void CPad::PrintErrorMessage(void) CFont::SetCentreOn(); CFont::SetPropOn(); CFont::SetColor(CRGBA(255, 255, 200, 200)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::PrintString ( SCREEN_WIDTH / 2, @@ -2303,7 +2303,7 @@ void CPad::PrintErrorMessage(void) CFont::SetCentreOn(); CFont::SetPropOn(); CFont::SetColor(CRGBA(255, 255, 200, 200)); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::PrintString ( SCREEN_WIDTH / 2, diff --git a/src/core/main.cpp b/src/core/main.cpp index eb39b287..3fca618b 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -507,7 +507,7 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen) CFont::SetScale(SCREEN_SCALE_X(0.75f), yscale); CFont::SetPropOn(); CFont::SetRightJustifyOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::SetColor(CRGBA(255, 255, 255, 255)); AsciiToUnicode(str1, tmpstr); CFont::PrintString(hpos, vpos, tmpstr); @@ -702,7 +702,7 @@ DisplayGameDebugText() CFont::SetPropOn(); CFont::SetBackgroundOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f)); CFont::SetCentreOff(); CFont::SetRightJustifyOff(); diff --git a/src/core/timebars.cpp b/src/core/timebars.cpp index 6b841a5c..884feffd 100644 --- a/src/core/timebars.cpp +++ b/src/core/timebars.cpp @@ -92,7 +92,7 @@ void tbDisplay() CFont::SetWrapx(640.0f); CFont::SetRightJustifyOff(); CFont::SetPropOn(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); sprintf(temp, "FPS: %.2f", Diag_GetFPS()); AsciiToUnicode(temp, wtemp); CFont::SetColor(CRGBA(255, 255, 255, 255)); diff --git a/src/render/Console.cpp b/src/render/Console.cpp index 8ea5b7a3..244bfb17 100644 --- a/src/render/Console.cpp +++ b/src/render/Console.cpp @@ -63,7 +63,7 @@ CConsole::Display() CFont::SetJustifyOn(); CFont::SetRightJustifyWrap(0.0f); CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); #ifndef FIX_BUGS CFont::SetPropOff(); // not sure why this is here anyway #endif diff --git a/src/render/Font.cpp b/src/render/Font.cpp index ef665fae..33b2dca1 100644 --- a/src/render/Font.cpp +++ b/src/render/Font.cpp @@ -250,7 +250,7 @@ CFont::Initialise(void) SetBackgroundColor(CRGBA(0x80, 0x80, 0x80, 0x80)); SetBackGroundOnlyTextOff(); SetPropOn(); - SetFontStyle(FONT_BANK); + SetFontStyle(FONT_STANDARD); SetRightJustifyWrap(0.0f); SetAlphaFade(255.0f); SetDropShadowPosition(0); @@ -348,7 +348,7 @@ CFont::PrintChar(float x, float y, wchar c) } #endif - if(Details.style == FONT_BANK || Details.style == FONT_HEADING){ + if(Details.style == FONT_STANDARD || Details.style == FONT_HEADING){ if(Details.dropShadowPosition != 0){ CSprite2d::AddSpriteToBank(Details.bank + Details.style, // BUG: game doesn't add bank CRect(x + SCREEN_SCALE_X(Details.dropShadowPosition), @@ -828,7 +828,7 @@ CFont::GetCharacterWidth(wchar c) if (IsJapanese()) { if (!Details.proportional) return Size[0][Details.style][192]; - if (c <= 94 || Details.style == FONT_HEADING || Details.style == FONT_BANK) { + if (c <= 94 || Details.style == FONT_HEADING || Details.style == FONT_STANDARD) { switch (Details.style) { case FONT_JAPANESE: @@ -844,7 +844,7 @@ CFont::GetCharacterWidth(wchar c) { case FONT_JAPANESE: return 29.4f; - case FONT_BANK: + case FONT_STANDARD: return 10.0f; case FONT_PAGER: return 31.5f; @@ -874,7 +874,7 @@ CFont::GetCharacterSize(wchar c) { if (!Details.proportional) return Size[0][Details.style][192] * Details.scaleX; - if (c <= 94 || Details.style == FONT_HEADING || Details.style == FONT_BANK) { + if (c <= 94 || Details.style == FONT_HEADING || Details.style == FONT_STANDARD) { switch (Details.style) { case FONT_JAPANESE: @@ -890,7 +890,7 @@ CFont::GetCharacterSize(wchar c) { case FONT_JAPANESE: return 29.4f * Details.scaleX; - case FONT_BANK: + case FONT_STANDARD: return 10.0f * Details.scaleX; case FONT_PAGER: return 31.5f * Details.scaleX; diff --git a/src/render/Font.h b/src/render/Font.h index 9b4e7132..fba5125b 100644 --- a/src/render/Font.h +++ b/src/render/Font.h @@ -28,7 +28,7 @@ struct CFontDetails class CSprite2d; enum { - FONT_BANK, + FONT_STANDARD, FONT_PAGER, FONT_HEADING, #ifdef MORE_LANGUAGES diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index c7f61d5d..8e8096a5 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -329,7 +329,7 @@ void CHud::Draw() CFont::SetCentreOn(); CFont::SetCentreSize(SCREEN_SCALE_X(640.0f)); CFont::SetPropOn(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); if (!CDarkel::FrenzyOnGoing() && WeaponType != WEAPONTYPE_UNARMED && WeaponType != WEAPONTYPE_BASEBALLBAT) { CFont::SetColor(AMMO_COLOR); @@ -520,7 +520,7 @@ void CHud::Draw() CFont::SetRightJustifyOn(); CFont::SetRightJustifyWrap(0.0f); CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::SetColor(CRGBA(0, 0, 0, fZoneAlpha)); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(30.0f) + SCREEN_SCALE_Y(1.0f), m_ZoneToPrint); @@ -614,7 +614,7 @@ void CHud::Draw() CFont::SetRightJustifyOn(); CFont::SetRightJustifyWrap(0.0f); CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::SetColor(CRGBA(0, 0, 0, fVehicleAlpha)); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(55.0f) + SCREEN_SCALE_Y(1.0f), m_pVehicleNameToPrint); @@ -920,7 +920,7 @@ void CHud::Draw() CFont::SetScale(SCREEN_SCALE_X(0.48f), SCREEN_SCALE_Y(1.120f)); CFont::SetCentreOn(); CFont::SetPropOn(); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); float offsetX = SCREEN_SCALE_X(40.0f) + SCREEN_SCALE_X(8.0f); float center = SCREEN_SCALE_FROM_RIGHT(50.0f) - SCREEN_SCALE_X(8.0f) - offsetX; @@ -1123,7 +1123,7 @@ void CHud::DrawAfterFade() else #endif CFont::SetWrapx(SCREEN_SCALE_X(200.0f + 26.0f - 4.0f)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetBackgroundOn(); CFont::SetBackGroundOnlyTextOff(); CFont::SetBackgroundColor(CRGBA(0, 0, 0, fAlpha * 0.9f)); @@ -1201,7 +1201,7 @@ void CHud::DrawAfterFade() CFont::SetCentreOn(); CFont::SetPropOn(); CFont::SetCentreSize(SCREEN_SCALE_X(600.0f)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[3]); @@ -1218,7 +1218,7 @@ void CHud::DrawAfterFade() CFont::SetPropOn(); CFont::SetCentreSize(SCREEN_SCALE_X(620.0f)); CFont::SetColor(CRGBA(0, 0, 0, 255)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::PrintString((SCREEN_WIDTH / 2) - SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f) - SCREEN_SCALE_Y(2.0f), m_BigMessage[4]); @@ -1275,7 +1275,7 @@ void CHud::DrawAfterFade() CFont::SetPropOn(); CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f)); CFont::SetColor(CRGBA(0, 0, 0, 255)); - CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); + CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); #ifdef BETA_SLIDING_TEXT CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f) - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[5]); diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp index 7e08fbad..6a42f9d1 100644 --- a/src/render/SpecialFX.cpp +++ b/src/render/SpecialFX.cpp @@ -1049,7 +1049,7 @@ CMoneyMessage::Render() CFont::SetJustifyOff(); CFont::SetColor(CRGBA(m_Colour.r, m_Colour.g, m_Colour.b, (255.0f - 255.0f * fLifeTime) * m_fOpacity)); CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::PrintString(vecOut.x, vecOut.y, m_aText); } } diff --git a/src/rw/TexRead.cpp b/src/rw/TexRead.cpp index 122ce655..4087029b 100644 --- a/src/rw/TexRead.cpp +++ b/src/rw/TexRead.cpp @@ -233,7 +233,7 @@ ConvertingTexturesScreen(uint32 num, uint32 count, const char *text) CFont::SetJustifyOff(); CFont::SetColor(CRGBA(255, 217, 106, 255)); CFont::SetBackGroundOnlyTextOff(); - CFont::SetFontStyle(FONT_BANK); + CFont::SetFontStyle(FONT_STANDARD); CFont::PrintString(SCREEN_SCALE_X(170.0f), SCREEN_SCALE_Y(160.0f), TheText.Get(text)); CFont::DrawFonts(); DoRWStuffEndOfFrame();