summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-06-12 11:08:56 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-06-12 11:08:56 +0200
commitbcf44d361df48ad973e77078cfe9884abc9fa60c (patch)
tree8cc827e273852762f48775533d451edb9228def1
parentRE more stuff from COnscreenTimer (diff)
downloadre3-bcf44d361df48ad973e77078cfe9884abc9fa60c.tar
re3-bcf44d361df48ad973e77078cfe9884abc9fa60c.tar.gz
re3-bcf44d361df48ad973e77078cfe9884abc9fa60c.tar.bz2
re3-bcf44d361df48ad973e77078cfe9884abc9fa60c.tar.lz
re3-bcf44d361df48ad973e77078cfe9884abc9fa60c.tar.xz
re3-bcf44d361df48ad973e77078cfe9884abc9fa60c.tar.zst
re3-bcf44d361df48ad973e77078cfe9884abc9fa60c.zip
-rw-r--r--src/User.cpp14
-rw-r--r--src/User.h2
-rw-r--r--src/config.h21
3 files changed, 19 insertions, 18 deletions
diff --git a/src/User.cpp b/src/User.cpp
index 21bd2ccf..c36f62eb 100644
--- a/src/User.cpp
+++ b/src/User.cpp
@@ -16,7 +16,7 @@ char* CTheScripts::ScriptSpace = (char*)0x74B248;
int COnscreenTimer::Init() {
m_bDisabled = false;
- for(uint32 i = 0; i < 1; i++) {
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
m_sEntries[i].m_nTimerOffset = 0;
m_sEntries[i].m_nCounterOffset = 0;
@@ -34,7 +34,7 @@ int COnscreenTimer::Init() {
void COnscreenTimer::Process() {
if(CReplay::Mode != 1 && !m_bDisabled) {
- for(uint32 i = 0; i < 1; i++) {
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
m_sEntries[i].Process();
}
}
@@ -43,7 +43,7 @@ void COnscreenTimer::Process() {
void COnscreenTimer::ProcessForDisplay() {
if(CHud::m_Wants_To_Draw_Hud) {
m_bProcessed = false;
- for(uint32 i = 0; i < 1; i++) {
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
if(m_sEntries[i].ProcessForDisplay()) {
m_bProcessed = true;
}
@@ -52,7 +52,7 @@ void COnscreenTimer::ProcessForDisplay() {
}
void COnscreenTimer::ClearCounter(uint32 offset) {
- for(uint32 i = 0; i < 1; i++) {
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
if(offset == m_sEntries[i].m_nCounterOffset) {
m_sEntries[i].m_nCounterOffset = 0;
m_sEntries[i].m_aCounterText[0] = 0;
@@ -63,7 +63,7 @@ void COnscreenTimer::ClearCounter(uint32 offset) {
}
void COnscreenTimer::ClearClock(uint32 offset) {
- for(uint32 i = 0; i < 1; i++) {
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
if(offset == m_sEntries[i].m_nTimerOffset) {
m_sEntries[i].m_nTimerOffset = 0;
m_sEntries[i].m_aTimerText[0] = 0;
@@ -74,7 +74,7 @@ void COnscreenTimer::ClearClock(uint32 offset) {
void COnscreenTimer::AddCounter(uint32 offset, uint16 type, char* text) {
uint32 i = 0;
- for(uint32 i = 0; i < 1; i++) {
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
if(m_sEntries[i].m_nCounterOffset == 0) {
break;
}
@@ -93,7 +93,7 @@ void COnscreenTimer::AddCounter(uint32 offset, uint16 type, char* text) {
void COnscreenTimer::AddClock(uint32 offset, char* text) {
uint32 i = 0;
- for(uint32 i = 0; i < 1; i++) {
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
if(m_sEntries[i].m_nTimerOffset == 0) {
break;
}
diff --git a/src/User.h b/src/User.h
index 3b88de56..b2d0b053 100644
--- a/src/User.h
+++ b/src/User.h
@@ -32,7 +32,7 @@ public:
class COnscreenTimer
{
public:
- COnscreenTimerEntry m_sEntries[1];
+ COnscreenTimerEntry m_sEntries[NUMONSCREENTIMERENTRIES];
bool m_bProcessed;
bool m_bDisabled;
char field_119[2];
diff --git a/src/config.h b/src/config.h
index bf3f6572..8ef51871 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,7 +1,7 @@
#pragma once
enum Config {
- NUMCDIMAGES = 50, // was 12
+ NUMCDIMAGES = 50, // was 12
MODELINFOSIZE = 5500,
TXDSTORESIZE = 850,
@@ -14,17 +14,17 @@ enum Config {
VEHICLEMODELSIZE = 120,
TWODFXSIZE = 2000,
- NUMOBJECTINFO = 168, // object.dat
+ NUMOBJECTINFO = 168, // object.dat
// Pool sizes
- NUMPTRNODES = 30000, // 26000 on PS2
- NUMENTRYINFOS = 5400, // 3200 on PS2
- NUMPEDS = 140, // 90 on PS2
- NUMVEHICLES = 110, // 70 on PS2
- NUMBUILDINGS = 5500, // 4915 on PS2
+ NUMPTRNODES = 30000, // 26000 on PS2
+ NUMENTRYINFOS = 5400, // 3200 on PS2
+ NUMPEDS = 140, // 90 on PS2
+ NUMVEHICLES = 110, // 70 on PS2
+ NUMBUILDINGS = 5500, // 4915 on PS2
NUMTREADABLES = 1214,
NUMOBJECTS = 450,
- NUMDUMMIES = 2802, // 2368 on PS2
+ NUMDUMMIES = 2802, // 2368 on PS2
NUMAUDIOSCRIPTOBJECTS = 256,
// Link list lengths
@@ -42,7 +42,6 @@ enum Config {
NUMATTRIBZONES = 288,
NUMZONEINDICES = 55000,
-
NUMPEDSTATS = 35,
NUMHANDLINGS = 57,
@@ -54,7 +53,9 @@ enum Config {
NUMEXTRADIRECTIONALS = 4,
NUMANTENNAS = 8,
NUMCORONAS = 56,
- NUMPOINTLIGHTS = 32
+ NUMPOINTLIGHTS = 32,
+
+ NUMONSCREENTIMERENTRIES = 1
};
#define GTA3_1_1_PATCH