summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwithmorten <morten.with@gmail.com>2021-01-21 03:40:56 +0100
committerwithmorten <morten.with@gmail.com>2021-01-21 19:42:51 +0100
commit034df61f3c2757b28c082101fd0f38054263c0ed (patch)
tree24c3362300297f399149e903f29ba47b24b65303
parentMerge remote-tracking branch 'upstream/master' into cw (diff)
downloadre3-034df61f3c2757b28c082101fd0f38054263c0ed.tar
re3-034df61f3c2757b28c082101fd0f38054263c0ed.tar.gz
re3-034df61f3c2757b28c082101fd0f38054263c0ed.tar.bz2
re3-034df61f3c2757b28c082101fd0f38054263c0ed.tar.lz
re3-034df61f3c2757b28c082101fd0f38054263c0ed.tar.xz
re3-034df61f3c2757b28c082101fd0f38054263c0ed.tar.zst
re3-034df61f3c2757b28c082101fd0f38054263c0ed.zip
-rw-r--r--codewarrior/Debug/gta3.txt0
-rw-r--r--codewarrior/Release/gta3.txt0
-rw-r--r--codewarrior/re3.mcpbin228825 -> 228825 bytes
-rw-r--r--src/audio/AudioManager.h2
-rw-r--r--src/control/SceneEdit.cpp2
-rw-r--r--src/control/Script.cpp2
-rw-r--r--src/control/Script5.cpp10
-rw-r--r--src/core/Radar.cpp2
-rw-r--r--src/core/common.h10
-rw-r--r--src/core/config.h9
-rw-r--r--src/rw/MemoryHeap.h2
-rw-r--r--src/skel/crossplatform.h1
12 files changed, 18 insertions, 22 deletions
diff --git a/codewarrior/Debug/gta3.txt b/codewarrior/Debug/gta3.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/codewarrior/Debug/gta3.txt
diff --git a/codewarrior/Release/gta3.txt b/codewarrior/Release/gta3.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/codewarrior/Release/gta3.txt
diff --git a/codewarrior/re3.mcp b/codewarrior/re3.mcp
index 93c280f1..9b9cee79 100644
--- a/codewarrior/re3.mcp
+++ b/codewarrior/re3.mcp
Binary files differ
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 57ed0fb7..2f86ee98 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -499,7 +499,7 @@ public:
};
#ifdef AUDIO_MSS
-re3_static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
+static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
#endif
extern cAudioManager AudioManager;
diff --git a/src/control/SceneEdit.cpp b/src/control/SceneEdit.cpp
index 0a679ab5..42dadee0 100644
--- a/src/control/SceneEdit.cpp
+++ b/src/control/SceneEdit.cpp
@@ -69,7 +69,7 @@ static const char* pCommandStrings[] = {
};
#ifdef CHECK_STRUCT_SIZES
-re3_static_assert(ARRAY_SIZE(pCommandStrings) == CSceneEdit::MOVIE_TOTAL_COMMANDS, "Scene edit: not all commands have names");
+static_assert(ARRAY_SIZE(pCommandStrings) == CSceneEdit::MOVIE_TOTAL_COMMANDS, "Scene edit: not all commands have names");
#endif
static int32 NextValidModelId(int32 mi, int32 step)
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index fe8bbdfe..09a696cf 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -1282,7 +1282,7 @@ const tScriptCommandData commands[] = {
#undef INPUT_ARGUMENTS
#undef OUTPUT_ARGUMENTS
-re3_static_assert(ARRAY_SIZE(commands) == LAST_SCRIPT_COMMAND, "commands array not filled");
+static_assert(ARRAY_SIZE(commands) == LAST_SCRIPT_COMMAND, "commands array not filled");
#if SCRIPT_LOG_FILE_LEVEL == 1 || SCRIPT_LOG_FILE_LEVEL == 2
static FILE* dbg_log;
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp
index 56164075..b54d425c 100644
--- a/src/control/Script5.cpp
+++ b/src/control/Script5.cpp
@@ -1924,7 +1924,7 @@ INITSAVEBUF
for (uint32 i = 0; i < varSpace; i++)
WriteSaveBuf(buf, ScriptSpace[i]);
#ifdef CHECK_STRUCT_SIZES
- re3_static_assert(SCRIPT_DATA_SIZE == 968, "CTheScripts::SaveAllScripts");
+ static_assert(SCRIPT_DATA_SIZE == 968, "CTheScripts::SaveAllScripts");
#endif
uint32 script_data_size = SCRIPT_DATA_SIZE;
WriteSaveBuf(buf, script_data_size);
@@ -2083,14 +2083,14 @@ void CRunningScript::Save(uint8*& buf)
WriteSaveBuf<char>(buf, m_abScriptName[i]);
WriteSaveBuf<uint32>(buf, m_nIp);
#ifdef CHECK_STRUCT_SIZES
- re3_static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
+ static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
#endif
for (int i = 0; i < MAX_STACK_DEPTH; i++)
WriteSaveBuf<uint32>(buf, m_anStack[i]);
WriteSaveBuf<uint16>(buf, m_nStackPointer);
SkipSaveBuf(buf, 2);
#ifdef CHECK_STRUCT_SIZES
- re3_static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
+ static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
#endif
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
WriteSaveBuf<int32>(buf, m_anLocalVariables[i]);
@@ -2118,14 +2118,14 @@ void CRunningScript::Load(uint8*& buf)
m_abScriptName[i] = ReadSaveBuf<char>(buf);
m_nIp = ReadSaveBuf<uint32>(buf);
#ifdef CHECK_STRUCT_SIZES
- re3_static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
+ static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
#endif
for (int i = 0; i < MAX_STACK_DEPTH; i++)
m_anStack[i] = ReadSaveBuf<uint32>(buf);
m_nStackPointer = ReadSaveBuf<uint16>(buf);
SkipSaveBuf(buf, 2);
#ifdef CHECK_STRUCT_SIZES
- re3_static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
+ static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
#endif
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
m_anLocalVariables[i] = ReadSaveBuf<int32>(buf);
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 99ad7d0b..116e9e94 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -79,7 +79,7 @@ CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = {
#define RADAR_NUM_TILES (8)
#define RADAR_TILE_SIZE (RADAR_SIZE_X / RADAR_NUM_TILES)
-re3_static_assert(RADAR_TILE_SIZE == (RADAR_SIZE_Y / RADAR_NUM_TILES), "CRadar: not a square");
+static_assert(RADAR_TILE_SIZE == (RADAR_SIZE_Y / RADAR_NUM_TILES), "CRadar: not a square");
#define RADAR_MIN_RANGE (120.0f)
#define RADAR_MAX_RANGE (350.0f)
diff --git a/src/core/common.h b/src/core/common.h
index d3b0daa9..84440968 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -357,21 +357,19 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
#endif
#define ASSERT assert
-#if defined DEBUG && !defined __MWERKS__
-#define re3_static_assert(bool_constexpr, message) static_assert(bool_constexpr, message)
-#else
-#define re3_static_assert(bool_constexpr, message)
+#ifdef __MWERKS__
+#define static_assert(bool_constexpr, message)
#endif
#define _TODO(x)
#define _TODOCONST(x) (x)
#ifdef CHECK_STRUCT_SIZES
-#define VALIDATE_SIZE(struc, size) re3_static_assert(sizeof(struc) == size, "Invalid structure size of " #struc)
+#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc)
#else
#define VALIDATE_SIZE(struc, size)
#endif
-#define VALIDATE_OFFSET(struc, member, offset) re3_static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...")
+#define VALIDATE_OFFSET(struc, member, offset) static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...")
#define PERCENT(x, p) ((float(x) * (float(p) / 100.0f)))
#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
diff --git a/src/core/config.h b/src/core/config.h
index e71c34a8..35130024 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -1,7 +1,7 @@
#pragma once
-// disable (most) stuff that wasn't in original gta3.exe - check section at the bottom of this file
-#define VANILLA_DEFINES
+// disables (most) stuff that wasn't in original gta3.exe - check section at the bottom of this file
+//#define VANILLA_DEFINES
enum Config {
NUMPLAYERS = 1, // 4 on PS2
@@ -243,7 +243,7 @@ enum Config {
#define ASCII_STRCMP // use faster ascii str comparisons
-#if !defined _WIN32 || defined __MWERKS__ || defined __MINGW32__
+#if !defined _WIN32 || defined __MWERKS__ || defined __MINGW32__ || defined VANILLA_DEFINES
#undef ASCII_STRCMP
#endif
@@ -429,7 +429,6 @@ enum Config {
#undef FIX_BUGS
#undef THIS_IS_STUPID
#undef MORE_LANGUAGES
-#undef MORE_LANGUAGES
#undef COMPATIBLE_SAVES
#undef LOAD_INI_SETTINGS
@@ -471,7 +470,7 @@ enum Config {
#undef INVERT_LOOK_FOR_PAD
#undef USE_DEBUG_SCRIPT_LOADER
-#undef USE_MEASUREMENTS_IN_METERS // TODO
+#undef USE_MEASUREMENTS_IN_METERS
#undef USE_PRECISE_MEASUREMENT_CONVERTION
#undef MISSION_REPLAY
#undef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
diff --git a/src/rw/MemoryHeap.h b/src/rw/MemoryHeap.h
index ed2e83b6..cd8cf22c 100644
--- a/src/rw/MemoryHeap.h
+++ b/src/rw/MemoryHeap.h
@@ -95,7 +95,7 @@ struct HeapBlockDesc
#ifdef USE_CUSTOM_ALLOCATOR
// TODO: figure something out for 64 bit pointers
-re3_static_assert(sizeof(HeapBlockDesc) == 0x10, "HeapBlockDesc must have 0x10 size otherwise most of assumptions don't make sense");
+static_assert(sizeof(HeapBlockDesc) == 0x10, "HeapBlockDesc must have 0x10 size otherwise most of assumptions don't make sense");
#endif
struct HeapBlockList
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h
index b4e6a751..e9a94cf4 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -118,7 +118,6 @@ struct SYSTEMTIME {
void GetLocalTime_CP(SYSTEMTIME* out);
#define GetLocalTime GetLocalTime_CP
-
#define OutputDebugString(s) re3_debug("[DBG-2]: %s\n",s)
#endif