summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/render/Fluff.cpp6
-rw-r--r--src/render/Fluff.h2
-rw-r--r--src/render/Glass.h1
-rw-r--r--src/render/Hud.cpp51
-rw-r--r--src/render/SpecialFX.cpp1
-rw-r--r--src/render/SpecialFX.h8
6 files changed, 65 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/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/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
*/
diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp
index e9079bef..fa8379f0 100644
--- a/src/render/SpecialFX.cpp
+++ b/src/render/SpecialFX.cpp
@@ -32,6 +32,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 8c79856b..8bd0d5e1 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,13 @@ 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 *a, CVector *b, int32 weapontype, class CEntity *shooter)
+ {
+ AddTrace(a, b); //TODO: temp
+ }
};
enum