diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-16 10:50:45 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-04-16 10:50:45 +0200 |
commit | b1fc7bc533dc7d603daafbf8a158a92f710c1e60 (patch) | |
tree | 20ec3f4fd1aeaba1ab41078cfb49a248d9421885 | |
parent | first fake RW implementation working (diff) | |
download | re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.gz re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.bz2 re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.lz re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.xz re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.zst re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.zip |
Diffstat (limited to '')
-rw-r--r-- | src/animation/FrameUpdate.cpp | 2 | ||||
-rw-r--r-- | src/animation/RpAnimBlend.h | 2 | ||||
-rw-r--r-- | src/audio/MusicManager.cpp | 8 | ||||
-rw-r--r-- | src/audio/MusicManager.h | 2 | ||||
-rw-r--r-- | src/core/Camera.cpp | 1 | ||||
-rw-r--r-- | src/core/main.h | 3 | ||||
-rw-r--r-- | src/rw/Lights.cpp | 24 | ||||
-rw-r--r-- | src/rw/NodeName.cpp | 2 | ||||
-rw-r--r-- | src/rw/TexRead.cpp | 12 | ||||
-rw-r--r-- | src/rw/TxdStore.cpp | 4 | ||||
-rw-r--r-- | src/rw/TxdStore.h | 4 | ||||
-rw-r--r-- | src/rw/VisibilityPlugins.cpp | 54 | ||||
-rw-r--r-- | src/rw/VisibilityPlugins.h | 34 | ||||
-rw-r--r-- | src/save/GenericGameStorage.cpp | 30 | ||||
-rw-r--r-- | src/save/GenericGameStorage.h | 32 | ||||
-rw-r--r-- | src/save/PCSave.cpp | 2 | ||||
-rw-r--r-- | src/save/PCSave.h | 2 | ||||
-rw-r--r-- | src/text/Messages.cpp | 6 | ||||
-rw-r--r-- | src/text/Messages.h | 6 | ||||
-rw-r--r-- | src/text/Text.cpp | 2 | ||||
-rw-r--r-- | src/text/Text.h | 2 |
21 files changed, 118 insertions, 116 deletions
diff --git a/src/animation/FrameUpdate.cpp b/src/animation/FrameUpdate.cpp index dcb71944..393d22a8 100644 --- a/src/animation/FrameUpdate.cpp +++ b/src/animation/FrameUpdate.cpp @@ -6,7 +6,7 @@ #include "AnimBlendAssociation.h" #include "RpAnimBlend.h" -CAnimBlendClumpData *&gpAnimBlendClump = *(CAnimBlendClumpData**)0x621000; +CAnimBlendClumpData *gpAnimBlendClump; void FrameUpdateCallBack(AnimBlendFrameData *frame, void *arg); void FrameUpdateCallBackWithVelocityExtraction(AnimBlendFrameData *frame, void *arg); diff --git a/src/animation/RpAnimBlend.h b/src/animation/RpAnimBlend.h index 55a4456b..f9e14c42 100644 --- a/src/animation/RpAnimBlend.h +++ b/src/animation/RpAnimBlend.h @@ -37,5 +37,5 @@ CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssociation(RpClump *clump); void RpAnimBlendClumpUpdateAnimations(RpClump* clump, float timeDelta); -extern CAnimBlendClumpData *&gpAnimBlendClump; +extern CAnimBlendClumpData *gpAnimBlendClump; void FrameUpdateCallBack(AnimBlendFrameData *frame, void *arg); diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp index d840c57b..d4b60d9b 100644 --- a/src/audio/MusicManager.cpp +++ b/src/audio/MusicManager.cpp @@ -15,10 +15,10 @@ #include "sampman.h" #include "patcher.h" -cMusicManager &MusicManager = *(cMusicManager *)0x8F3964; -int32 &gNumRetunePresses = *(int32 *)0x650B80; -int32 &gRetuneCounter = *(int32*)0x650B84; -bool& bHasStarted = *(bool*)0x650B7C; +cMusicManager MusicManager; +int32 gNumRetunePresses; +int32 gRetuneCounter; +bool bHasStarted; const int maxVolume = 127; diff --git a/src/audio/MusicManager.h b/src/audio/MusicManager.h index 5c255069..5d6f41cf 100644 --- a/src/audio/MusicManager.h +++ b/src/audio/MusicManager.h @@ -86,4 +86,4 @@ public: static_assert(sizeof(cMusicManager) == 0x95C, "cMusicManager: error"); -extern cMusicManager &MusicManager; +extern cMusicManager MusicManager; diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index c7fa41e4..c2392d3b 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -29,6 +29,7 @@ #include "SceneEdit.h" #include "Pools.h" #include "Debug.h" +#include "GenericGameStorage.h" #include "Camera.h" enum diff --git a/src/core/main.h b/src/core/main.h index 5e9401b9..5ee758a4 100644 --- a/src/core/main.h +++ b/src/core/main.h @@ -16,11 +16,8 @@ extern char *gString; extern char *gString2; extern wchar *gUString; extern wchar *gUString2; -extern bool &b_FoundRecentSavedGameWantToLoad; extern bool gbPrintShite; extern bool &gbModelViewer; -extern bool &StillToFadeOut; -extern bool &JustLoadedDontFadeInYet; class CSprite2d; diff --git a/src/rw/Lights.cpp b/src/rw/Lights.cpp index cd83a898..9218a055 100644 --- a/src/rw/Lights.cpp +++ b/src/rw/Lights.cpp @@ -9,18 +9,18 @@ #include "ZoneCull.h" #include "Frontend.h" -RpLight *&pAmbient = *(RpLight**)0x885B6C; -RpLight *&pDirect = *(RpLight**)0x880F7C; -RpLight **pExtraDirectionals = (RpLight**)0x60009C; -int *LightStrengths = (int*)0x87BEF0; -int &NumExtraDirLightsInWorld = *(int*)0x64C608; - -RwRGBAReal &AmbientLightColourForFrame = *(RwRGBAReal*)0x6F46F8; -RwRGBAReal &AmbientLightColourForFrame_PedsCarsAndObjects = *(RwRGBAReal*)0x6F1D10; -RwRGBAReal &DirectionalLightColourForFrame = *(RwRGBAReal*)0x87C6B8; - -RwRGBAReal &AmbientLightColour = *(RwRGBAReal*)0x86B0F8; -RwRGBAReal &DirectionalLightColour = *(RwRGBAReal*)0x72E308; +RpLight *pAmbient;// = *(RpLight**)0x885B6C; +RpLight *pDirect;// = *(RpLight**)0x880F7C; +RpLight *pExtraDirectionals[] = { nil, nil, nil, nil };// = (RpLight**)0x60009C; +int LightStrengths[4];// = (int*)0x87BEF0; +int NumExtraDirLightsInWorld;// = *(int*)0x64C608; + +RwRGBAReal AmbientLightColourForFrame;// = *(RwRGBAReal*)0x6F46F8; +RwRGBAReal AmbientLightColourForFrame_PedsCarsAndObjects;// = *(RwRGBAReal*)0x6F1D10; +RwRGBAReal DirectionalLightColourForFrame;// = *(RwRGBAReal*)0x87C6B8; + +RwRGBAReal AmbientLightColour;// = *(RwRGBAReal*)0x86B0F8; +RwRGBAReal DirectionalLightColour;// = *(RwRGBAReal*)0x72E308; void SetLightsWithTimeOfDayColour(RpWorld *) diff --git a/src/rw/NodeName.cpp b/src/rw/NodeName.cpp index 2aea3c83..7422a323 100644 --- a/src/rw/NodeName.cpp +++ b/src/rw/NodeName.cpp @@ -2,7 +2,7 @@ #include "patcher.h" #include "NodeName.h" -static int32 &gPluginOffset = *(int32*)0x64C610; +static int32 gPluginOffset;// = *(int32*)0x64C610; enum { diff --git a/src/rw/TexRead.cpp b/src/rw/TexRead.cpp index c91b71c0..1ac5a75e 100644 --- a/src/rw/TexRead.cpp +++ b/src/rw/TexRead.cpp @@ -22,8 +22,8 @@ #include "RwHelper.h" #endif //GTA_PC -float &texLoadTime = *(float*)0x8F1B50; -int32 &texNumLoaded = *(int32*)0x8F252C; +float texLoadTime;// = *(float*)0x8F1B50; +int32 texNumLoaded;// = *(int32*)0x8F252C; #ifdef LIBRW #define READNATIVE(stream, tex, size) rwNativeTextureHackRead(stream, tex, size) @@ -155,7 +155,11 @@ RwTexDictionaryGtaStreamRead2(RwStream *stream, RwTexDictionary *texDict) } #ifdef GTA_PC - +#ifdef RWLIBS +extern "C" RwInt32 _rwD3D8FindCorrectRasterFormat(RwRasterType type, RwInt32 flags); +#else +RwInt32 _rwD3D8FindCorrectRasterFormat(RwRasterType type, RwInt32 flags); +#endif void ReadVideoCardCapsFile(uint32 &cap32, uint32 &cap24, uint32 &cap16, uint32 &cap8) { @@ -174,8 +178,6 @@ ReadVideoCardCapsFile(uint32 &cap32, uint32 &cap24, uint32 &cap16, uint32 &cap8) } } -RwInt32 _rwD3D8FindCorrectRasterFormat(RwRasterType type, RwInt32 flags); - bool CheckVideoCardCaps(void) { diff --git a/src/rw/TxdStore.cpp b/src/rw/TxdStore.cpp index c751147d..a32755a4 100644 --- a/src/rw/TxdStore.cpp +++ b/src/rw/TxdStore.cpp @@ -6,8 +6,8 @@ #include "RwHelper.h" #include "TxdStore.h" -CPool<TxdDef,TxdDef> *&CTxdStore::ms_pTxdPool = *(CPool<TxdDef,TxdDef>**)0x8F5FB8; -RwTexDictionary *&CTxdStore::ms_pStoredTxd = *(RwTexDictionary**)0x9405BC; +CPool<TxdDef,TxdDef> *CTxdStore::ms_pTxdPool;// = *(CPool<TxdDef,TxdDef>**)0x8F5FB8; +RwTexDictionary *CTxdStore::ms_pStoredTxd;// = *(RwTexDictionary**)0x9405BC; void CTxdStore::Initialise(void) diff --git a/src/rw/TxdStore.h b/src/rw/TxdStore.h index 12ac708f..937fd1b7 100644 --- a/src/rw/TxdStore.h +++ b/src/rw/TxdStore.h @@ -10,8 +10,8 @@ struct TxdDef { class CTxdStore { - static CPool<TxdDef,TxdDef> *&ms_pTxdPool; - static RwTexDictionary *&ms_pStoredTxd; + static CPool<TxdDef,TxdDef> *ms_pTxdPool; + static RwTexDictionary *ms_pStoredTxd; public: static void Initialise(void); static void Shutdown(void); diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index f8b1f6b2..def3b23e 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -11,32 +11,24 @@ #define FADE_DISTANCE 20.0f -/* -CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaList; -CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaEntityList; - -int32 CVisibilityPlugins::ms_atomicPluginOffset = -1; -int32 CVisibilityPlugins::ms_framePluginOffset = -1; -int32 CVisibilityPlugins::ms_clumpPluginOffset = -1; -*/ -CLinkList<CVisibilityPlugins::AlphaObjectInfo> &CVisibilityPlugins::m_alphaList = *(CLinkList<CVisibilityPlugins::AlphaObjectInfo>*)0x8F42E4; -CLinkList<CVisibilityPlugins::AlphaObjectInfo> &CVisibilityPlugins::m_alphaEntityList = *(CLinkList<CVisibilityPlugins::AlphaObjectInfo>*)0x943084; - -int32 &CVisibilityPlugins::ms_atomicPluginOffset = *(int32*)0x600124; -int32 &CVisibilityPlugins::ms_framePluginOffset = *(int32*)0x600128; -int32 &CVisibilityPlugins::ms_clumpPluginOffset = *(int32*)0x60012C; - -RwCamera *&CVisibilityPlugins::ms_pCamera = *(RwCamera**)0x8F2514; -RwV3d *&CVisibilityPlugins::ms_pCameraPosn = *(RwV3d**)0x8F6270; -float &CVisibilityPlugins::ms_cullCompsDist = *(float*)0x8F2BC4; -float &CVisibilityPlugins::ms_vehicleLod0Dist = *(float*)0x885B28; -float &CVisibilityPlugins::ms_vehicleLod1Dist = *(float*)0x885B30; -float &CVisibilityPlugins::ms_vehicleFadeDist = *(float*)0x8E28B4; -float &CVisibilityPlugins::ms_bigVehicleLod0Dist = *(float*)0x8E2A84; -float &CVisibilityPlugins::ms_bigVehicleLod1Dist = *(float*)0x8E2A8C; -float &CVisibilityPlugins::ms_pedLod0Dist = *(float*)0x8F2BD4; -float &CVisibilityPlugins::ms_pedLod1Dist = *(float*)0x8F2BD8; -float &CVisibilityPlugins::ms_pedFadeDist = *(float*)0x8E2C34; +CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaList;// = *(CLinkList<CVisibilityPlugins::AlphaObjectInfo>*)0x8F42E4; +CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaEntityList;// = *(CLinkList<CVisibilityPlugins::AlphaObjectInfo>*)0x943084; + +int32 CVisibilityPlugins::ms_atomicPluginOffset = -1;// = *(int32*)0x600124; +int32 CVisibilityPlugins::ms_framePluginOffset = -1;// = *(int32*)0x600128; +int32 CVisibilityPlugins::ms_clumpPluginOffset = -1;// = *(int32*)0x60012C; + +RwCamera *CVisibilityPlugins::ms_pCamera;// = *(RwCamera**)0x8F2514; +RwV3d *CVisibilityPlugins::ms_pCameraPosn;// = *(RwV3d**)0x8F6270; +float CVisibilityPlugins::ms_cullCompsDist;// = *(float*)0x8F2BC4; +float CVisibilityPlugins::ms_vehicleLod0Dist;// = *(float*)0x885B28; +float CVisibilityPlugins::ms_vehicleLod1Dist;// = *(float*)0x885B30; +float CVisibilityPlugins::ms_vehicleFadeDist;// = *(float*)0x8E28B4; +float CVisibilityPlugins::ms_bigVehicleLod0Dist;// = *(float*)0x8E2A84; +float CVisibilityPlugins::ms_bigVehicleLod1Dist;// = *(float*)0x8E2A8C; +float CVisibilityPlugins::ms_pedLod0Dist;// = *(float*)0x8F2BD4; +float CVisibilityPlugins::ms_pedLod1Dist;// = *(float*)0x8F2BD8; +float CVisibilityPlugins::ms_pedFadeDist;// = *(float*)0x8E2C34; void CVisibilityPlugins::Initialise(void) @@ -603,6 +595,16 @@ CVisibilityPlugins::DefaultVisibilityCB(RpClump *clump) } bool +CVisibilityPlugins::MloVisibilityCB(RpClump *clump) +{ + RwFrame *frame = RpClumpGetFrame(clump); + CMloModelInfo *modelInfo = (CMloModelInfo*)GetFrameHierarchyId(frame); + if (sq(modelInfo->field_34) < GetDistanceSquaredFromCamera(frame)) + return false; + return CVisibilityPlugins::FrustumSphereCB(clump); +} + +bool CVisibilityPlugins::FrustumSphereCB(RpClump *clump) { RwSphere sphere; diff --git a/src/rw/VisibilityPlugins.h b/src/rw/VisibilityPlugins.h index 65d2675a..63bc95e4 100644 --- a/src/rw/VisibilityPlugins.h +++ b/src/rw/VisibilityPlugins.h @@ -20,19 +20,19 @@ public: float sort; }; - static CLinkList<AlphaObjectInfo> &m_alphaList; - static CLinkList<AlphaObjectInfo> &m_alphaEntityList; - static RwCamera *&ms_pCamera; - static RwV3d *&ms_pCameraPosn; - static float &ms_cullCompsDist; - static float &ms_vehicleLod0Dist; - static float &ms_vehicleLod1Dist; - static float &ms_vehicleFadeDist; - static float &ms_bigVehicleLod0Dist; - static float &ms_bigVehicleLod1Dist; - static float &ms_pedLod0Dist; - static float &ms_pedLod1Dist; - static float &ms_pedFadeDist; + static CLinkList<AlphaObjectInfo> m_alphaList; + static CLinkList<AlphaObjectInfo> m_alphaEntityList; + static RwCamera *ms_pCamera; + static RwV3d *ms_pCameraPosn; + static float ms_cullCompsDist; + static float ms_vehicleLod0Dist; + static float ms_vehicleLod1Dist; + static float ms_vehicleFadeDist; + static float ms_bigVehicleLod0Dist; + static float ms_bigVehicleLod1Dist; + static float ms_pedLod0Dist; + static float ms_pedLod1Dist; + static float ms_pedFadeDist; static void Initialise(void); static void Shutdown(void); @@ -70,7 +70,7 @@ public: // All actually unused static bool DefaultVisibilityCB(RpClump *clump); static bool FrustumSphereCB(RpClump *clump); -// static bool MloVisibilityCB(RpClump *clump); + static bool MloVisibilityCB(RpClump *clump); static bool VehicleVisibilityCB(RpClump *clump); static bool VehicleVisibilityCB_BigVehicle(RpClump *clump); @@ -97,7 +97,7 @@ public: static void *AtomicDestructor(void *object, int32 offset, int32 len); static void *AtomicCopyConstructor(void *dst, const void *src, int32 offset, int32 len); - static int32 &ms_atomicPluginOffset; + static int32 ms_atomicPluginOffset; struct FrameExt { @@ -111,7 +111,7 @@ public: static void *FrameDestructor(void *object, int32 offset, int32 len); static void *FrameCopyConstructor(void *dst, const void *src, int32 offset, int32 len); - static int32 &ms_framePluginOffset; + static int32 ms_framePluginOffset; // Not actually used struct ClumpExt @@ -127,7 +127,7 @@ public: static void *ClumpDestructor(void *object, int32 offset, int32 len); static void *ClumpCopyConstructor(void *dst, const void *src, int32 offset, int32 len); - static int32 &ms_clumpPluginOffset; + static int32 ms_clumpPluginOffset; static bool PluginAttach(void); }; diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index 1e4acd3d..0bae979b 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -40,22 +40,22 @@ const uint32 SIZE_OF_ONE_GAME_IN_BYTES = 201729; -char (&DefaultPCSaveFileName)[260] = *(char(*)[260])*(uintptr*)0x8E28C0; -char (&ValidSaveName)[260] = *(char(*)[260])*(uintptr*)0x8E2CBC; -char (&LoadFileName)[256] = *(char(*)[256])*(uintptr*)0x9403C4; -wchar (&SlotFileName)[SLOT_COUNT][260] = *(wchar(*)[SLOT_COUNT][260])*(uintptr*)0x6F07C8; -wchar (&SlotSaveDate)[SLOT_COUNT][70] = *(wchar(*)[SLOT_COUNT][70])*(uintptr*)0x72B858; -int &CheckSum = *(int*)0x8E2BE0; -eLevelName &m_LevelToLoad = *(eLevelName*)0x8E29CC; +char DefaultPCSaveFileName[260];// = *(char(*)[260]) * (uintptr*)0x8E28C0; +char ValidSaveName[260];// = *(char(*)[260])*(uintptr*)0x8E2CBC; +char LoadFileName[256];// = *(char(*)[256])*(uintptr*)0x9403C4; +wchar SlotFileName[SLOT_COUNT][260];// = *(wchar(*)[SLOT_COUNT][260])*(uintptr*)0x6F07C8; +wchar SlotSaveDate[SLOT_COUNT][70];// = *(wchar(*)[SLOT_COUNT][70])*(uintptr*)0x72B858; +int CheckSum;// = *(int*)0x8E2BE0; +eLevelName m_LevelToLoad;// = *(eLevelName*)0x8E29CC; char SaveFileNameJustSaved[260]; -int (&Slots)[SLOT_COUNT+1] = *(int(*)[SLOT_COUNT+1])*(uintptr*)0x72803C; -CDate &CompileDateAndTime = *(CDate*)0x72BCB8; - -bool &b_FoundRecentSavedGameWantToLoad = *(bool*)0x95CDA8; -bool &JustLoadedDontFadeInYet = *(bool*)0x95CDB4; -bool &StillToFadeOut = *(bool*)0x95CD99; -uint32 &TimeStartedCountingForFade = *(uint32*)0x9430EC; -uint32 &TimeToStayFadedBeforeFadeOut = *(uint32*)0x611564; +int Slots[SLOT_COUNT+1];// = *(int(*)[SLOT_COUNT+1])*(uintptr*)0x72803C; +CDate CompileDateAndTime;// = *(CDate*)0x72BCB8; + +bool b_FoundRecentSavedGameWantToLoad;// = *(bool*)0x95CDA8; +bool JustLoadedDontFadeInYet;// = *(bool*)0x95CDB4; +bool StillToFadeOut;// = *(bool*)0x95CD99; +uint32 TimeStartedCountingForFade;// = *(uint32*)0x9430EC; +uint32 TimeToStayFadedBeforeFadeOut = 1750;// = *(uint32*)0x611564; #define ReadDataFromBufferPointer(buf, to) memcpy(&to, buf, sizeof(to)); buf += align4bytes(sizeof(to)); #define WriteDataToBufferPointer(buf, from) memcpy(buf, &from, sizeof(from)); buf += align4bytes(sizeof(from)); diff --git a/src/save/GenericGameStorage.h b/src/save/GenericGameStorage.h index e6fd2e2d..b913c305 100644 --- a/src/save/GenericGameStorage.h +++ b/src/save/GenericGameStorage.h @@ -21,22 +21,22 @@ bool CheckDataNotCorrupt(int32 slot, char *name); bool RestoreForStartLoad(); int align4bytes(int32 size); -extern class CDate& CompileDateAndTime; - -extern char (&DefaultPCSaveFileName)[260]; -extern char (&ValidSaveName)[260]; -extern char (&LoadFileName)[256]; -extern wchar (&SlotFileName)[SLOT_COUNT][260]; -extern wchar (&SlotSaveDate)[SLOT_COUNT][70]; -extern int &CheckSum; -extern enum eLevelName &m_LevelToLoad; -extern int (&Slots)[SLOT_COUNT+1]; - -extern bool &b_FoundRecentSavedGameWantToLoad; -extern bool &JustLoadedDontFadeInYet; -extern bool &StillToFadeOut; -extern uint32 &TimeStartedCountingForFade; -extern uint32 &TimeToStayFadedBeforeFadeOut; +extern class CDate CompileDateAndTime; + +extern char DefaultPCSaveFileName[260]; +extern char ValidSaveName[260]; +extern char LoadFileName[256]; +extern wchar SlotFileName[SLOT_COUNT][260]; +extern wchar SlotSaveDate[SLOT_COUNT][70]; +extern int CheckSum; +extern enum eLevelName m_LevelToLoad; +extern int Slots[SLOT_COUNT+1]; + +extern bool b_FoundRecentSavedGameWantToLoad; +extern bool JustLoadedDontFadeInYet; +extern bool StillToFadeOut; +extern uint32 TimeStartedCountingForFade; +extern uint32 TimeToStayFadedBeforeFadeOut; extern char SaveFileNameJustSaved[260]; // 8F2570 diff --git a/src/save/PCSave.cpp b/src/save/PCSave.cpp index 744f5e0d..4afcb645 100644 --- a/src/save/PCSave.cpp +++ b/src/save/PCSave.cpp @@ -9,7 +9,7 @@ const char* _psGetUserFilesFolder(); -C_PcSave &PcSaveHelper = *(C_PcSave*)0x8E2C60; +C_PcSave PcSaveHelper;// = *(C_PcSave*)0x8E2C60; void C_PcSave::SetSaveDirectory(const char *path) diff --git a/src/save/PCSave.h b/src/save/PCSave.h index c58a5c9e..4a2d9a66 100644 --- a/src/save/PCSave.h +++ b/src/save/PCSave.h @@ -37,4 +37,4 @@ public: static void SetSaveDirectory(const char *path); }; -extern C_PcSave &PcSaveHelper; +extern C_PcSave PcSaveHelper; diff --git a/src/text/Messages.cpp b/src/text/Messages.cpp index 9896a8e0..4b181d67 100644 --- a/src/text/Messages.cpp +++ b/src/text/Messages.cpp @@ -12,9 +12,9 @@ #include "ControllerConfig.h" -tMessage(&CMessages::BriefMessages)[NUMBRIEFMESSAGES] = *(tMessage(*)[NUMBRIEFMESSAGES])*(uintptr*)0x8786E0; -tPreviousBrief(&CMessages::PreviousBriefs)[NUMPREVIOUSBRIEFS] = *(tPreviousBrief(*)[NUMPREVIOUSBRIEFS])*(uintptr*)0x713C08; -tBigMessage(&CMessages::BIGMessages)[NUMBIGMESSAGES] = *(tBigMessage(*)[NUMBIGMESSAGES])*(uintptr*)0x773628; +tMessage CMessages::BriefMessages[NUMBRIEFMESSAGES];// = *(tMessage(*)[NUMBRIEFMESSAGES]) * (uintptr*)0x8786E0; +tPreviousBrief CMessages::PreviousBriefs[NUMPREVIOUSBRIEFS];// = *(tPreviousBrief(*)[NUMPREVIOUSBRIEFS]) * (uintptr*)0x713C08; +tBigMessage CMessages::BIGMessages[NUMBIGMESSAGES];// = *(tBigMessage(*)[NUMBIGMESSAGES]) * (uintptr*)0x773628; char CMessages::PreviousMissionTitle[16]; // unused void diff --git a/src/text/Messages.h b/src/text/Messages.h index 8044c626..e8ba1bf7 100644 --- a/src/text/Messages.h +++ b/src/text/Messages.h @@ -29,9 +29,9 @@ struct tPreviousBrief class CMessages { public: - static tMessage(&BriefMessages)[NUMBRIEFMESSAGES]; - static tBigMessage(&BIGMessages)[NUMBIGMESSAGES]; - static tPreviousBrief(&PreviousBriefs)[NUMPREVIOUSBRIEFS]; + static tMessage BriefMessages[NUMBRIEFMESSAGES]; + static tBigMessage BIGMessages[NUMBIGMESSAGES]; + static tPreviousBrief PreviousBriefs[NUMPREVIOUSBRIEFS]; static char PreviousMissionTitle[16]; // unused public: static void Init(void); diff --git a/src/text/Text.cpp b/src/text/Text.cpp index 5fc19f12..b3da27e8 100644 --- a/src/text/Text.cpp +++ b/src/text/Text.cpp @@ -7,7 +7,7 @@ static wchar WideErrorString[25]; -CText &TheText = *(CText*)0x941520; +CText TheText;// = *(CText*)0x941520; CText::CText(void) { diff --git a/src/text/Text.h b/src/text/Text.h index 6f39ba49..00d1c5e6 100644 --- a/src/text/Text.h +++ b/src/text/Text.h @@ -56,4 +56,4 @@ public: void UpperCase(wchar *s); }; -extern CText &TheText; +extern CText TheText; |