Change UINT8 to UINT16 for soldierInitLists & hostiles in sector

This commit is contained in:
Asdow
2024-11-10 01:19:05 +02:00
parent 5cf0ef4bde
commit 508310be3e
15 changed files with 236 additions and 224 deletions
+16 -1
View File
@@ -19,7 +19,7 @@ extern "C" {
#include "connect.h"
// externals
UNDERGROUND_SECTORINFO* NewUndergroundNode( UINT8 ubSectorX, UINT8 ubSectorY, UINT8 ubSectorZ );
extern UNDERGROUND_SECTORINFO* NewUndergroundNode( UINT8 ubSectorX, UINT8 ubSectorY, UINT8 ubSectorZ );
extern BOOLEAN gfGettingNameFromSaveLoadScreen;
// helper functions
@@ -49,6 +49,21 @@ bool LuaTable::getValue<UINT8>(const char * index, UINT8& value)
return false;
}
template <>
bool LuaTable::getValue<UINT16>(const char* index, UINT16& value)
{
int dummy;
bool b = getValue(index, dummy);
if (b)
{
value = static_cast<UINT16>(dummy);
return true;
}
return false;
}
// Calls into Lua script to let build underground sector list.
BOOLEAN LuaUnderground::InitializeSectorList()
{