Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Aug 2, 2024
1 parent 5715531 commit 85550bf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Client/mods/deathmatch/logic/CResourceModelStreamer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
*
* PROJECT: Multi Theft Auto v1.0
* PROJECT: Multi Theft Auto
* LICENSE: See LICENSE in the top level directory
* FILE: mods/deathmatch/logic/CResourceModelStreamer.h
* PURPOSE: Resource model manager
Expand All @@ -19,12 +19,12 @@ class CResourceModelStreamer
CResourceModelStreamer() = default;
~CResourceModelStreamer() = default;

bool RequestModel(uint16_t modelId, bool addRef = false, bool blocking = false);
bool ReleaseModel(uint16_t modelId, bool removeRef = false);
bool RequestModel(std::uint16_t modelId, bool addRef = false, bool blocking = false);
bool ReleaseModel(std::uint16_t modelId, bool removeRef = false);

void ReleaseAll();
void FullyReleaseModel(uint16_t modelId);
void FullyReleaseModel(std::uint16_t modelId);

private:
std::unordered_map<uint16_t, uint16_t> m_requestedModels;
std::unordered_map<std::uint16_t, std::uint16_t> m_requestedModels;
};
6 changes: 3 additions & 3 deletions Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2510,7 +2510,7 @@ bool CLuaEngineDefs::EngineSetPoolCapacity(lua_State* luaVM, ePools pool, size_t
return true;
}

bool CLuaEngineDefs::EngineStreamingRequestModel(lua_State* const luaVM, uint16_t modelId, std::optional<bool> addReference, std::optional<bool> blocking)
bool CLuaEngineDefs::EngineStreamingRequestModel(lua_State* const luaVM, std::uint16_t modelId, std::optional<bool> addReference, std::optional<bool> blocking)
{
// Grab the lua main and the resource belonging to this script
CLuaMain* pLuaMain = m_pLuaManager->GetVirtualMachine(luaVM);
Expand All @@ -2526,7 +2526,7 @@ bool CLuaEngineDefs::EngineStreamingRequestModel(lua_State* const luaVM, uint16_
return pResource->GetResourceModelStreamer()->RequestModel(modelId, addReference.value_or(false), blocking.value_or(false));
}

bool CLuaEngineDefs::EngineStreamingReleaseModel(lua_State* const luaVM, uint16_t modelId, std::optional<bool> removeReference)
bool CLuaEngineDefs::EngineStreamingReleaseModel(lua_State* const luaVM, std::uint16_t modelId, std::optional<bool> removeReference)
{
// Grab the lua main and the resource belonging to this script
CLuaMain* pLuaMain = m_pLuaManager->GetVirtualMachine(luaVM);
Expand All @@ -2542,7 +2542,7 @@ bool CLuaEngineDefs::EngineStreamingReleaseModel(lua_State* const luaVM, uint16_
return pResource->GetResourceModelStreamer()->ReleaseModel(modelId, removeReference.value_or(false));
}

eModelLoadState CLuaEngineDefs::EngineStreamingGetModelLoadState(uint16_t modelId)
eModelLoadState CLuaEngineDefs::EngineStreamingGetModelLoadState(std::uint16_t modelId)
{
const auto allCount = g_pGame->GetCountOfAllFileIDs();
if (modelId >= g_pGame->GetCountOfAllFileIDs())
Expand Down
6 changes: 3 additions & 3 deletions Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class CLuaEngineDefs : public CLuaDefs
static uint EngineRequestTXD(lua_State* const luaVM, std::string strTxdName);
static bool EngineFreeTXD(uint txdID);

static bool EngineStreamingRequestModel(lua_State* const luaVM, uint16_t modelId, std::optional<bool> addReference, std::optional<bool> blocking);
static bool EngineStreamingReleaseModel(lua_State* const luaVM, uint16_t modelId, std::optional<bool> removeReference);
static eModelLoadState EngineStreamingGetModelLoadState(uint16_t modelId);
static bool EngineStreamingRequestModel(lua_State* const luaVM, std::uint16_t modelId, std::optional<bool> addReference, std::optional<bool> blocking);
static bool EngineStreamingReleaseModel(lua_State* const luaVM, std::uint16_t modelId, std::optional<bool> removeReference);
static eModelLoadState EngineStreamingGetModelLoadState(std::uint16_t modelId);

private:
static void AddEngineColClass(lua_State* luaVM);
Expand Down
2 changes: 1 addition & 1 deletion Client/sdk/game/CStreaming.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define INVALID_ARCHIVE_ID 0xFF
#define INVALID_STREAM_ID 0xFF

enum class eModelLoadState : uint32_t
enum class eModelLoadState : std::uint32_t
{
// Model isn't loaded
LOADSTATE_NOT_LOADED = 0,
Expand Down

0 comments on commit 85550bf

Please sign in to comment.