diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-23 00:36:34 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-23 00:36:34 +0100 |
commit | 965a3d6eec31f4f7f98cd01ac2fad606dcb3f8fa (patch) | |
tree | 271fa6491edb2fe5b97486f5df4ec83b77a5e8ed /src/control | |
parent | script coronas (diff) | |
parent | cSmallHeap (diff) | |
download | re3-965a3d6eec31f4f7f98cd01ac2fad606dcb3f8fa.tar re3-965a3d6eec31f4f7f98cd01ac2fad606dcb3f8fa.tar.gz re3-965a3d6eec31f4f7f98cd01ac2fad606dcb3f8fa.tar.bz2 re3-965a3d6eec31f4f7f98cd01ac2fad606dcb3f8fa.tar.lz re3-965a3d6eec31f4f7f98cd01ac2fad606dcb3f8fa.tar.xz re3-965a3d6eec31f4f7f98cd01ac2fad606dcb3f8fa.tar.zst re3-965a3d6eec31f4f7f98cd01ac2fad606dcb3f8fa.zip |
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Script.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 17572531..7712a335 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -50,7 +50,7 @@ #include "Timecycle.h" #include "TxdStore.h" #include "Bike.h" -#include "memoryManager.h" +#include "smallHeap.h" #ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT #include <stdarg.h> #endif @@ -2644,7 +2644,8 @@ bool CTheScripts::Init(bool loaddata) CFileMgr::Read(mainf, (char*)&MainScriptSize, sizeof(MainScriptSize)); int nLargestMissionSize = 0; CFileMgr::Read(mainf, (char*)&nLargestMissionSize, sizeof(nLargestMissionSize)); - // some cSmallHeap shit - TODO + if (!cSmallHeap::msInstance.IsLocked()) + cSmallHeap::msInstance.Lock(); ScriptSpace = (uint8*)base::cMainMemoryManager::Instance()->Allocate(MainScriptSize + nLargestMissionSize); memset(ScriptSpace, 0, MainScriptSize + nLargestMissionSize); CFileMgr::Read(mainf, (char*)ScriptSpace, MainScriptSize); |