summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-07 21:55:54 +0200
committeraap <aap@papnet.eu>2020-05-07 21:55:54 +0200
commitc715569d1d52ebc2a99544a98bedbfdabf8fd3a7 (patch)
tree3040a6d3af78f844c430bcb10309d59da00f80bc /src/core
parentlittle script change (diff)
downloadre3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.gz
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.bz2
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.lz
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.xz
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.tar.zst
re3-c715569d1d52ebc2a99544a98bedbfdabf8fd3a7.zip
Diffstat (limited to '')
-rw-r--r--src/core/Zones.cpp1
-rw-r--r--src/core/config.h6
-rw-r--r--src/core/templates.h10
3 files changed, 13 insertions, 4 deletions
diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp
index 589ca2e3..f511bfc8 100644
--- a/src/core/Zones.cpp
+++ b/src/core/Zones.cpp
@@ -47,7 +47,6 @@ CTheZones::Init(void)
for(i = 0; i < NUMINFOZONES; i++)
memset(&InfoZoneArray[i], 0, sizeof(CZone));
- CZoneInfo *zonei;
int x = 1000/9;
for(i = 0; i < 2*NUMINFOZONES; i++){
// Cars
diff --git a/src/core/config.h b/src/core/config.h
index f4cc8b05..940d06db 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -13,13 +13,13 @@ enum Config {
EXTRADIRSIZE = 256,
CUTSCENEDIRSIZE = 512,
- SIMPLEMODELSIZE = 5000, // only 3885 in VC???
+ SIMPLEMODELSIZE = 3885,
TIMEMODELSIZE = 385,
CLUMPMODELSIZE = 5,
WEAPONMODELSIZE = 37,
PEDMODELSIZE = 130,
- VEHICLEMODELSIZE = 120, // only 110 in VC???
- TWODFXSIZE = 2000, // only 1210 in VC???
+ VEHICLEMODELSIZE = 110,
+ TWODFXSIZE = 1210,
MAXVEHICLESLOADED = 50, // 70 on mobile
diff --git a/src/core/templates.h b/src/core/templates.h
index 44ab566b..aa71fe5d 100644
--- a/src/core/templates.h
+++ b/src/core/templates.h
@@ -17,6 +17,16 @@ public:
void clear(void){
this->allocPtr = 0;
}
+ int getIndex(T *item){
+ assert(item >= &this->store[0]);
+ assert(item < &this->store[n]);
+ return item - this->store;
+ }
+ T *getItem(int index){
+ assert(index >= 0);
+ assert(index < n);
+ return &this->store[index];
+ }
};
template<typename T, typename U = T>