add GameThreadPool

This commit is contained in:
savis
2026-01-05 17:20:12 +01:00
parent dbdfd57c41
commit 7718c65d7a
12 changed files with 575 additions and 285 deletions

View File

@@ -1,6 +1,8 @@
#pragma once
#include "RaceData.h"
#include <mutex>
#include <set>
class CRaceManager : public CSingleton<CRaceManager>
{
@@ -29,6 +31,10 @@ class CRaceManager : public CSingleton<CRaceManager>
BOOL GetRaceDataPointer(DWORD dwRaceIndex, CRaceData ** ppRaceData);
// Async race loading
void RequestAsyncRaceLoad(DWORD dwRaceIndex);
bool IsRaceLoading(DWORD dwRaceIndex) const;
// Race motion preloading
static void PreloadPlayerRaceMotions();
static bool IsPreloaded() { return s_bPreloaded; }
@@ -42,6 +48,10 @@ class CRaceManager : public CSingleton<CRaceManager>
protected:
TRaceDataMap m_RaceDataMap;
mutable std::mutex m_RaceDataMapMutex;
std::set<DWORD> m_LoadingRaces;
mutable std::mutex m_LoadingRacesMutex;
std::map<std::string, std::string> m_kMap_stRaceName_stSrcName;
std::map<DWORD, std::string> m_kMap_dwRaceKey_stRaceName;