From a38702a7d233fbadb4dfbbf250e7e5653dad3eed Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Thu, 27 Aug 2020 19:52:43 +0300 Subject: weapons --- src/render/Glass.h | 1 + src/render/SpecialFX.cpp | 1 + src/render/SpecialFX.h | 5 +++++ 3 files changed, 7 insertions(+) (limited to 'src/render') diff --git a/src/render/Glass.h b/src/render/Glass.h index 736e5205..937ab6a9 100644 --- a/src/render/Glass.h +++ b/src/render/Glass.h @@ -53,4 +53,5 @@ public: //TODO(MIAMI) static void CarWindscreenShatters(CVehicle *vehicle, bool unk) {} + static void BreakGlassPhysically(CVector, float) {} }; \ No newline at end of file diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp index 4133e2fb..3bc99a4d 100644 --- a/src/render/SpecialFX.cpp +++ b/src/render/SpecialFX.cpp @@ -29,6 +29,7 @@ RwIm3DVertex TraceVertices[6]; RwImVertexIndex TraceIndexList[12]; bool CSpecialFX::bSnapShotActive; +int32 CSpecialFX::SnapShotFrames; void CSpecialFX::Init(void) diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index 7bc3750a..3255c9c1 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -4,6 +4,7 @@ class CSpecialFX { public: static bool bSnapShotActive; + static int32 SnapShotFrames; static void Render(void); static void Update(void); @@ -56,6 +57,10 @@ public: static void AddTrace(CVector*, CVector*); static void Render(void); static void Update(void); + +//TODO(MIAMI) + static void AddTrace(CVector *, CVector *, float, unsigned int, unsigned char) {} + static void AddTrace(CVector *, CVector *, int32 weapontype, class CEntity *shooter) {} }; enum -- cgit v1.2.3 From 210c7b8785779a621f608540571513efcca1021a Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Thu, 27 Aug 2020 20:27:28 +0300 Subject: bike shooting fix + trace temp fix --- src/render/SpecialFX.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/render') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index 3255c9c1..55ad6cb9 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -60,7 +60,10 @@ public: //TODO(MIAMI) static void AddTrace(CVector *, CVector *, float, unsigned int, unsigned char) {} - static void AddTrace(CVector *, CVector *, int32 weapontype, class CEntity *shooter) {} + static void AddTrace(CVector *a, CVector *b, int32 weapontype, class CEntity *shooter) + { + AddTrace(a, b); //TODO: temp + } }; enum -- cgit v1.2.3 From 9f43b1988ba44a3704d4e9dbed21d48014694c95 Mon Sep 17 00:00:00 2001 From: majestic Date: Sun, 30 Aug 2020 13:47:12 -0700 Subject: cheats, fixes, cosmetic changes --- src/render/Fluff.cpp | 6 +++--- src/render/Fluff.h | 2 +- src/render/Hud.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 4 deletions(-) (limited to 'src/render') diff --git a/src/render/Fluff.cpp b/src/render/Fluff.cpp index 77d2af2a..31bf92a8 100644 --- a/src/render/Fluff.cpp +++ b/src/render/Fluff.cpp @@ -1611,13 +1611,13 @@ void CScriptPath::Clear(void) { m_state = SCRIPT_PATH_DISABLED; } -void CScriptPath::InitialiseOne(int32 numNodes, float width) { +void CScriptPath::InitialiseOne(int32 numNodes, float length) { char Dest[32]; sprintf(Dest, "data\\paths\\spath%d.dat", numNodes); m_pNode = CPlane::LoadPath(Dest, m_numNodes, m_fTotalLength, false); m_fSpeed = 1.0f; m_fPosition = 0.0f; - m_fObjectLength = width; + m_fObjectLength = length; m_state = SCRIPT_PATH_INITIALIZED; } @@ -1697,7 +1697,7 @@ INITSAVEBUF VALIDATESAVEBUF(*size); } -CObject* g_pScriptPathObjects[18]; +CObject *g_pScriptPathObjects[18]; void CScriptPaths::Load_ForReplay(void) { for (int i = 0; i < 3; i++) { diff --git a/src/render/Fluff.h b/src/render/Fluff.h index a31ac335..0fc57c73 100644 --- a/src/render/Fluff.h +++ b/src/render/Fluff.h @@ -24,7 +24,7 @@ public: void Clear(void); void Update(void); - void InitialiseOne(int32 numNodes, float width); + void InitialiseOne(int32 numNodes, float length); void FindCoorsFromDistanceOnPath(float t, float *pX, float *pY, float *pZ); void SetObjectToControl(CObject *pObj); }; diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index cbf3c7f2..c05a3d31 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -21,6 +21,8 @@ #include "User.h" #include "World.h" #include "CutsceneMgr.h" +#include "Stats.h" +#include "main.h" // Game has colors inlined in code. // For easier modification we collect them here: @@ -91,6 +93,8 @@ float CHud::PagerXOffset; int16 CHud::PagerTimer; int16 CHud::PagerOn; +wchar *prevChaseString; + uint32 CHud::m_WantedFadeTimer; uint32 CHud::m_WantedState; uint32 CHud::m_WantedTimer; @@ -524,6 +528,53 @@ void CHud::Draw() } } + static int32 nMediaLevelCounter = 0; + if (CStats::ShowChaseStatOnScreen != 0) { + float fCurAttentionLevel = CWorld::Players[CWorld::PlayerInFocus].m_fMediaAttention; + if (0.7f * CStats::HighestChaseValue > fCurAttentionLevel + || fCurAttentionLevel <= 40.0f || CTheScripts::IsPlayerOnAMission()) { + nMediaLevelCounter = 0; + } + else { + if (fCurAttentionLevel == CStats::HighestChaseValue) { + sprintf(gString, "%s %d", UnicodeToAscii(TheText.Get("CHSE")), (int32)fCurAttentionLevel); + } + else { + sprintf(gString, "%s %d" "-%d-", UnicodeToAscii(TheText.Get("CHSE")), (int32)fCurAttentionLevel, (int32)CStats::HighestChaseValue); + } + AsciiToUnicode(gString, gUString); + CFont::SetBackgroundOff(); + CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y)); + CFont::SetCentreOff(); + CFont::SetRightJustifyOn(); + CFont::SetRightJustifyWrap(0.0f); + CFont::SetBackGroundOnlyTextOff(); + CFont::SetFontStyle(FONT_HEADING); + CFont::SetPropOff(); + CFont::SetDropShadowPosition(2); + CFont::SetDropColor(CRGBA(0, 0, 0, 255)); + + CRGBA colour; + if (CTimer::GetTimeInMilliseconds() & 0x200) + colour = CRGBA(204, 0, 185, 180); + else + colour = CRGBA(178, 0, 162, 180); + CFont::SetColor(colour); + CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f), SCREEN_SCALE_Y(113.0f), gUString); + + if (CStats::FindChaseString(fCurAttentionLevel) != prevChaseString) { + prevChaseString = CStats::FindChaseString(fCurAttentionLevel); + nMediaLevelCounter = 100; + } + + if (nMediaLevelCounter != 0) { + nMediaLevelCounter--; + UnicodeMakeUpperCase(gUString, CStats::FindChaseString(fCurAttentionLevel)); + CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f), SCREEN_SCALE_Y(138.0f), gUString); + } + } + } + /* DrawZoneName */ -- cgit v1.2.3