summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-09-06 09:14:55 +0200
committerGitHub <noreply@github.com>2020-09-06 09:14:55 +0200
commit350b1ec67eb237ba57fc5717966ef27858e0e615 (patch)
treeecebf01aa109bc6ee1e924ddc3795f2a7318c036 /src/render
parentMore stinger fix (diff)
parentcheats, fixes, cosmetic changes (diff)
downloadre3-350b1ec67eb237ba57fc5717966ef27858e0e615.tar
re3-350b1ec67eb237ba57fc5717966ef27858e0e615.tar.gz
re3-350b1ec67eb237ba57fc5717966ef27858e0e615.tar.bz2
re3-350b1ec67eb237ba57fc5717966ef27858e0e615.tar.lz
re3-350b1ec67eb237ba57fc5717966ef27858e0e615.tar.xz
re3-350b1ec67eb237ba57fc5717966ef27858e0e615.tar.zst
re3-350b1ec67eb237ba57fc5717966ef27858e0e615.zip
Diffstat (limited to '')
-rw-r--r--src/render/Fluff.cpp6
-rw-r--r--src/render/Fluff.h2
-rw-r--r--src/render/Hud.cpp51
3 files changed, 55 insertions, 4 deletions
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
*/