From ac0f759b274368b9424222a392d9f28b73980eb0 Mon Sep 17 00:00:00 2001 From: withmorten Date: Tue, 19 Jan 2021 13:35:48 +0100 Subject: [PATCH] make building with Codewarrior 7 possible --- .gitignore | 6 +- codewarrior/re3.mcp | Bin 0 -> 228825 bytes src/animation/AnimBlendAssocGroup.cpp | 18 +- src/audio/AudioLogic.cpp | 4 +- src/audio/AudioManager.cpp | 4 +- src/audio/AudioManager.h | 2 +- src/audio/PoliceRadio.cpp | 2 +- src/audio/sampman_miles.cpp | 2 +- src/control/Pickups.h | 2 +- src/control/RoadBlocks.cpp | 4 +- src/control/SceneEdit.cpp | 6 +- src/control/Script.cpp | 2 +- src/control/Script.h | 300 +++++++++++++------------- src/control/Script5.cpp | 14 +- src/core/Cam.cpp | 2 +- src/core/CdStream.cpp | 11 +- src/core/Frontend.cpp | 2 + src/core/General.h | 2 +- src/core/Placeable.cpp | 4 +- src/core/Placeable.h | 2 +- src/core/Radar.cpp | 12 +- src/core/Stats.h | 2 +- src/core/common.h | 61 +++++- src/core/config.h | 97 ++++++++- src/core/main.cpp | 21 +- src/core/re3.cpp | 12 ++ src/entities/Physical.cpp | 10 +- src/peds/PlayerPed.cpp | 2 +- src/peds/Population.cpp | 44 ++-- src/peds/Population.h | 10 +- src/render/Font.h | 2 + src/render/Glass.cpp | 2 +- src/render/Hud.cpp | 8 +- src/render/Instance.h | 2 +- src/render/SpecialFX.cpp | 2 +- src/rw/MemoryHeap.h | 2 +- src/save/GenericGameStorage.h | 1 + src/skel/crossplatform.h | 7 +- src/skel/win/win.cpp | 6 +- src/vehicles/Automobile.cpp | 2 +- src/weapons/WeaponInfo.cpp | 50 ++--- src/weapons/WeaponInfo.h | 1 - 42 files changed, 471 insertions(+), 274 deletions(-) create mode 100644 codewarrior/re3.mcp diff --git a/.gitignore b/.gitignore index 971fb957..44d3eb0b 100644 --- a/.gitignore +++ b/.gitignore @@ -353,4 +353,8 @@ vendor/glew-2.1.0/ vendor/glfw-3.3.2.bin.WIN32/ vendor/glfw-3.3.2.bin.WIN64/ -sdk/ \ No newline at end of file +sdk/ + +codewarrior/re3_Data/ +codewarrior/Release/ +codewarrior/Debug/ diff --git a/codewarrior/re3.mcp b/codewarrior/re3.mcp new file mode 100644 index 0000000000000000000000000000000000000000..93c280f1f999c176522e8bb56d480403cc46b5dd GIT binary patch literal 228825 zcmeF42VfM{)_^C4DhLQD_8?s#R51cVLJ}a<5P~40up~>ekYwZThN36|R8Ub-0YOng zz%F91AlSf;ii%xq*n7ds|DBmLyR*w~f=~aaPj>XfW7{c)bNlhGDc# zFpQr{lZ@uxB;(%w4dY7E5|fho*BUath3?TVpU>mn(ufnO| z0~wmL-DKOff=2oa5G#0&%v{>5Vpc1*bR?BZ9dZo9>pJr$KVz?fV9T2 z7+(VGp&{dIiA{*N5~Z@&5ta!6oVuOwatl~AAYxx};JY`7X`!PD>*%z-gn9)yD!Ur9WacnvX$xQcif@o-p;uYqf!9^*&Cb$AWpY~s043qOz8 zfVhqL3Y-rMpfNOorf?u6LoKKcb>JXKf|{^D><4wB9yEi4;Q*)s^`QYYghtQ-IzlRR zfnH2=A8sK>bxA4F2Yd5K?OKD@ zG$FKwM(@oQO4$1?6r35elvZYLV0$|TCvL~y2C0i?iALhTWxKK}R#orSzrpGtccRfS z&+YeC_zK*)KKCTg^wi?iJ$4pHso`}irw6k%Yh%|Pm79}VZWiPCh(oP8lR0d0Ym+0i zOjc1e7Tt)oG1;1uLsCO$oA71PvdI<7;h6P4s!}Vptjd!b{d2?k@&16z7x;69{FzTz zzXr92R|HZgddgzWCEhkdHS_Ok8*)hbW5>ZzO<2c_{j=N?D~iSy1zg=y-P7It@5~{d zZe}#w5dTQ5zD3ICoI_^r$kFzBNJ==6)BN5Xg`H){e9fh>6J;^v=EPhcxl^m*O7&L! zi9NM1Lq=}ykV;D4D7Q_2a**=uB1Rbt6Y3l>1+~Ka>S5)F}6oa%Uv>fwCRsep8~{OG{^ zBjL3nD{H3&g#@V+9oR1IaBD<6>PJW5L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JUmpTESk7U1UDo^c{{wrSqbL9X literal 0 HcmV?d00001 diff --git a/src/animation/AnimBlendAssocGroup.cpp b/src/animation/AnimBlendAssocGroup.cpp index 1d234bb8..295d6be3 100644 --- a/src/animation/AnimBlendAssocGroup.cpp +++ b/src/animation/AnimBlendAssocGroup.cpp @@ -1,7 +1,11 @@ #include "common.h" #if defined _WIN32 && !defined __MINGW32__ +#if defined __MWERKS__ +#include +#else #include "ctype.h" +#endif #else #include #endif @@ -83,18 +87,18 @@ strcmpIgnoringDigits(const char *s1, const char *s2) if(c1) s1++; if(c2) s2++; if(c1 == '\0' && c2 == '\0') return true; -#if defined _WIN32 && !defined __MINGW32__ - if(__ascii_iswdigit(c1) && __ascii_iswdigit(c2)) -#else +#ifndef ASCII_STRCMP if(iswdigit(c1) && iswdigit(c2)) +#else + if(__ascii_iswdigit(c1) && __ascii_iswdigit(c2)) #endif continue; -#if defined _WIN32 && !defined __MINGW32__ - c1 = __ascii_toupper(c1); - c2 = __ascii_toupper(c2); -#else +#ifndef ASCII_STRCMP c1 = toupper(c1); c2 = toupper(c2); +#else + c1 = __ascii_toupper(c1); + c2 = __ascii_toupper(c2); #endif if(c1 != c2) diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 777fdfe4..eab14ce6 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "common.h" #include "AudioManager.h" #include "audio_enums.h" @@ -38,7 +38,7 @@ #include "ZoneCull.h" #include "sampman.h" -const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples); +const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples); const int policeChannel = channels + 1; const int allChannels = channels + 2; diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index e1b5be1d..f61350fb 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -13,7 +13,7 @@ cAudioManager AudioManager; -const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples); +const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples); const int policeChannel = channels + 1; const int allChannels = channels + 2; @@ -948,7 +948,7 @@ cAudioManager::ClearActiveSamples() m_asActiveSamples[i].m_nCalculatedVolume = 0; m_asActiveSamples[i].m_nReleasingVolumeDivider = 0; m_asActiveSamples[i].m_nVolumeChange = -1; - m_asActiveSamples[i].m_vecPos = {0.0f, 0.0f, 0.0f}; + m_asActiveSamples[i].m_vecPos = CVector(0.0f, 0.0f, 0.0f); m_asActiveSamples[i].m_bReverbFlag = false; m_asActiveSamples[i].m_nLoopsRemaining = 0; m_asActiveSamples[i].m_bRequireReflection = false; diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 2f86ee98..57ed0fb7 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -499,7 +499,7 @@ public: }; #ifdef AUDIO_MSS -static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error"); +re3_static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error"); #endif extern cAudioManager AudioManager; diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PoliceRadio.cpp index 94143746..7021b5be 100644 --- a/src/audio/PoliceRadio.cpp +++ b/src/audio/PoliceRadio.cpp @@ -15,7 +15,7 @@ #include "sampman.h" #include "Wanted.h" -const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples); +const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples); const int policeChannel = channels + 1; struct tPoliceRadioZone { diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 82886c66..eccc9114 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -1,4 +1,4 @@ -#ifdef AUDIO_MSS +#if defined(AUDIO_MSS) || defined (__MWERKS__) #include #include diff --git a/src/control/Pickups.h b/src/control/Pickups.h index 72a37d99..4e1c7643 100644 --- a/src/control/Pickups.h +++ b/src/control/Pickups.h @@ -120,7 +120,7 @@ public: class CPacManPickups { - friend CPacManPickup; + friend class CPacManPickup; static CPacManPickup aPMPickUps[NUMPACMANPICKUPS]; static CVector LastPickUpCoors; diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp index 170c5ff8..3ec34a57 100644 --- a/src/control/RoadBlocks.cpp +++ b/src/control/RoadBlocks.cpp @@ -46,8 +46,8 @@ CRoadBlocks::Init(void) void CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType, int16 roadBlockNode) { - static const CVector vecRoadBlockOffets[6] = { {-1.5, 1.8f, 0.0f}, {-1.5f, -1.8f, 0.0f}, {1.5f, 1.8f, 0.0f}, - {1.5f, -1.8f, 0.0f}, {-1.5f, 0.0f, 0.0f}, {1.5, 0.0, 0.0} }; + static const CVector vecRoadBlockOffets[6] = { CVector(-1.5, 1.8f, 0.0f), CVector(-1.5f, -1.8f, 0.0f), CVector(1.5f, 1.8f, 0.0f), + CVector(1.5f, -1.8f, 0.0f), CVector(-1.5f, 0.0f, 0.0f), CVector(1.5, 0.0, 0.0) }; CEntity* pEntityToAttack = (CEntity*)FindPlayerVehicle(); if (!pEntityToAttack) pEntityToAttack = (CEntity*)FindPlayerPed(); diff --git a/src/control/SceneEdit.cpp b/src/control/SceneEdit.cpp index b7623133..0a679ab5 100644 --- a/src/control/SceneEdit.cpp +++ b/src/control/SceneEdit.cpp @@ -69,7 +69,7 @@ static const char* pCommandStrings[] = { }; #ifdef CHECK_STRUCT_SIZES -static_assert(ARRAY_SIZE(pCommandStrings) == CSceneEdit::MOVIE_TOTAL_COMMANDS, "Scene edit: not all commands have names"); +re3_static_assert(ARRAY_SIZE(pCommandStrings) == CSceneEdit::MOVIE_TOTAL_COMMANDS, "Scene edit: not all commands have names"); #endif static int32 NextValidModelId(int32 mi, int32 step) @@ -329,7 +329,7 @@ void CSceneEdit::Draw(void) #ifdef FIX_BUGS CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(COMMAND_NAME_X_RIGHT - SHADOW_OFFSET), SCREEN_SCALE_Y(COMMAND_NAME_Y + SHADOW_OFFSET + i * COMMAND_NAME_HEIGHT), wstr); #else - CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH-COMMAND_NAME_X_RIGHT) + SHADOW_OFFSET, SCREEN_SCALE_FROM_BOTTOM(DEFAULT_SCREEN_HEIGHT-COMMAND_NAME_Y) + SHADOW_OFFSET + i * COMMAND_NAME_HEIGHT), wstr); + CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH-COMMAND_NAME_X_RIGHT) + SHADOW_OFFSET, SCREEN_SCALE_FROM_BOTTOM(DEFAULT_SCREEN_HEIGHT-COMMAND_NAME_Y) + SHADOW_OFFSET + i * COMMAND_NAME_HEIGHT, wstr); #endif if (nCommandDrawn == m_nCurrentCommand) CFont::SetColor(CRGBA(156, 91, 40, 255)); @@ -338,7 +338,7 @@ void CSceneEdit::Draw(void) #ifdef FIX_BUGS CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(COMMAND_NAME_X_RIGHT), SCREEN_SCALE_Y(COMMAND_NAME_Y + i * COMMAND_NAME_HEIGHT), wstr); #else - CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH-COMMAND_NAME_X_RIGHT), SCREEN_SCALE_FROM_BOTTOM(DEFAULT_SCREEN_HEIGHT-COMMAND_NAME_Y) + i * COMMAND_NAME_HEIGHT), wstr); + CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH-COMMAND_NAME_X_RIGHT), SCREEN_SCALE_FROM_BOTTOM(DEFAULT_SCREEN_HEIGHT-COMMAND_NAME_Y) + i * COMMAND_NAME_HEIGHT, wstr); #endif } } diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 09a696cf..fe8bbdfe 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -1282,7 +1282,7 @@ const tScriptCommandData commands[] = { #undef INPUT_ARGUMENTS #undef OUTPUT_ARGUMENTS -static_assert(ARRAY_SIZE(commands) == LAST_SCRIPT_COMMAND, "commands array not filled"); +re3_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/Script.h b/src/control/Script.h index ff1a9706..5682024b 100644 --- a/src/control/Script.h +++ b/src/control/Script.h @@ -247,6 +247,156 @@ struct tBuildingSwap }; +enum { +#if GTA_VERSION > GTA3_PS2_160 + MAX_STACK_DEPTH = 6, +#else + MAX_STACK_DEPTH = 4, +#endif + NUM_LOCAL_VARS = 16, + NUM_TIMERS = 2 +}; + +class CRunningScript +{ + enum { + ANDOR_NONE = 0, + ANDS_1 = 1, + ANDS_2, + ANDS_3, + ANDS_4, + ANDS_5, + ANDS_6, + ANDS_7, + ANDS_8, + ORS_1 = 21, + ORS_2, + ORS_3, + ORS_4, + ORS_5, + ORS_6, + ORS_7, + ORS_8 + }; + +public: + CRunningScript* next; + CRunningScript* prev; + char m_abScriptName[8]; + uint32 m_nIp; + uint32 m_anStack[MAX_STACK_DEPTH]; + uint16 m_nStackPointer; + int32 m_anLocalVariables[NUM_LOCAL_VARS + NUM_TIMERS]; + bool m_bCondResult; + bool m_bIsMissionScript; + bool m_bSkipWakeTime; + uint32 m_nWakeTime; + uint16 m_nAndOrState; + bool m_bNotFlag; + bool m_bDeatharrestEnabled; + bool m_bDeatharrestExecuted; + bool m_bMissionFlag; + +public: + void SetIP(uint32 ip) { m_nIp = ip; } + CRunningScript* GetNext() const { return next; } + + void Save(uint8*& buf); + void Load(uint8*& buf); + + void UpdateTimers(float timeStep) { + m_anLocalVariables[NUM_LOCAL_VARS] += timeStep; + m_anLocalVariables[NUM_LOCAL_VARS + 1] += timeStep; + } + + void Init(); + void Process(); + + void RemoveScriptFromList(CRunningScript**); + void AddScriptToList(CRunningScript**); + + static const uint32 nSaveStructSize; + + void CollectParameters(uint32*, int16); + int32 CollectNextParameterWithoutIncreasingPC(uint32); + int32* GetPointerToScriptVariable(uint32*, int16); + void StoreParameters(uint32*, int16); + + int8 ProcessOneCommand(); + void DoDeatharrestCheck(); + void UpdateCompareFlag(bool); + int16 GetPadState(uint16, uint16); + + int8 ProcessCommands0To99(int32); + int8 ProcessCommands100To199(int32); + int8 ProcessCommands200To299(int32); + int8 ProcessCommands300To399(int32); + int8 ProcessCommands400To499(int32); + int8 ProcessCommands500To599(int32); + int8 ProcessCommands600To699(int32); + int8 ProcessCommands700To799(int32); + int8 ProcessCommands800To899(int32); + int8 ProcessCommands900To999(int32); + int8 ProcessCommands1000To1099(int32); +#if GTA_VERSION > GTA3_PS2_160 + int8 ProcessCommands1100To1199(int32); +#endif + void LocatePlayerCommand(int32, uint32*); + void LocatePlayerCharCommand(int32, uint32*); + void LocatePlayerCarCommand(int32, uint32*); + void LocateCharCommand(int32, uint32*); + void LocateCharCharCommand(int32, uint32*); + void LocateCharCarCommand(int32, uint32*); + void LocateCharObjectCommand(int32, uint32*); + void LocateCarCommand(int32, uint32*); + void LocateSniperBulletCommand(int32, uint32*); + void PlayerInAreaCheckCommand(int32, uint32*); + void PlayerInAngledAreaCheckCommand(int32, uint32*); + void CharInAreaCheckCommand(int32, uint32*); + void CarInAreaCheckCommand(int32, uint32*); + +#ifdef GTA_SCRIPT_COLLECTIVE + void LocateCollectiveCommand(int32, uint32*); + void LocateCollectiveCharCommand(int32, uint32*); + void LocateCollectiveCarCommand(int32, uint32*); + void LocateCollectivePlayerCommand(int32, uint32*); + void CollectiveInAreaCheckCommand(int32, uint32*); +#endif + +#ifdef MISSION_REPLAY + bool CanAllowMissionReplay(); +#endif + +#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT + int CollectParameterForDebug(char* buf, bool& var); + void GetStoredParameterForDebug(char* buf); +#endif + + float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; } + + bool ThisIsAValidRandomPed(uint32 pedtype) { + switch (pedtype) { + case PEDTYPE_CIVMALE: + case PEDTYPE_CIVFEMALE: + case PEDTYPE_GANG1: + case PEDTYPE_GANG2: + case PEDTYPE_GANG3: + case PEDTYPE_GANG4: + case PEDTYPE_GANG5: + case PEDTYPE_GANG6: + case PEDTYPE_GANG7: + case PEDTYPE_GANG8: + case PEDTYPE_GANG9: + case PEDTYPE_CRIMINAL: + case PEDTYPE_PROSTITUTE: + return true; + default: + return false; + } + } +}; + + enum { VAR_LOCAL = 1, VAR_GLOBAL = 2, @@ -428,156 +578,6 @@ public: #endif }; - -enum { -#if GTA_VERSION > GTA3_PS2_160 - MAX_STACK_DEPTH = 6, -#else - MAX_STACK_DEPTH = 4, -#endif - NUM_LOCAL_VARS = 16, - NUM_TIMERS = 2 -}; - -class CRunningScript -{ - enum { - ANDOR_NONE = 0, - ANDS_1 = 1, - ANDS_2, - ANDS_3, - ANDS_4, - ANDS_5, - ANDS_6, - ANDS_7, - ANDS_8, - ORS_1 = 21, - ORS_2, - ORS_3, - ORS_4, - ORS_5, - ORS_6, - ORS_7, - ORS_8 - }; - -public: - CRunningScript* next; - CRunningScript* prev; - char m_abScriptName[8]; - uint32 m_nIp; - uint32 m_anStack[MAX_STACK_DEPTH]; - uint16 m_nStackPointer; - int32 m_anLocalVariables[NUM_LOCAL_VARS + NUM_TIMERS]; - bool m_bCondResult; - bool m_bIsMissionScript; - bool m_bSkipWakeTime; - uint32 m_nWakeTime; - uint16 m_nAndOrState; - bool m_bNotFlag; - bool m_bDeatharrestEnabled; - bool m_bDeatharrestExecuted; - bool m_bMissionFlag; - -public: - void SetIP(uint32 ip) { m_nIp = ip; } - CRunningScript* GetNext() const { return next; } - - void Save(uint8*& buf); - void Load(uint8*& buf); - - void UpdateTimers(float timeStep) { - m_anLocalVariables[NUM_LOCAL_VARS] += timeStep; - m_anLocalVariables[NUM_LOCAL_VARS + 1] += timeStep; - } - - void Init(); - void Process(); - - void RemoveScriptFromList(CRunningScript**); - void AddScriptToList(CRunningScript**); - - static const uint32 nSaveStructSize; - - void CollectParameters(uint32*, int16); - int32 CollectNextParameterWithoutIncreasingPC(uint32); - int32* GetPointerToScriptVariable(uint32*, int16); - void StoreParameters(uint32*, int16); - - int8 ProcessOneCommand(); - void DoDeatharrestCheck(); - void UpdateCompareFlag(bool); - int16 GetPadState(uint16, uint16); - - int8 ProcessCommands0To99(int32); - int8 ProcessCommands100To199(int32); - int8 ProcessCommands200To299(int32); - int8 ProcessCommands300To399(int32); - int8 ProcessCommands400To499(int32); - int8 ProcessCommands500To599(int32); - int8 ProcessCommands600To699(int32); - int8 ProcessCommands700To799(int32); - int8 ProcessCommands800To899(int32); - int8 ProcessCommands900To999(int32); - int8 ProcessCommands1000To1099(int32); -#if GTA_VERSION > GTA3_PS2_160 - int8 ProcessCommands1100To1199(int32); -#endif - void LocatePlayerCommand(int32, uint32*); - void LocatePlayerCharCommand(int32, uint32*); - void LocatePlayerCarCommand(int32, uint32*); - void LocateCharCommand(int32, uint32*); - void LocateCharCharCommand(int32, uint32*); - void LocateCharCarCommand(int32, uint32*); - void LocateCharObjectCommand(int32, uint32*); - void LocateCarCommand(int32, uint32*); - void LocateSniperBulletCommand(int32, uint32*); - void PlayerInAreaCheckCommand(int32, uint32*); - void PlayerInAngledAreaCheckCommand(int32, uint32*); - void CharInAreaCheckCommand(int32, uint32*); - void CarInAreaCheckCommand(int32, uint32*); - -#ifdef GTA_SCRIPT_COLLECTIVE - void LocateCollectiveCommand(int32, uint32*); - void LocateCollectiveCharCommand(int32, uint32*); - void LocateCollectiveCarCommand(int32, uint32*); - void LocateCollectivePlayerCommand(int32, uint32*); - void CollectiveInAreaCheckCommand(int32, uint32*); -#endif - -#ifdef MISSION_REPLAY - bool CanAllowMissionReplay(); -#endif - -#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT - int CollectParameterForDebug(char* buf, bool& var); - void GetStoredParameterForDebug(char* buf); -#endif - - float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; } - - bool ThisIsAValidRandomPed(uint32 pedtype) { - switch (pedtype) { - case PEDTYPE_CIVMALE: - case PEDTYPE_CIVFEMALE: - case PEDTYPE_GANG1: - case PEDTYPE_GANG2: - case PEDTYPE_GANG3: - case PEDTYPE_GANG4: - case PEDTYPE_GANG5: - case PEDTYPE_GANG6: - case PEDTYPE_GANG7: - case PEDTYPE_GANG8: - case PEDTYPE_GANG9: - case PEDTYPE_CRIMINAL: - case PEDTYPE_PROSTITUTE: - return true; - default: - return false; - } - } -}; - #ifdef MISSION_REPLAY extern int AllowMissionReplay; extern uint32 WaitForMissionActivate; diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp index e74a1081..56164075 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 - static_assert(SCRIPT_DATA_SIZE == 968, "CTheScripts::SaveAllScripts"); + re3_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(buf, m_abScriptName[i]); WriteSaveBuf(buf, m_nIp); #ifdef CHECK_STRUCT_SIZES - static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6"); + re3_static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6"); #endif for (int i = 0; i < MAX_STACK_DEPTH; i++) WriteSaveBuf(buf, m_anStack[i]); WriteSaveBuf(buf, m_nStackPointer); SkipSaveBuf(buf, 2); #ifdef CHECK_STRUCT_SIZES - static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18"); + re3_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(buf, m_anLocalVariables[i]); @@ -2118,14 +2118,14 @@ void CRunningScript::Load(uint8*& buf) m_abScriptName[i] = ReadSaveBuf(buf); m_nIp = ReadSaveBuf(buf); #ifdef CHECK_STRUCT_SIZES - static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6"); + re3_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(buf); m_nStackPointer = ReadSaveBuf(buf); SkipSaveBuf(buf, 2); #ifdef CHECK_STRUCT_SIZES - static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18"); + re3_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(buf); @@ -2442,7 +2442,7 @@ bool CTheScripts::IsPedStopped(CPed* pPed) { if (pPed->bInVehicle) return IsVehicleStopped(pPed->m_pMyVehicle); - return pPed->m_nMoveState == eMoveState::PEDMOVE_NONE || pPed->m_nMoveState == eMoveState::PEDMOVE_STILL; + return pPed->m_nMoveState == PEDMOVE_NONE || pPed->m_nMoveState == PEDMOVE_STILL; } bool CTheScripts::IsPlayerStopped(CPlayerInfo* pPlayer) @@ -2455,7 +2455,7 @@ bool CTheScripts::IsPlayerStopped(CPlayerInfo* pPlayer) RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_LAUNCH) || RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_GLIDE)) return false; - return pPed->m_nMoveState == eMoveState::PEDMOVE_NONE || pPed->m_nMoveState == eMoveState::PEDMOVE_STILL; + return pPed->m_nMoveState == PEDMOVE_NONE || pPed->m_nMoveState == PEDMOVE_STILL; } bool CTheScripts::IsVehicleStopped(CVehicle* pVehicle) diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index a11cd6a4..74de0ab7 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -946,7 +946,7 @@ CVector CCam::DoAverageOnVector(const CVector &vec) { int i; - CVector Average = { 0.0f, 0.0f, 0.0f }; + CVector Average(0.0f, 0.0f, 0.0f); if(ResetStatics){ m_iRunningVectorArrayPos = 0; diff --git a/src/core/CdStream.cpp b/src/core/CdStream.cpp index 4bb31ea4..a1843473 100644 --- a/src/core/CdStream.cpp +++ b/src/core/CdStream.cpp @@ -7,9 +7,6 @@ #include "RwHelper.h" #include "MemoryMgr.h" -#define CDDEBUG(f, ...) debug ("%s: " f "\n", "cdvd_stream", ## __VA_ARGS__) -#define CDTRACE(f, ...) printf("%s: " f "\n", "cdvd_stream", ## __VA_ARGS__) - struct CdReadInfo { uint32 nSectorOffset; @@ -60,7 +57,7 @@ CdStreamInitThread(void) if ( gpReadInfo[i].hSemaphore == nil ) { - CDTRACE("failed to create sync semaphore"); + printf("%s: failed to create sync semaphore\n", "cdvd_stream"); ASSERT(0); return; } @@ -81,7 +78,7 @@ CdStreamInitThread(void) if ( gCdStreamSema == nil ) { - CDTRACE("failed to create stream semaphore"); + printf("%s: failed to create stream semaphore\n", "cdvd_stream"); ASSERT(0); return; } @@ -90,7 +87,7 @@ CdStreamInitThread(void) if ( _gCdStreamThread == nil ) { - CDTRACE("failed to create streaming thread"); + printf("%s: failed to create streaming thread\n", "cdvd_stream"); ASSERT(0); return; } @@ -138,7 +135,7 @@ CdStreamInit(int32 numChannels) gpReadInfo = (CdReadInfo *)LocalAlloc(LMEM_ZEROINIT, sizeof(CdReadInfo) * numChannels); ASSERT( gpReadInfo != nil ); - CDDEBUG("read info %p", gpReadInfo); + debug("%s: read info %p\n", gpReadInfo, "cdvd_stream"); CdStreamAddImage("MODELS\\GTA3.IMG"); diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 65eab125..707184d5 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -1281,7 +1281,9 @@ CMenuManager::Draw() float smallestSliderBar = lineHeight * 0.1f; bool foundTheHoveringItem = false; wchar unicodeTemp[64]; +#ifdef ASPECT_RATIO_SCALE char asciiTemp[32]; +#endif #ifdef MENU_MAP if (m_nCurrScreen == MENUPAGE_MAP) { diff --git a/src/core/General.h b/src/core/General.h index de803558..478ef027 100644 --- a/src/core/General.h +++ b/src/core/General.h @@ -133,7 +133,7 @@ public: static bool faststricmp(const char *str1, const char *str2) { for (; *str1; str1++, str2++) { -#if MUCH_SLOWER || !defined _WIN32 || defined __MINGW32__ +#ifndef ASCII_STRCMP if (toupper(*str1) != toupper(*str2)) #else if (__ascii_toupper(*str1) != __ascii_toupper(*str2)) diff --git a/src/core/Placeable.cpp b/src/core/Placeable.cpp index 69b3d3ea..162148f7 100644 --- a/src/core/Placeable.cpp +++ b/src/core/Placeable.cpp @@ -7,7 +7,9 @@ CPlaceable::CPlaceable(void) m_matrix.SetScale(1.0f); } -CPlaceable::~CPlaceable(void) = default; +CPlaceable::~CPlaceable(void) +{ +} void CPlaceable::SetHeading(float angle) diff --git a/src/core/Placeable.h b/src/core/Placeable.h index 970c0d48..1d51f306 100644 --- a/src/core/Placeable.h +++ b/src/core/Placeable.h @@ -4,7 +4,7 @@ class CPlaceable { public: // disable allocation - static void *operator new(size_t) = delete; + static void *operator new(size_t); CMatrix m_matrix; diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index ba939fa3..4672e024 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -1,4 +1,4 @@ -#if !defined(GTA_PS2_STUFF) && defined(RWLIBS) +#if (!defined(GTA_PS2_STUFF) && defined(RWLIBS)) || defined(__MWERKS__) #define WITHD3D #endif #include "config.h" @@ -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) -static_assert(RADAR_TILE_SIZE == (RADAR_SIZE_Y / RADAR_NUM_TILES), "CRadar: not a square"); +re3_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) @@ -298,10 +298,10 @@ void CRadar::ClearBlipForEntity(eBlipType type, int32 id) int CRadar::ClipRadarPoly(CVector2D *poly, const CVector2D *rect) { CVector2D corners[4] = { - { 1.0f, -1.0f }, // top right - { 1.0f, 1.0f }, // bottom right - { -1.0f, 1.0f }, // bottom left - { -1.0f, -1.0f }, // top left + CVector2D( 1.0f, -1.0f ), // top right + CVector2D( 1.0f, 1.0f ), // bottom right + CVector2D( -1.0f, 1.0f ), // bottom left + CVector2D( -1.0f, -1.0f ), // top left }; CVector2D tmp; int i, j, n; diff --git a/src/core/Stats.h b/src/core/Stats.h index 5dfcf803..6abcfb61 100644 --- a/src/core/Stats.h +++ b/src/core/Stats.h @@ -17,7 +17,7 @@ public: static int32 NumberKillFrenziesPassed; static int32 PeopleKilledByOthers; static int32 HelisDestroyed; - static int32 PedsKilledOfThisType[ePedType::NUM_PEDTYPES]; + static int32 PedsKilledOfThisType[NUM_PEDTYPES]; static int32 TimesDied; static int32 TimesArrested; static int32 KillsSinceLastCheckpoint; diff --git a/src/core/common.h b/src/core/common.h index d7facfd1..d3b0daa9 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -7,10 +7,18 @@ #pragma warning(disable: 4838) // narrowing conversion #pragma warning(disable: 4996) // POSIX names +#ifdef __MWERKS__ +#define __STDC_LIMIT_MACROS // so we get UINT32_MAX etc +#endif + #include #include #include +#ifdef __MWERKS__ +#define RWLIBS // codewarrior doesn't support project level defines - so not even this is enough, but still catches most ifdefs +#endif + #if !defined RW_D3D9 && defined LIBRW #undef WITHD3D #undef WITHDINPUT @@ -79,8 +87,13 @@ typedef uint8_t uint8; typedef int8_t int8; typedef uint16_t uint16; typedef int16_t int16; +#ifndef __MWERKS__ typedef uint32_t uint32; typedef int32_t int32; +#else +typedef unsigned int uint32; +typedef int int32; +#endif typedef uintptr_t uintptr; typedef intptr_t intptr; typedef uint64_t uint64; @@ -92,7 +105,7 @@ typedef uint8 bool8; typedef uint16 bool16; typedef uint32 bool32; -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined (__MWERKS__) typedef ptrdiff_t ssize_t; #endif @@ -275,6 +288,22 @@ extern wchar *AllocUnicode(const char*src); inline float sq(float x) { return x*x; } #define SQR(x) ((x) * (x)) +#ifdef __MWERKS__ +#define M_E 2.71828182845904523536 // e +#define M_LOG2E 1.44269504088896340736 // log2(e) +#define M_LOG10E 0.434294481903251827651 // log10(e) +#define M_LN2 0.693147180559945309417 // ln(2) +#define M_LN10 2.30258509299404568402 // ln(10) +#define M_PI 3.14159265358979323846 // pi +#define M_PI_2 1.57079632679489661923 // pi/2 +#define M_PI_4 0.785398163397448309616 // pi/4 +#define M_1_PI 0.318309886183790671538 // 1/pi +#define M_2_PI 0.636619772367581343076 // 2/pi +#define M_2_SQRTPI 1.12837916709551257390 // 2/sqrt(pi) +#define M_SQRT2 1.41421356237309504880 // sqrt(2) +#define M_SQRT1_2 0.707106781186547524401 // 1/sqrt(2) +#endif + #define PI (float)M_PI #define TWOPI (PI*2) #define HALFPI (PI/2) @@ -304,23 +333,45 @@ void re3_usererror(const char *format, ...); #define DEV(f, ...) re3_debug("[DEV]: " f, ## __VA_ARGS__) #endif +#ifdef __MWERKS__ +void debug(char *f, ...); +void Error(char *f, ...); +__inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function needs to be inline - this way no call actually gets placed +// USERERROR only gets used in oal builds ... once +#else #define debug(f, ...) re3_debug("[DBG]: " f, ## __VA_ARGS__) -#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__) #define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__) +#ifndef MASTER +#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__) #define USERERROR(f, ...) re3_usererror(f, ## __VA_ARGS__) +#else +#define TRACE(f, ...) +#define USERERROR(f, ...) +#endif +#endif +#ifndef MASTER #define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) ) +#else +#define assert(_Expression) +#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) +#endif + #define _TODO(x) #define _TODOCONST(x) (x) #ifdef CHECK_STRUCT_SIZES -#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc) +#define VALIDATE_SIZE(struc, size) re3_static_assert(sizeof(struc) == size, "Invalid structure size of " #struc) #else #define VALIDATE_SIZE(struc, size) #endif -#define VALIDATE_OFFSET(struc, member, offset) static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...") +#define VALIDATE_OFFSET(struc, member, offset) re3_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])) @@ -335,6 +386,7 @@ void re3_usererror(const char *format, ...); #define CONCAT_(x,y) x##y #define CONCAT(x,y) CONCAT_(x,y) +#ifdef DEBUGMENU // Tweaking stuff for debugmenu #define TWEAKPATH ___tw___TWEAKPATH #define SETTWEAKPATH(path) static const char *___tw___TWEAKPATH = path; @@ -448,6 +500,7 @@ _TWEEKCLASS(CTweakUInt32, uint32); _TWEEKCLASS(CTweakFloat, float); #undef _TWEEKCLASS +#endif #ifdef VALIDATE_SAVE_SIZE extern int32 _saveBufCount; diff --git a/src/core/config.h b/src/core/config.h index ce7ee1e3..e71c34a8 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -1,5 +1,8 @@ #pragma once +// disable (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 @@ -8,8 +11,11 @@ enum Config { MAX_CDCHANNELS = 5, MODELINFOSIZE = 5500, // 3150 on PS2 -// TXDSTORESIZE = 850, +#if defined __MWERKS__ || defined VANILLA_DEFINES + TXDSTORESIZE = 850, +#else TXDSTORESIZE = 1024, // for Xbox map +#endif EXTRADIRSIZE = 128, CUTSCENEDIRSIZE = 512, @@ -235,6 +241,12 @@ enum Config { #define FIX_BUGS_64 // Must have fixes to be able to run 64 bit build #endif +#define ASCII_STRCMP // use faster ascii str comparisons + +#if !defined _WIN32 || defined __MWERKS__ || defined __MINGW32__ +#undef ASCII_STRCMP +#endif + // Just debug menu entries #ifdef DEBUGMENU #define MISSION_SWITCHER // from debug menu @@ -394,3 +406,86 @@ enum Config { #ifdef LIBRW // these are not supported with librw yet #endif + +#if defined __MWERKS__ || defined VANILLA_DEFINES +#define FINAL +#undef CHATTYSPLASH +#undef TIMEBARS +//#define USE_MY_DOCUMENTS + +#define MASTER +#undef VALIDATE_SAVE_SIZE +#undef NO_MOVIES +#undef DEBUGMENU + +#undef DRAW_GAME_VERSION_TEXT +#undef DRAW_MENU_VERSION_TEXT + +#undef GTA_PS2_STUFF +#undef USE_PS2_RAND +#undef RANDOMSPLASH +#undef PS2_MATFX + +#undef FIX_BUGS +#undef THIS_IS_STUPID +#undef MORE_LANGUAGES +#undef MORE_LANGUAGES +#undef COMPATIBLE_SAVES +#undef LOAD_INI_SETTINGS + +#undef ASPECT_RATIO_SCALE +#undef PROPER_SCALING +#undef DEFAULT_NATIVE_RESOLUTION +#undef PS2_ALPHA_TEST +#undef IMPROVED_VIDEOMODE +#undef DISABLE_LOADING_SCREEN +#undef DISABLE_VSYNC_ON_TEXTURE_CONVERSION +//#define USE_TEXTURE_POOL // not possible because R* used custom RW33 + +#undef FIX_SPRITES + +#define PC_PARTICLE + +#undef XINPUT +#undef DETECT_PAD_INPUT_SWITCH +#undef KANGAROO_CHEAT +#undef ALLCARSHELI_CHEAT +#undef ALT_DODO_CHEAT +#undef REGISTER_START_BUTTON +#undef BIND_VEHICLE_FIREWEAPON +#undef BUTTON_ICONS + +#undef HUD_ENHANCEMENTS +#undef TRIANGULAR_BLIPS +#undef FIX_RADAR +#undef RADIO_OFF_TEXT + +#undef MENU_MAP +#undef SCROLLABLE_STATS_PAGE +#undef CUSTOM_FRONTEND_OPTIONS + +#undef GRAPHICS_MENU_OPTIONS +#undef NO_ISLAND_LOADING +#undef CUTSCENE_BORDERS_SWITCH +#undef MULTISAMPLING +#undef INVERT_LOOK_FOR_PAD + +#undef USE_DEBUG_SCRIPT_LOADER +#undef USE_MEASUREMENTS_IN_METERS // TODO +#undef USE_PRECISE_MEASUREMENT_CONVERTION +#undef MISSION_REPLAY +#undef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT +#undef USE_BASIC_SCRIPT_DEBUG_OUTPUT + +#define DONT_FIX_REPLAY_BUGS + +#undef EXPLODING_AIRTRAIN +#undef CAMERA_PICKUP +#undef PED_SKIN +#undef ANIMATE_PED_COL_MODEL +#undef CANCELLABLE_CAR_ENTER +#undef IMPROVED_CAMERA +#undef FREE_CAM +#undef RADIO_SCROLL_TO_PREV_STATION +#undef BIG_IMG +#endif diff --git a/src/core/main.cpp b/src/core/main.cpp index d43f4a74..9d8a8e52 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -128,6 +128,24 @@ bool gbNewRenderer; #define CLEARMODE (rwCAMERACLEARZ) #endif +#ifdef __MWERKS__ +void +debug(char *fmt, ...) +{ +#ifndef MASTER + // TODO put something here +#endif +} + +void +Error(char *fmt, ...) +{ +#ifndef MASTER + // TODO put something here +#endif +} +#endif + void ValidateVersion() { @@ -857,6 +875,7 @@ ProcessSlowMode(void) float FramesPerSecondCounter; int32 FrameSamples; +#ifndef MASTER struct tZonePrint { char name[12]; @@ -877,8 +896,6 @@ tZonePrint ZonePrint[] = { "no zone", CRect( 0.0f, 0.0f, 0.0f, 0.0f) } }; -#ifndef MASTER - void PrintMemoryUsage(void) { diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 09eafe74..48e8a6bc 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -983,9 +983,13 @@ extern bool gbRenderWorld2; } #endif +#ifndef __MWERKS__ +#ifndef MASTER const int re3_buffsize = 1024; static char re3_buff[re3_buffsize]; +#endif +#ifndef MASTER void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func) { #ifdef _WIN32 @@ -1039,9 +1043,11 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con assert(false); #endif } +#endif void re3_debug(const char *format, ...) { +#ifndef MASTER va_list va; va_start(va, format); #ifdef _WIN32 @@ -1053,8 +1059,10 @@ void re3_debug(const char *format, ...) printf("%s", re3_buff); CDebug::DebugAddText(re3_buff); +#endif } +#ifndef MASTER void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...) { char buff[re3_buffsize *2]; @@ -1074,7 +1082,9 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons OutputDebugString(buff); } +#endif +#ifndef MASTER void re3_usererror(const char *format, ...) { va_list va; @@ -1094,6 +1104,8 @@ void re3_usererror(const char *format, ...) assert(false); #endif } +#endif +#endif #ifdef VALIDATE_SAVE_SIZE int32 _saveBufCount; diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index 24017e19..ed01297e 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -1092,7 +1092,7 @@ CPhysical::ProcessShiftSectorList(CPtrList *lists) int numCollisions; int mostColliding; CColPoint colpoints[MAX_COLLISION_POINTS]; - CVector shift = { 0.0f, 0.0f, 0.0f }; + CVector shift = CVector(0.0f, 0.0f, 0.0f); bool doShift = false; CEntity *boat = nil; @@ -1539,8 +1539,8 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists) if(numCollisions <= 0) continue; - CVector moveSpeed = { 0.0f, 0.0f, 0.0f }; - CVector turnSpeed = { 0.0f, 0.0f, 0.0f }; + CVector moveSpeed = CVector(0.0f, 0.0f, 0.0f); + CVector turnSpeed = CVector(0.0f, 0.0f, 0.0f); numResponses = 0; if(A->bHasContacted){ for(i = 0; i < numCollisions; i++){ @@ -1899,8 +1899,8 @@ CPhysical::ProcessCollision(void) }else if(IsObject()){ int responsecase = ((CObject*)this)->m_nSpecialCollisionResponseCases; if(responsecase == COLLRESPONSE_LAMPOST){ - CVector speedUp = { 0.0f, 0.0f, 0.0f }; - CVector speedDown = { 0.0f, 0.0f, 0.0f }; + CVector speedUp = CVector(0.0f, 0.0f, 0.0f); + CVector speedDown = CVector(0.0f, 0.0f, 0.0f); speedUp.z = GetBoundRadius(); speedDown.z = -speedUp.z; speedUp = Multiply3x3(GetMatrix(), speedUp); diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index a8e2e972..ae981d1d 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -229,7 +229,7 @@ CPlayerPed::SetInitialState(void) m_nAdrenalineTime = 0; CTimer::SetTimeScale(1.0f); m_pSeekTarget = nil; - m_vecSeekPos = { 0.0f, 0.0f, 0.0f }; + m_vecSeekPos = CVector(0.0f, 0.0f, 0.0f); m_fleeFromPosX = 0.0f; m_fleeFromPosY = 0.0f; m_fleeFrom = nil; diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 35443cb8..53db7263 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -32,22 +32,22 @@ // Transition areas between zones const RegenerationPoint aSafeZones[] = { - { LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 400.0f, 814.0f, -954.0f, -903.0f, 30.0f, 100.0f, - CVector(790.0f, -917.0f, 39.0f), CVector(775.0f, -921.0f, 39.0f), CVector(424.0f, -942.0f, 38.0f), CVector(439.0f, -938.0f, 38.0f) }, - { LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 555.0f, 711.0f, 118.0f, 186.0f, -30.0f, -10.0f, - CVector(698.0f, 182.0f, -20.0f), CVector(681.0f, 178.0f, -20.0f), CVector(586.0f, 144.0f, -20.0f), CVector(577.0f, 135.0f, -20.0f) }, - { LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 626.0f, 744.0f, -124.0f, -87.0f, -20.0f, -6.0f, - CVector(736.0f, -117.0f, -13.0f), CVector(730.0f, -115.0f, -13.0f), CVector(635.0f, -93.0f, -12.5f), CVector(650.0f, -89.0f, -12.5f) }, - { LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 645.0f, 734.0f, -780.0f, -750.0f, -25.0f, -6.0f, - CVector(729.0f, -764.0f, -18.0f), CVector(720.0f, -769.0f, -17.0f), CVector(652.0f, -774.0f, -10.5f), CVector(659.0f, -770.0f, -10.5f) }, - { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -532.0f, -136.0f, -668.0f, -599.0f, 34.0f, 60.0f, - CVector(-172.0f, -619.0f, 44.0f), CVector(-183.0f, -623.0f, 44.0f), CVector(-511.0f, -645.0f, 41.0f), CVector(-493.0f, -639.0f, 41.5f) }, - { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -325.0f, -175.0f, 27.0f, 75.0f, -30.0f, -10.0f, - CVector(-185.0f, 40.8f, -20.5f), CVector(-202.0f, 37.0f, -20.5f), CVector(-315.0f, 65.5f, -20.5f), CVector(-306.0f, 62.4f, -20.5f) }, - { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -410.0f, -310.0f, -1055.0f, -1030.0f, -20.0f, -6.0f, - CVector(-321.0f, -1043.0f, -13.2f), CVector(-328.0f, -1045.0f, -13.2f), CVector(-398.0f, -1044.0f, -13.5f), CVector(-390.0f, -1040.5f, -13.5f) }, - { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -425.0f, -280.0f, -471.0f, -447.0f, -20.0f, -5.0f, - CVector(-292.0f, -457.0f, -11.6f), CVector(-310.0f, -461.0f, -11.6f), CVector(-413.0f, -461.0f, -11.5f), CVector(-399.0f, -457.0f, -11.3f) } + LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 400.0f, 814.0f, -954.0f, -903.0f, 30.0f, 100.0f, + 790.0f, -917.0f, 39.0f, 775.0f, -921.0f, 39.0f, 424.0f, -942.0f, 38.0f, 439.0f, -938.0f, 38.0f, + LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 555.0f, 711.0f, 118.0f, 186.0f, -30.0f, -10.0f, + CVector(698.0f, 182.0f, -20.0f), CVector(681.0f, 178.0f, -20.0f), CVector(586.0f, 144.0f, -20.0f), CVector(577.0f, 135.0f, -20.0f), + LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 626.0f, 744.0f, -124.0f, -87.0f, -20.0f, -6.0f, + CVector(736.0f, -117.0f, -13.0f), CVector(730.0f, -115.0f, -13.0f), CVector(635.0f, -93.0f, -12.5f), CVector(650.0f, -89.0f, -12.5f), + LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 645.0f, 734.0f, -780.0f, -750.0f, -25.0f, -6.0f, + CVector(729.0f, -764.0f, -18.0f), CVector(720.0f, -769.0f, -17.0f), CVector(652.0f, -774.0f, -10.5f), CVector(659.0f, -770.0f, -10.5f), + LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -532.0f, -136.0f, -668.0f, -599.0f, 34.0f, 60.0f, + CVector(-172.0f, -619.0f, 44.0f), CVector(-183.0f, -623.0f, 44.0f), CVector(-511.0f, -645.0f, 41.0f), CVector(-493.0f, -639.0f, 41.5f), + LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -325.0f, -175.0f, 27.0f, 75.0f, -30.0f, -10.0f, + CVector(-185.0f, 40.8f, -20.5f), CVector(-202.0f, 37.0f, -20.5f), CVector(-315.0f, 65.5f, -20.5f), CVector(-306.0f, 62.4f, -20.5f), + LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -410.0f, -310.0f, -1055.0f, -1030.0f, -20.0f, -6.0f, + CVector(-321.0f, -1043.0f, -13.2f), CVector(-328.0f, -1045.0f, -13.2f), CVector(-398.0f, -1044.0f, -13.5f), CVector(-390.0f, -1040.5f, -13.5f), + LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -425.0f, -280.0f, -471.0f, -447.0f, -20.0f, -5.0f, + CVector(-292.0f, -457.0f, -11.6f), CVector(-310.0f, -461.0f, -11.6f), CVector(-413.0f, -461.0f, -11.5f), CVector(-399.0f, -457.0f, -11.3f) }; PedGroup CPopulation::ms_pPedGroups[NUMPEDGROUPS]; @@ -77,7 +77,7 @@ uint32 CPopulation::ms_nNumGang7; uint32 CPopulation::ms_nNumGang8; CVector CPopulation::RegenerationPoint_a; CVector CPopulation::RegenerationPoint_b; -CVector CPopulation::RegenerationForward; +CVector CPopulation::RegenerationFront; void CPopulation::Initialise() @@ -370,13 +370,13 @@ CPopulation::DealWithZoneChange(eLevelName oldLevel, eLevelName newLevel, bool f if (aSafeZones[safeZone].srcLevel == newLevel) { CPopulation::RegenerationPoint_a = aSafeZones[safeZone].srcPosA; CPopulation::RegenerationPoint_b = aSafeZones[safeZone].srcPosB; - CPopulation::RegenerationForward = aSafeZones[safeZone].destPosA - aSafeZones[safeZone].srcPosA; - RegenerationForward.Normalise(); + CPopulation::RegenerationFront = aSafeZones[safeZone].destPosA - aSafeZones[safeZone].srcPosA; + RegenerationFront.Normalise(); } else if (aSafeZones[safeZone].destLevel == newLevel) { CPopulation::RegenerationPoint_a = aSafeZones[safeZone].destPosA; CPopulation::RegenerationPoint_b = aSafeZones[safeZone].destPosB; - CPopulation::RegenerationForward = aSafeZones[safeZone].srcPosA - aSafeZones[safeZone].destPosA; - RegenerationForward.Normalise(); + CPopulation::RegenerationFront = aSafeZones[safeZone].srcPosA - aSafeZones[safeZone].destPosA; + RegenerationFront.Normalise(); } } @@ -895,7 +895,7 @@ CPopulation::MoveCarsAndPedsOutOfAbandonedZones() break; } veh->GetMatrix().GetPosition().z += (movedVehicleCount / 4) * 7.0f; - veh->GetMatrix().GetForward() = RegenerationForward; + veh->GetMatrix().GetForward() = RegenerationFront; ((CAutomobile*)veh)->PlaceOnRoadProperly(); CCarCtrl::JoinCarWithRoadSystem(veh); CTheScripts::ClearSpaceForMissionEntity(veh->GetPosition(), veh); diff --git a/src/peds/Population.h b/src/peds/Population.h index aa8129c0..61f0bdb7 100644 --- a/src/peds/Population.h +++ b/src/peds/Population.h @@ -24,10 +24,10 @@ struct RegenerationPoint float y2; float z1; float z2; - CVector destPosA; - CVector destPosB; - CVector srcPosA; - CVector srcPosB; + RwV3d destPosA; + RwV3d destPosB; + RwV3d srcPosA; + RwV3d srcPosB; }; class CPopulation @@ -60,7 +60,7 @@ public: static uint32 ms_nNumGang8; static CVector RegenerationPoint_a; static CVector RegenerationPoint_b; - static CVector RegenerationForward; + static CVector RegenerationFront; static void Initialise(); static void Update(void); diff --git a/src/render/Font.h b/src/render/Font.h index a7a4b487..621375d6 100644 --- a/src/render/Font.h +++ b/src/render/Font.h @@ -1,5 +1,7 @@ #pragma once +#include "Sprite2d.h" + void AsciiToUnicode(const char *src, wchar *dst); void UnicodeStrcpy(wchar *dst, const wchar *src); void UnicodeStrcat(wchar *dst, wchar *append); diff --git a/src/render/Glass.cpp b/src/render/Glass.cpp index 0b25525e..3b6fbd46 100644 --- a/src/render/Glass.cpp +++ b/src/render/Glass.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "common.h" #include "Glass.h" #include "Timer.h" diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index b718c163..f20397a3 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -1148,20 +1148,20 @@ void CHud::Draw() // Yeah, top and bottom changed place. R* vision if (IntroRect.m_bIsUsed && IntroRect.m_bBeforeFade) { if (IntroRect.m_nTextureId >= 0) { - CRect rect = { + CRect rect ( IntroRect.m_sRect.left, IntroRect.m_sRect.top, IntroRect.m_sRect.right, - IntroRect.m_sRect.bottom }; + IntroRect.m_sRect.bottom ); CTheScripts::ScriptSprites[IntroRect.m_nTextureId].Draw(rect, IntroRect.m_sColor); } else { - CRect rect = { + CRect rect ( IntroRect.m_sRect.left, IntroRect.m_sRect.top, IntroRect.m_sRect.right, - IntroRect.m_sRect.bottom }; + IntroRect.m_sRect.bottom ); CSprite2d::DrawRect(rect, IntroRect.m_sColor); } diff --git a/src/render/Instance.h b/src/render/Instance.h index 01dfb6a2..693cfdf1 100644 --- a/src/render/Instance.h +++ b/src/render/Instance.h @@ -9,6 +9,6 @@ class CInstance : public CPlaceable public: int m_modelIndex; public: - ~CInstance() = default; + ~CInstance() { } void Shutdown(); }; diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp index e3d2ffa6..6f0f24f1 100644 --- a/src/render/SpecialFX.cpp +++ b/src/render/SpecialFX.cpp @@ -1119,7 +1119,7 @@ CMoneyMessages::RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 } CRGBA FoamColour(255, 255, 255, 255); -unsigned int CSpecialParticleStuff::BoatFromStart; +uint32 CSpecialParticleStuff::BoatFromStart; void CSpecialParticleStuff::CreateFoamAroundObject(CMatrix* pMatrix, float innerFw, float innerRg, float innerUp, int32 particles) diff --git a/src/rw/MemoryHeap.h b/src/rw/MemoryHeap.h index cd8cf22c..ed2e83b6 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 -static_assert(sizeof(HeapBlockDesc) == 0x10, "HeapBlockDesc must have 0x10 size otherwise most of assumptions don't make sense"); +re3_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/save/GenericGameStorage.h b/src/save/GenericGameStorage.h index ee8a52a1..069ba7cd 100644 --- a/src/save/GenericGameStorage.h +++ b/src/save/GenericGameStorage.h @@ -1,5 +1,6 @@ #pragma once +#include "Game.h" #include "PCSave.h" #define SLOT_COUNT (8) diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h index d8807f2b..b4e6a751 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -17,7 +17,11 @@ enum eWinVersion // As long as WITHWINDOWS isn't defined / isn't included, we only need type definitions so let's include . // NOTE: It's perfectly fine to include here, but it can increase build size and time in *some* conditions, and maybe substantially in future if we'll use crossplatform.h more. #ifndef _INC_WINDOWS - #include + #ifndef __MWERKS__ + #include + #else + #include + #endif #endif #if defined RW_D3D9 || defined RWLIBS #include "win.h" @@ -114,6 +118,7 @@ struct SYSTEMTIME { void GetLocalTime_CP(SYSTEMTIME* out); #define GetLocalTime GetLocalTime_CP + #define OutputDebugString(s) re3_debug("[DBG-2]: %s\n",s) #endif diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 5a0c7db2..2fdf078e 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -1,4 +1,4 @@ -#if defined RW_D3D9 || defined RWLIBS +#if defined RW_D3D9 || defined RWLIBS || defined __MWERKS__ #define _WIN32_WINDOWS 0x0500 #define WINVER 0x0500 @@ -19,6 +19,10 @@ #pragma warning( push ) #pragma warning( disable : 4005) +#ifdef __MWERKS__ +#define MAPVK_VK_TO_CHAR (2) // this is missing from codewarrior win32 headers - but it gets used ... how? +#endif + #include #include #pragma warning( pop ) diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 966042e2..77173538 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "common.h" #include "main.h" #include "General.h" diff --git a/src/weapons/WeaponInfo.cpp b/src/weapons/WeaponInfo.cpp index b40329c8..10737acb 100644 --- a/src/weapons/WeaponInfo.cpp +++ b/src/weapons/WeaponInfo.cpp @@ -7,7 +7,7 @@ #include "AnimBlendAssociation.h" #include "Weapon.h" -CWeaponInfo CWeaponInfo::ms_apWeaponInfos[WEAPONTYPE_TOTALWEAPONS]; +static CWeaponInfo aWeaponInfo[WEAPONTYPE_TOTALWEAPONS]; static char ms_aWeaponNames[][32] = { "Unarmed", @@ -28,7 +28,7 @@ static char ms_aWeaponNames[][32] = { CWeaponInfo* CWeaponInfo::GetWeaponInfo(eWeaponType weaponType) { - return &CWeaponInfo::ms_apWeaponInfos[weaponType]; + return &aWeaponInfo[weaponType]; } void @@ -36,10 +36,10 @@ CWeaponInfo::Initialise(void) { debug("Initialising CWeaponInfo...\n"); for (int i = 0; i < WEAPONTYPE_TOTALWEAPONS; i++) { - ms_apWeaponInfos[i].m_eWeaponFire = WEAPON_FIRE_INSTANT_HIT; - ms_apWeaponInfos[i].m_AnimToPlay = ANIM_PUNCH_R; - ms_apWeaponInfos[i].m_Anim2ToPlay = NUM_ANIMS; - ms_apWeaponInfos[i].m_Flags = WEAPONFLAG_USE_GRAVITY | WEAPONFLAG_SLOWS_DOWN | WEAPONFLAG_RAND_SPEED | WEAPONFLAG_EXPANDS | WEAPONFLAG_EXPLODES; + aWeaponInfo[i].m_eWeaponFire = WEAPON_FIRE_INSTANT_HIT; + aWeaponInfo[i].m_AnimToPlay = ANIM_PUNCH_R; + aWeaponInfo[i].m_Anim2ToPlay = NUM_ANIMS; + aWeaponInfo[i].m_Flags = WEAPONFLAG_USE_GRAVITY | WEAPONFLAG_SLOWS_DOWN | WEAPONFLAG_RAND_SPEED | WEAPONFLAG_EXPANDS | WEAPONFLAG_EXPLODES; } debug("Loading weapon data...\n"); LoadWeaponData(); @@ -133,29 +133,29 @@ CWeaponInfo::LoadWeaponData(void) if (strcmp(anim2ToPlay, "null") != 0) { animAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, anim2ToPlay); - ms_apWeaponInfos[weaponType].m_Anim2ToPlay = (AnimationId) animAssoc->animId; + aWeaponInfo[weaponType].m_Anim2ToPlay = (AnimationId) animAssoc->animId; } CVector vecFireOffset(fireOffsetX, fireOffsetY, fireOffsetZ); - ms_apWeaponInfos[weaponType].m_eWeaponFire = FindWeaponFireType(fireType); - ms_apWeaponInfos[weaponType].m_fRange = range; - ms_apWeaponInfos[weaponType].m_nFiringRate = firingRate; - ms_apWeaponInfos[weaponType].m_nReload = reload; - ms_apWeaponInfos[weaponType].m_nAmountofAmmunition = ammoAmount; - ms_apWeaponInfos[weaponType].m_nDamage = damage; - ms_apWeaponInfos[weaponType].m_fSpeed = speed; - ms_apWeaponInfos[weaponType].m_fRadius = radius; - ms_apWeaponInfos[weaponType].m_fLifespan = lifeSpan; - ms_apWeaponInfos[weaponType].m_fSpread = spread; - ms_apWeaponInfos[weaponType].m_vecFireOffset = vecFireOffset; - ms_apWeaponInfos[weaponType].m_AnimToPlay = animId; - ms_apWeaponInfos[weaponType].m_fAnimLoopStart = animLoopStart / 30.0f; - ms_apWeaponInfos[weaponType].m_fAnimLoopEnd = animLoopEnd / 30.0f; - ms_apWeaponInfos[weaponType].m_fAnimFrameFire = delayBetweenAnimAndFire / 30.0f; - ms_apWeaponInfos[weaponType].m_fAnim2FrameFire = delayBetweenAnim2AndFire / 30.0f; - ms_apWeaponInfos[weaponType].m_nModelId = modelId; - ms_apWeaponInfos[weaponType].m_Flags = flags; + aWeaponInfo[weaponType].m_eWeaponFire = FindWeaponFireType(fireType); + aWeaponInfo[weaponType].m_fRange = range; + aWeaponInfo[weaponType].m_nFiringRate = firingRate; + aWeaponInfo[weaponType].m_nReload = reload; + aWeaponInfo[weaponType].m_nAmountofAmmunition = ammoAmount; + aWeaponInfo[weaponType].m_nDamage = damage; + aWeaponInfo[weaponType].m_fSpeed = speed; + aWeaponInfo[weaponType].m_fRadius = radius; + aWeaponInfo[weaponType].m_fLifespan = lifeSpan; + aWeaponInfo[weaponType].m_fSpread = spread; + aWeaponInfo[weaponType].m_vecFireOffset = vecFireOffset; + aWeaponInfo[weaponType].m_AnimToPlay = animId; + aWeaponInfo[weaponType].m_fAnimLoopStart = animLoopStart / 30.0f; + aWeaponInfo[weaponType].m_fAnimLoopEnd = animLoopEnd / 30.0f; + aWeaponInfo[weaponType].m_fAnimFrameFire = delayBetweenAnimAndFire / 30.0f; + aWeaponInfo[weaponType].m_fAnim2FrameFire = delayBetweenAnim2AndFire / 30.0f; + aWeaponInfo[weaponType].m_nModelId = modelId; + aWeaponInfo[weaponType].m_Flags = flags; } } diff --git a/src/weapons/WeaponInfo.h b/src/weapons/WeaponInfo.h index 69ad1f39..96e2ecf4 100644 --- a/src/weapons/WeaponInfo.h +++ b/src/weapons/WeaponInfo.h @@ -19,7 +19,6 @@ enum }; class CWeaponInfo { - static CWeaponInfo ms_apWeaponInfos[WEAPONTYPE_LAST_WEAPONTYPE]; public: eWeaponFire m_eWeaponFire; float m_fRange;