Skip to content

Commit

Permalink
Merge pull request #20 from roblabla/rename-verybigstruct-to-anmmanager
Browse files Browse the repository at this point in the history
Rename verybigstruct to anmmanager
  • Loading branch information
roblabla authored Oct 15, 2023
2 parents 5a492c0 + 4c43e31 commit 707aa9f
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TH06E_OBJS= $(OBJ_DIR)\main.obj \
$(OBJ_DIR)\MidiOutput.obj \
$(OBJ_DIR)\Pbg3Archive.obj \
$(OBJ_DIR)\SoundPlayer.obj \
$(OBJ_DIR)\VeryBigStruct.obj \
$(OBJ_DIR)\AnmManager.obj \
$(OBJ_DIR)\utils.obj \
$(OBJ_DIR)\th06.res

Expand Down
13 changes: 13 additions & 0 deletions src/AnmManager.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include "AnmManager.hpp"

AnmManager::AnmManager()
{
}
AnmManager::~AnmManager()
{
}
void AnmManager::ReleaseD3dSurfaces(void)
{
}

AnmManager *g_AnmManager;
12 changes: 12 additions & 0 deletions src/AnmManager.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

struct AnmManager
{
AnmManager();
~AnmManager();

void ReleaseD3dSurfaces(void);
char data[0x2112c];
};

extern AnmManager *g_AnmManager;
13 changes: 0 additions & 13 deletions src/VeryBigStruct.cpp

This file was deleted.

12 changes: 0 additions & 12 deletions src/VeryBigStruct.hpp

This file was deleted.

14 changes: 7 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#include <D3DX8.h>
#include <stdio.h>

#include "AnmManager.hpp"
#include "Chain.hpp"
#include "FileSystem.hpp"
#include "GameContext.hpp"
#include "GameErrorContext.hpp"
#include "GameWindow.hpp"
#include "SoundPlayer.hpp"
#include "VeryBigStruct.hpp"
#include "i18n.hpp"
#include "utils.hpp"

Expand Down Expand Up @@ -149,7 +149,7 @@ int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL
i32 testCoopLevelRes;
i32 testResetRes;
MSG msg;
VeryBigStruct *vbs;
AnmManager *anm;

if (CheckForRunningGameInstance())
{
Expand Down Expand Up @@ -193,8 +193,8 @@ int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL
GetJoystickCaps();
ResetKeyboard();

vbs = new VeryBigStruct();
g_VeryBigStruct = vbs;
anm = new AnmManager();
g_AnmManager = anm;

if (AddInputChain() != 0)
{
Expand Down Expand Up @@ -227,7 +227,7 @@ int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL
}
else if (testCoopLevelRes == D3DERR_DEVICENOTRESET)
{
g_VeryBigStruct->ReleaseD3dSurfaces();
g_AnmManager->ReleaseD3dSurfaces();
testResetRes = g_GameContext.d3dDevice->Reset(&g_GameContext.presentParameters);
if (testResetRes != 0)
{
Expand All @@ -244,8 +244,8 @@ int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL
g_Chain.Release();
g_SoundPlayer.Release();

delete g_VeryBigStruct;
g_VeryBigStruct = NULL;
delete g_AnmManager;
g_AnmManager = NULL;
if (g_GameContext.d3dDevice != NULL)
{
g_GameContext.d3dDevice->Release();
Expand Down

0 comments on commit 707aa9f

Please sign in to comment.