Some code cleaning

This commit is contained in:
MontyTRC89 2018-10-28 14:11:00 +01:00
parent a294cc7ef4
commit a641259c03
4 changed files with 6 additions and 17 deletions

View file

@ -3,8 +3,8 @@
-- Place in this LUA script all the engine settings for your game -- Place in this LUA script all the engine settings for your game
-- WARNING: bad values could make your game unplayable, please follow with attention the reference guide -- WARNING: bad values could make your game unplayable, please follow with attention the reference guide
Gameflow.settings.screenWidth = 800; Gameflow.settings.screenWidth = 1600;
Gameflow.settings.screenHeight = 600; Gameflow.settings.screenHeight = 900;
Gameflow.settings.windowTitle = "TR5Main Alpha"; Gameflow.settings.windowTitle = "TR5Main Alpha";
Gameflow.settings.enableDynamicShadows = true; Gameflow.settings.enableDynamicShadows = true;
Gameflow.settings.enableWaterCaustics = true; Gameflow.settings.enableWaterCaustics = true;

View file

@ -128,9 +128,6 @@ GAME_STATUS __cdecl ControlPhase(__int32 numFrames, __int32 demoMode)
ITEM_INFO* item = &Items[itemNum]; ITEM_INFO* item = &Items[itemNum];
__int16 nextItem = item->nextActive; __int16 nextItem = item->nextActive;
//printf("Num: %d Next: %d Death: %d Hitpoints: %d Status: %d\n", itemNum, item->nextActive, item->afterDeath, item->hitPoints, item->status);
//printf("NextItemActive: %d\n", NextItemActive);
if (item->afterDeath < 128) if (item->afterDeath < 128)
{ {
if (Objects[item->objectNumber].control) if (Objects[item->objectNumber].control)

View file

@ -3,8 +3,8 @@
-- Place in this LUA script all the engine settings for your game -- Place in this LUA script all the engine settings for your game
-- WARNING: bad values could make your game unplayable, please follow with attention the reference guide -- WARNING: bad values could make your game unplayable, please follow with attention the reference guide
Gameflow.settings.screenWidth = 800; Gameflow.settings.screenWidth = 1600;
Gameflow.settings.screenHeight = 600; Gameflow.settings.screenHeight = 900;
Gameflow.settings.windowTitle = "TR5Main Alpha"; Gameflow.settings.windowTitle = "TR5Main Alpha";
Gameflow.settings.enableDynamicShadows = true; Gameflow.settings.enableDynamicShadows = true;
Gameflow.settings.enableWaterCaustics = true; Gameflow.settings.enableWaterCaustics = true;

View file

@ -579,7 +579,7 @@ __int32 __cdecl S_LoadLevelFile(__int32 levelIndex)
{ {
DB_Log(2, "S_LoadLevelFile - DLL"); DB_Log(2, "S_LoadLevelFile - DLL");
printf("S_LoadLevelFile\n"); printf("S_LoadLevelFile\n");
SOUND_Stop(); SOUND_Stop();
Sound_FreeSamples(); Sound_FreeSamples();
FreeLevel(); FreeLevel();
@ -594,6 +594,7 @@ __int32 __cdecl S_LoadLevelFile(__int32 levelIndex)
IsLevelLoading = true; IsLevelLoading = true;
hLoadLevel = _beginthreadex(0, 0, LoadLevel, filename, 0, &ThreadId); hLoadLevel = _beginthreadex(0, 0, LoadLevel, filename, 0, &ThreadId);
// This function loops until progress is 100%. Not very thread safe, but behavious should be predictable.
g_Renderer->DrawLoadingScreen((char*)(level->LoadScreenFileName.c_str())); g_Renderer->DrawLoadingScreen((char*)(level->LoadScreenFileName.c_str()));
return true; return true;
@ -658,17 +659,9 @@ bool __cdecl ReadNewDataChunks(ChunkId* chunkId, __int32 maxSize, __int32 arg)
return false; return false;
} }
//ChunkWriter* writer;
void __cdecl SaveTest()
{
}
void __cdecl LoadNewData(__int32 size) void __cdecl LoadNewData(__int32 size)
{ {
// Free old level scripts // Free old level scripts
//g_GameScript->FreeLevelScripts();
MemoryStream stream(LevelDataPtr, size); MemoryStream stream(LevelDataPtr, size);
chunkIO = new ChunkReader(0x4D355254, &stream); chunkIO = new ChunkReader(0x4D355254, &stream);
if (!chunkIO->IsValid()) if (!chunkIO->IsValid())
@ -682,7 +675,6 @@ void Inject_RoomLoad()
INJECT(0x004A6380, LoadItems); INJECT(0x004A6380, LoadItems);
INJECT(0x004A4E60, LoadObjects); INJECT(0x004A4E60, LoadObjects);
INJECT(0x004A3FC0, LoadTextures); INJECT(0x004A3FC0, LoadTextures);
//INJECT(0x004A4DA0, LoadRoomsNew);
INJECT(0x0040130C, S_LoadLevelFile); INJECT(0x0040130C, S_LoadLevelFile);
INJECT(0x004A7130, FreeLevel); INJECT(0x004A7130, FreeLevel);
INJECT(0x004A5430, AdjustUV); INJECT(0x004A5430, AdjustUV);