diff options
author | aap <aap@papnet.eu> | 2019-06-20 11:28:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-20 11:28:04 +0200 |
commit | 109cde810c7b6115f864cf3e5005111c17284ab9 (patch) | |
tree | 052fc5a6c687983435f8d0b871b2d9abff31f747 /src/control | |
parent | finally finished CVehicleModelInfo (diff) | |
parent | Fix bug in templates.h, again. (diff) | |
download | re3-109cde810c7b6115f864cf3e5005111c17284ab9.tar re3-109cde810c7b6115f864cf3e5005111c17284ab9.tar.gz re3-109cde810c7b6115f864cf3e5005111c17284ab9.tar.bz2 re3-109cde810c7b6115f864cf3e5005111c17284ab9.tar.lz re3-109cde810c7b6115f864cf3e5005111c17284ab9.tar.xz re3-109cde810c7b6115f864cf3e5005111c17284ab9.tar.zst re3-109cde810c7b6115f864cf3e5005111c17284ab9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Garages.cpp | 16 | ||||
-rw-r--r-- | src/control/Script.cpp | 5 | ||||
-rw-r--r-- | src/control/Script.h | 6 |
3 files changed, 19 insertions, 8 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index b8469e5f..6f1ad028 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -68,40 +68,40 @@ CGarages::IsModelIndexADoor(uint32 id) void CGarages::PrintMessages() { if (CTimer::GetTimeInMilliseconds() > CGarages::MessageStartTime && CTimer::GetTimeInMilliseconds() < CGarages::MessageEndTime) { - CFont::SetScale(HUD_STRETCH_X(1.2f / 2), HUD_STRETCH_Y(1.5f / 2)); // BUG: game doesn't use macro here. + CFont::SetScale(SCREEN_SCALE_X(1.2f / 2), SCREEN_SCALE_Y(1.5f / 2)); // BUG: game doesn't use macro here. CFont::SetPropOn(); CFont::SetJustifyOff(); CFont::SetBackgroundOff(); - CFont::SetCentreSize(HUD_FROM_RIGHT(50.0f)); + CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f)); CFont::SetCentreOn(); CFont::SetFontStyle(FONT_BANK); if (CGarages::MessageNumberInString2 < 0) { if (CGarages::MessageNumberInString < 0) { CFont::SetColor(CRGBA(0, 0, 0, 255)); - CFont::PrintString((SCREEN_WIDTH/ 2) + HUD_STRETCH_X(2.0f), (SCREEN_HEIGHT / 2) + HUD_STRETCH_Y(-84.0f), TheText.Get(CGarages::MessageIDString)); + CFont::PrintString((SCREEN_WIDTH/ 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f), TheText.Get(CGarages::MessageIDString)); CFont::SetColor(CRGBA(89, 115, 150, 255)); - CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + HUD_STRETCH_Y(-84.0f), TheText.Get(CGarages::MessageIDString)); + CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f), TheText.Get(CGarages::MessageIDString)); } else { CMessages::InsertNumberInString(TheText.Get(CGarages::MessageIDString), CGarages::MessageNumberInString, -1, -1, -1, -1, -1, gUString); CFont::SetColor(CRGBA(0, 0, 0, 255)); - CFont::PrintString((SCREEN_WIDTH / 2) + HUD_STRETCH_X(2.0f), (SCREEN_HEIGHT / 2) + HUD_STRETCH_Y(-84.0f + 2.0 - 40.0f), gUString); + CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f + 2.0 - 40.0f), gUString); CFont::SetColor(CRGBA(89, 115, 150, 255)); - CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + HUD_STRETCH_Y(-84.0f - 40.0f), gUString); + CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f - 40.0f), gUString); } } else { CMessages::InsertNumberInString(TheText.Get(CGarages::MessageIDString), CGarages::MessageNumberInString2, -1, -1, -1, -1, -1, gUString); CFont::SetColor(CRGBA(0, 0, 0, 255)); - CFont::PrintString((SCREEN_WIDTH / 2) + HUD_STRETCH_X(2.0f), (SCREEN_HEIGHT / 2) + HUD_STRETCH_Y(-84.0f + 2.0 - 40.0f), gUString); + CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f + 2.0 - 40.0f), gUString); CFont::SetColor(CRGBA(89, 115, 150, 255)); - CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + HUD_STRETCH_Y(-84.0f - 40.0f), gUString); + CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f - 40.0f), gUString); } } }
\ No newline at end of file diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 7cea978f..153e98b5 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -7,3 +7,8 @@ uint8 *CTheScripts::ScriptSpace = (uint8*)0x74B248; CTextLine* CTheScripts::IntroTextLines = (CTextLine*)0x70EA74; CScriptRectangle* CTheScripts::IntroRectangles = (CScriptRectangle*)0x72D109; CSprite2d* CTheScripts::ScriptSprites = (CSprite2d*)0x72B090; +bool CTheScripts::DbgFlag = *(bool*)0x95CD87; +uint32 CTheScripts::OnAMissionFlag = *(uint32*)0x8F1B64; + +WRAPPER bool CTheScripts::IsPlayerOnAMission() { EAXJMP(0x439410); } +WRAPPER void CTheScripts::ScriptDebugLine3D(float x1, float y1, float z1, float x2, float y2, float z2, int col, int col2) { EAXJMP(0x4534E0); } diff --git a/src/control/Script.h b/src/control/Script.h index cdc33e97..1eb02c1b 100644 --- a/src/control/Script.h +++ b/src/control/Script.h @@ -39,4 +39,10 @@ public: static CTextLine* IntroTextLines; static CScriptRectangle* IntroRectangles; static CSprite2d* ScriptSprites; + static bool DbgFlag; + static uint32 OnAMissionFlag; + +public: + static bool IsPlayerOnAMission(); + static void ScriptDebugLine3D(float x1, float y1, float z1, float x2, float y2, float z2, int col, int col2); }; |