mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
StreamDB_Init cleanup
Removed unused third parameter from DevMsg call. Added log for loading non override STBSP files.
This commit is contained in:
parent
965b4f4367
commit
2678fe2ec8
@ -10,12 +10,12 @@
|
|||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
// Purpose: loads and processes STBSP files
|
// Purpose: loads and processes STBSP files
|
||||||
// (overrides level name if stbsp field has value in prerequisites file)
|
// (overrides level name if stbsp field has value in prerequisites file)
|
||||||
// Input : *pszStreamDBFile -
|
// Input : *pszLevelName -
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
void StreamDB_Init(const char* pszStreamDBFile)
|
void StreamDB_Init(const char* pszLevelName)
|
||||||
{
|
{
|
||||||
ostringstream ostream;
|
ostringstream ostream;
|
||||||
ostream << "platform\\scripts\\levels\\settings\\" << pszStreamDBFile << ".json";
|
ostream << "platform\\scripts\\levels\\settings\\" << pszLevelName << ".json";
|
||||||
fs::path fsPath = fs::current_path() /= ostream.str();
|
fs::path fsPath = fs::current_path() /= ostream.str();
|
||||||
|
|
||||||
if (FileExists(fsPath))
|
if (FileExists(fsPath))
|
||||||
@ -32,7 +32,7 @@ void StreamDB_Init(const char* pszStreamDBFile)
|
|||||||
if (!jsIn["stbsp"].is_null())
|
if (!jsIn["stbsp"].is_null())
|
||||||
{
|
{
|
||||||
string svStreamDBFile = jsIn["stbsp"].get<string>();
|
string svStreamDBFile = jsIn["stbsp"].get<string>();
|
||||||
DevMsg(eDLL_T::MS, "%s: Loading override STBSP file '%s.stbsp'\n", __FUNCTION__, svStreamDBFile.c_str(), pszStreamDBFile);
|
DevMsg(eDLL_T::MS, "%s: Loading override STBSP file '%s.stbsp'\n", __FUNCTION__, svStreamDBFile.c_str());
|
||||||
v_StreamDB_Init(svStreamDBFile.c_str());
|
v_StreamDB_Init(svStreamDBFile.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -40,10 +40,11 @@ void StreamDB_Init(const char* pszStreamDBFile)
|
|||||||
}
|
}
|
||||||
catch (const std::exception& ex)
|
catch (const std::exception& ex)
|
||||||
{
|
{
|
||||||
DevMsg(eDLL_T::MS, "%s: Exception while parsing STBSP override: '%s'\n", __FUNCTION__, ex.what());
|
Warning(eDLL_T::MS, "%s: Exception while parsing STBSP override: '%s'\n", __FUNCTION__, ex.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
v_StreamDB_Init(pszStreamDBFile);
|
DevMsg(eDLL_T::MS, "%s: Loading STBSP file '%s.stbsp'\n", __FUNCTION__, pszLevelName);
|
||||||
|
v_StreamDB_Init(pszLevelName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
|
@ -18,7 +18,7 @@ inline CMemory p_DrawStreamOverlay;
|
|||||||
inline auto DrawStreamOverlay = p_DrawStreamOverlay.RCast<const char* (*)(void* thisptr, uint8_t* a2, void* unused, void* a4)>();
|
inline auto DrawStreamOverlay = p_DrawStreamOverlay.RCast<const char* (*)(void* thisptr, uint8_t* a2, void* unused, void* a4)>();
|
||||||
|
|
||||||
inline CMemory p_StreamDB_Init;
|
inline CMemory p_StreamDB_Init;
|
||||||
inline auto v_StreamDB_Init = p_StreamDB_Init.RCast<void (*)(const char* pszStreamDbFile)>();
|
inline auto v_StreamDB_Init = p_StreamDB_Init.RCast<void (*)(const char* pszLevelName)>();
|
||||||
|
|
||||||
inline CMemory s_pRenderContext;
|
inline CMemory s_pRenderContext;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user