TONY: Fix a crash from objects being destroyed in the wrong order
This commit is contained in:
parent
fbee927c6a
commit
aa603d5a67
4 changed files with 13 additions and 6 deletions
|
@ -410,7 +410,6 @@ void TonyEngine::Close(void) {
|
||||||
CloseMusic();
|
CloseMusic();
|
||||||
CloseHandle(m_hEndOfFrame);
|
CloseHandle(m_hEndOfFrame);
|
||||||
_theBoxes.Close();
|
_theBoxes.Close();
|
||||||
RMText::Unload();
|
|
||||||
_theEngine.Close();
|
_theEngine.Close();
|
||||||
m_wnd.Close();
|
m_wnd.Close();
|
||||||
delete[] m_curThumbnail;
|
delete[] m_curThumbnail;
|
||||||
|
|
|
@ -108,7 +108,6 @@ public:
|
||||||
FPSTREAM *m_stream[6];
|
FPSTREAM *m_stream[6];
|
||||||
FPSFX *m_sfx[MAX_SFX_CHANNELS];
|
FPSFX *m_sfx[MAX_SFX_CHANNELS];
|
||||||
FPSFX *m_utilSfx[MAX_SFX_CHANNELS];
|
FPSFX *m_utilSfx[MAX_SFX_CHANNELS];
|
||||||
RMGfxEngine theEngine;
|
|
||||||
RMFont *fonts[2];
|
RMFont *fonts[2];
|
||||||
bool m_bPaused;
|
bool m_bPaused;
|
||||||
bool m_bDrawLocation;
|
bool m_bDrawLocation;
|
||||||
|
@ -117,8 +116,8 @@ public:
|
||||||
|
|
||||||
// Bounding box list manager
|
// Bounding box list manager
|
||||||
RMGameBoxes _theBoxes;
|
RMGameBoxes _theBoxes;
|
||||||
RMGfxEngine _theEngine;
|
|
||||||
RMWindow m_wnd;
|
RMWindow m_wnd;
|
||||||
|
RMGfxEngine _theEngine;
|
||||||
|
|
||||||
bool m_bQuitNow;
|
bool m_bQuitNow;
|
||||||
bool m_bTimeFreezed;
|
bool m_bTimeFreezed;
|
||||||
|
|
|
@ -57,9 +57,18 @@ namespace Tony {
|
||||||
static uint16 m_wPrecalcTable[0x10000];
|
static uint16 m_wPrecalcTable[0x10000];
|
||||||
|
|
||||||
/****************************************************************************\
|
/****************************************************************************\
|
||||||
* Metodi di RMWindow
|
* RMWindow Methods
|
||||||
\****************************************************************************/
|
\****************************************************************************/
|
||||||
|
|
||||||
|
RMWindow::RMWindow() {
|
||||||
|
m_Primary = NULL; m_Back = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
RMWindow::~RMWindow() {
|
||||||
|
Close();
|
||||||
|
RMText::Unload();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef REFACTOR_ME
|
#ifdef REFACTOR_ME
|
||||||
LRESULT CALLBACK GlobalWindowProc(HWND hWnd, uint32 msg, uint16 wParam, int32 lParam) {
|
LRESULT CALLBACK GlobalWindowProc(HWND hWnd, uint32 msg, uint16 wParam, int32 lParam) {
|
||||||
if ((HWND)theGame.m_wnd == NULL)
|
if ((HWND)theGame.m_wnd == NULL)
|
||||||
|
|
|
@ -121,8 +121,8 @@ protected:
|
||||||
void WipeEffect(Common::Rect &rcBoundEllipse);
|
void WipeEffect(Common::Rect &rcBoundEllipse);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RMWindow() { m_Primary = NULL; m_Back = NULL; };
|
RMWindow();
|
||||||
~RMWindow() { Close(); }
|
~RMWindow();
|
||||||
|
|
||||||
// Inizializzazione
|
// Inizializzazione
|
||||||
void Init(/*HINSTANCE hInst*/);
|
void Init(/*HINSTANCE hInst*/);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue