Skip to content

Commit

Permalink
menu shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ermaccer committed Jul 27, 2021
1 parent aa4cd38 commit 4af25ff
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/code/RenderWare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,9 @@ RwVideoMode *RwEngineGetVideoModeInfo(RwVideoMode *modeinfo, RwInt32 modeIndex)
RwBool RpClumpDestroy(RpClump * clump)
{
return CallAndReturn<RwBool, 0x61B380, RpClump*>(clump);
}
}

RwBool RpLightDestroy(RpLight *light)
{
return CallAndReturn<RwBool, 0x621700, RpLight*>(light);
}
2 changes: 2 additions & 0 deletions source/code/plugin/eCommonHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
#include "..\manhunt\Scene.h"
#include "..\manhunt\Player.h"
#include "..\plugin\eSkinLoader.h"
#include "eNewFrontend.h"

void HookCommonShutdown()
{
eStatsManager::SaveToFile();
eSkinLoader::Shutdown();
eNewFrontend::DestroyMenuLightWorld();
Call<0x489D50>();
}

Expand Down
7 changes: 7 additions & 0 deletions source/code/plugin/eNewFrontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,3 +875,10 @@ void eNewFrontend::HookCreateMenuLight()

//RwCameraSetViewWindow(CFrontend::GetFrontendCamera(), &aspectRatio);
}

void eNewFrontend::DestroyMenuLightWorld()
{
RpWorldRemoveLight(ms_pMenuWorld, ms_pMenuLight);
RpLightDestroy(ms_pMenuLight);
RpWorldDestroy(ms_pMenuWorld);
}
2 changes: 2 additions & 0 deletions source/code/plugin/eNewFrontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,6 @@ class eNewFrontend {

static void HookDrawRasterLineFX(int a1, int a2, int a3, int a4);
static void HookCreateMenuLight();

static void DestroyMenuLightWorld();
};

0 comments on commit 4af25ff

Please sign in to comment.