TONY: Rename variables and functions in adv.h

This commit is contained in:
Strangerke 2012-06-05 01:15:25 +02:00
parent a5cb751f7a
commit 93cba6d880
9 changed files with 102 additions and 105 deletions

View file

@ -64,23 +64,23 @@ enum RMTonyAction {
}; };
// Global Functions // Global Functions
uint32 MainLoadLocation(int nLoc, RMPoint pt, RMPoint start); uint32 mainLoadLocation(int nLoc, RMPoint pt, RMPoint start);
void MainUnloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result); void mainUnloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result);
void MainLinkGraphicTask(RMGfxTask *task); void mainLinkGraphicTask(RMGfxTask *task);
void MainFreeze(void); void mainFreeze(void);
void MainUnfreeze(void); void mainUnfreeze(void);
void MainWaitFrame(CORO_PARAM); void mainWaitFrame(CORO_PARAM);
void MainShowMouse(void); void mainShowMouse(void);
void MainHideMouse(void); void mainHideMouse(void);
void MainEnableInput(void); void mainEnableInput(void);
void MainDisableInput(void); void mainDisableInput(void);
void MainPlayMusic(int nChannel, const char *filename, int nFX, bool bLoop, int nSync); void mainPlayMusic(int nChannel, const char *filename, int nFX, bool bLoop, int nSync);
void MainInitWipe(int type); void mainInitWipe(int type);
void MainCloseWipe(void); void mainCloseWipe(void);
void MainWaitWipeEnd(CORO_PARAM); void mainWaitWipeEnd(CORO_PARAM);
void MainEnableGUI(void); void mainEnableGUI(void);
void MainDisableGUI(void); void mainDisableGUI(void);
void MainSetPalesati(bool bPalesati); void mainSetPalesati(bool bPalesati);
} // End of namespace Tony } // End of namespace Tony

View file

@ -595,21 +595,18 @@ DECLARE_CUSTOM_FUNCTION(RestoreTonyPosition)(CORO_PARAM, uint32, uint32, uint32,
CORO_END_CODE; CORO_END_CODE;
} }
DECLARE_CUSTOM_FUNCTION(DisableInput)(CORO_PARAM, uint32, uint32, uint32, uint32) { DECLARE_CUSTOM_FUNCTION(DisableInput)(CORO_PARAM, uint32, uint32, uint32, uint32) {
MainDisableInput(); mainDisableInput();
} }
DECLARE_CUSTOM_FUNCTION(EnableInput)(CORO_PARAM, uint32, uint32, uint32, uint32) { DECLARE_CUSTOM_FUNCTION(EnableInput)(CORO_PARAM, uint32, uint32, uint32, uint32) {
MainEnableInput(); mainEnableInput();
} }
DECLARE_CUSTOM_FUNCTION(StopTony)(CORO_PARAM, uint32, uint32, uint32, uint32) { DECLARE_CUSTOM_FUNCTION(StopTony)(CORO_PARAM, uint32, uint32, uint32, uint32) {
GLOBALS.Tony->StopNoAction(coroParam); GLOBALS.Tony->StopNoAction(coroParam);
} }
DECLARE_CUSTOM_FUNCTION(CustEnableGUI)(CORO_PARAM, uint32, uint32, uint32, uint32) { DECLARE_CUSTOM_FUNCTION(CustEnableGUI)(CORO_PARAM, uint32, uint32, uint32, uint32) {
GLOBALS.EnableGUI(); GLOBALS.EnableGUI();
} }
@ -2018,7 +2015,7 @@ DECLARE_CUSTOM_FUNCTION(StartDialog)(CORO_PARAM, uint32 nDialog, uint32 nStartGr
// Draw the pointer // Draw the pointer
GLOBALS.Pointer->SetSpecialPointer(GLOBALS.Pointer->PTR_NONE); GLOBALS.Pointer->SetSpecialPointer(GLOBALS.Pointer->PTR_NONE);
MainShowMouse(); mainShowMouse();
while (!(GLOBALS.Input->mouseLeftClicked() && ((_ctx->sel = _ctx->dc.GetSelection()) != -1))) { while (!(GLOBALS.Input->mouseLeftClicked() && ((_ctx->sel = _ctx->dc.GetSelection()) != -1))) {
CORO_INVOKE_0(GLOBALS.WaitFrame); CORO_INVOKE_0(GLOBALS.WaitFrame);
@ -2028,7 +2025,7 @@ DECLARE_CUSTOM_FUNCTION(StartDialog)(CORO_PARAM, uint32 nDialog, uint32 nStartGr
} }
// Hide the pointer // Hide the pointer
MainHideMouse(); mainHideMouse();
CORO_INVOKE_0(_ctx->dc.Hide); CORO_INVOKE_0(_ctx->dc.Hide);
mpalQueryDialogSelectionDWORD(_ctx->nChoice, _ctx->sl[_ctx->sel]); mpalQueryDialogSelectionDWORD(_ctx->nChoice, _ctx->sl[_ctx->sel]);
@ -2539,19 +2536,19 @@ void setupGlobalVars(RMTony *tony, RMPointer *ptr, RMGameBoxes *box, RMLocation
GLOBALS.Inventory = inv; GLOBALS.Inventory = inv;
GLOBALS.Input = input; GLOBALS.Input = input;
GLOBALS.LoadLocation = MainLoadLocation; GLOBALS.LoadLocation = mainLoadLocation;
GLOBALS.UnloadLocation = MainUnloadLocation; GLOBALS.UnloadLocation = mainUnloadLocation;
GLOBALS.LinkGraphicTask = MainLinkGraphicTask; GLOBALS.LinkGraphicTask = mainLinkGraphicTask;
GLOBALS.Freeze = MainFreeze; GLOBALS.Freeze = mainFreeze;
GLOBALS.Unfreeze = MainUnfreeze; GLOBALS.Unfreeze = mainUnfreeze;
GLOBALS.WaitFrame = MainWaitFrame; GLOBALS.WaitFrame = mainWaitFrame;
GLOBALS.PlayMusic = MainPlayMusic; GLOBALS.PlayMusic = mainPlayMusic;
GLOBALS.InitWipe = MainInitWipe; GLOBALS.InitWipe = mainInitWipe;
GLOBALS.CloseWipe = MainCloseWipe; GLOBALS.CloseWipe = mainCloseWipe;
GLOBALS.WaitWipeEnd = MainWaitWipeEnd; GLOBALS.WaitWipeEnd = mainWaitWipeEnd;
GLOBALS.DisableGUI = MainDisableGUI; GLOBALS.DisableGUI = mainDisableGUI;
GLOBALS.EnableGUI = MainEnableGUI; GLOBALS.EnableGUI = mainEnableGUI;
GLOBALS.SetPalesati = MainSetPalesati; GLOBALS.SetPalesati = mainSetPalesati;
GLOBALS.bAlwaysDisplay = false; GLOBALS.bAlwaysDisplay = false;
int i; int i;

View file

@ -71,7 +71,7 @@ void DebugChangeScene(CORO_PARAM, const void *param) {
GLOBALS.LoadLocation(details->sceneNumber, scenePos, RMPoint(-1, -1)); GLOBALS.LoadLocation(details->sceneNumber, scenePos, RMPoint(-1, -1));
MainEnableGUI(); mainEnableGUI();
CORO_END_CODE; CORO_END_CODE;
} }

View file

@ -2494,11 +2494,11 @@ void RMDialogChoice::Show(CORO_PARAM, RMGfxTargetBuffer *bigBuf) {
_ctx->elaps = 0; _ctx->elaps = 0;
while (_ctx->elaps < 700) { while (_ctx->elaps < 700) {
CORO_INVOKE_0(MainWaitFrame); CORO_INVOKE_0(mainWaitFrame);
MainFreeze(); mainFreeze();
_ctx->elaps = _vm->getTime() - _ctx->starttime; _ctx->elaps = _vm->getTime() - _ctx->starttime;
m_ptDrawPos.y = 480 - ((_ctx->deltay * 100) / 700 * _ctx->elaps) / 100; m_ptDrawPos.y = 480 - ((_ctx->deltay * 100) / 700 * _ctx->elaps) / 100;
MainUnfreeze(); mainUnfreeze();
} }
m_ptDrawPos.y = _ctx->destpt.y; m_ptDrawPos.y = _ctx->destpt.y;
@ -2538,11 +2538,11 @@ void RMDialogChoice::Hide(CORO_PARAM) {
_ctx->deltay = 480 - m_ptDrawPos.y; _ctx->deltay = 480 - m_ptDrawPos.y;
_ctx->elaps = 0; _ctx->elaps = 0;
while (_ctx->elaps < 700) { while (_ctx->elaps < 700) {
CORO_INVOKE_0(MainWaitFrame); CORO_INVOKE_0(mainWaitFrame);
MainFreeze(); mainFreeze();
_ctx->elaps = _vm->getTime() - _ctx->starttime; _ctx->elaps = _vm->getTime() - _ctx->starttime;
m_ptDrawPos.y = 480 - ((_ctx->deltay * 100) / 700 * (700 - _ctx->elaps)) / 100; m_ptDrawPos.y = 480 - ((_ctx->deltay * 100) / 700 * (700 - _ctx->elaps)) / 100;
MainUnfreeze(); mainUnfreeze();
} }
} }

View file

@ -46,75 +46,75 @@ using namespace MPAL;
/* Global functions */ /* Global functions */
/****************************************/ /****************************************/
uint32 MainLoadLocation(int nLoc, RMPoint pt, RMPoint start) { uint32 mainLoadLocation(int nLoc, RMPoint pt, RMPoint start) {
return _vm->getEngine()->loadLocation(nLoc, pt, start); return _vm->getEngine()->loadLocation(nLoc, pt, start);
} }
void MainUnloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) { void mainUnloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) {
_vm->getEngine()->unloadLocation(coroParam, bDoOnExit, result); _vm->getEngine()->unloadLocation(coroParam, bDoOnExit, result);
} }
void MainLinkGraphicTask(RMGfxTask *task) { void mainLinkGraphicTask(RMGfxTask *task) {
_vm->getEngine()->linkGraphicTask(task); _vm->getEngine()->linkGraphicTask(task);
} }
void MainFreeze(void) { void mainFreeze(void) {
_vm->getEngine()->freeze(); _vm->getEngine()->freeze();
} }
void MainUnfreeze(void) { void mainUnfreeze(void) {
_vm->getEngine()->unfreeze(); _vm->getEngine()->unfreeze();
} }
void MainWaitFrame(CORO_PARAM) { void mainWaitFrame(CORO_PARAM) {
CoroScheduler.waitForSingleObject(coroParam, _vm->_hEndOfFrame, CORO_INFINITE); CoroScheduler.waitForSingleObject(coroParam, _vm->_hEndOfFrame, CORO_INFINITE);
} }
void MainShowMouse(void) { void mainShowMouse(void) {
_vm->getEngine()->enableMouse(); _vm->getEngine()->enableMouse();
} }
void MainHideMouse(void) { void mainHideMouse(void) {
_vm->getEngine()->disableMouse(); _vm->getEngine()->disableMouse();
} }
void MainPlayMusic(int nChannel, const char *filename, int nFX, bool bLoop, int nSync) { void mainPlayMusic(int nChannel, const char *filename, int nFX, bool bLoop, int nSync) {
_vm->playMusic(nChannel, filename, nFX, bLoop, nSync); _vm->playMusic(nChannel, filename, nFX, bLoop, nSync);
} }
void MainDisableInput(void) { void mainDisableInput(void) {
_vm->getEngine()->disableInput(); _vm->getEngine()->disableInput();
} }
void MainEnableInput(void) { void mainEnableInput(void) {
_vm->getEngine()->enableInput(); _vm->getEngine()->enableInput();
} }
void MainInitWipe(int type) { void mainInitWipe(int type) {
_vm->getEngine()->initWipe(type); _vm->getEngine()->initWipe(type);
} }
void MainCloseWipe(void) { void mainCloseWipe(void) {
_vm->getEngine()->closeWipe(); _vm->getEngine()->closeWipe();
} }
void MainWaitWipeEnd(CORO_PARAM) { void mainWaitWipeEnd(CORO_PARAM) {
_vm->getEngine()->waitWipeEnd(coroParam); _vm->getEngine()->waitWipeEnd(coroParam);
} }
void MainEnableGUI(void) { void mainEnableGUI(void) {
_vm->getEngine()->_bGUIInterface = true; _vm->getEngine()->_bGUIInterface = true;
_vm->getEngine()->_bGUIInventory = true; _vm->getEngine()->_bGUIInventory = true;
_vm->getEngine()->_bGUIOption = true; _vm->getEngine()->_bGUIOption = true;
} }
void MainDisableGUI(void) { void mainDisableGUI(void) {
_vm->getEngine()->_bGUIInterface = false; _vm->getEngine()->_bGUIInterface = false;
_vm->getEngine()->_bGUIInventory = false; _vm->getEngine()->_bGUIInventory = false;
_vm->getEngine()->_bGUIOption = false; _vm->getEngine()->_bGUIOption = false;
} }
void MainSetPalesati(bool bPalesati) { void mainSetPalesati(bool bPalesati) {
_vm->getEngine()->setPalesati(bPalesati); _vm->getEngine()->setPalesati(bPalesati);
} }

View file

@ -366,10 +366,10 @@ void RMGfxEngine::itemIrq(uint32 dwItem, int nPattern, int nStatus) {
if (item != NULL) { if (item != NULL) {
if (nPattern != -1) { if (nPattern != -1) {
if (GLOBALS.bPatIrqFreeze) if (GLOBALS.bPatIrqFreeze)
MainFreeze(); mainFreeze();
item->SetPattern(nPattern, true); item->SetPattern(nPattern, true);
if (GLOBALS.bPatIrqFreeze) if (GLOBALS.bPatIrqFreeze)
MainUnfreeze(); mainUnfreeze();
} }
if (nStatus != -1) if (nStatus != -1)
item->SetStatus(nStatus); item->SetStatus(nStatus);
@ -450,7 +450,7 @@ void RMGfxEngine::unloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) {
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE); CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE);
} }
MainFreeze(); mainFreeze();
_bLocationLoaded = false; _bLocationLoaded = false;
@ -814,7 +814,7 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) {
CORO_INVOKE_2(unloadLocation, false, NULL); CORO_INVOKE_2(unloadLocation, false, NULL);
loadLocation(_ctx->loc, _ctx->tp, RMPoint(-1, -1)); loadLocation(_ctx->loc, _ctx->tp, RMPoint(-1, -1));
_tony.SetPattern(RMTony::PAT_STANDRIGHT); _tony.SetPattern(RMTony::PAT_STANDRIGHT);
MainUnfreeze(); mainUnfreeze();
// On older versions, need to an enter action // On older versions, need to an enter action
if (_ctx->ver < 5) if (_ctx->ver < 5)

View file

@ -886,8 +886,8 @@ void RMWipe::WaitForFadeEnd(CORO_PARAM) {
m_bEndFade = true; m_bEndFade = true;
m_bFading = false; m_bFading = false;
CORO_INVOKE_0(MainWaitFrame); CORO_INVOKE_0(mainWaitFrame);
CORO_INVOKE_0(MainWaitFrame); CORO_INVOKE_0(mainWaitFrame);
CORO_END_CODE; CORO_END_CODE;
} }

View file

@ -402,12 +402,12 @@ void TonyEngine::autoSave(CORO_PARAM) {
CORO_BEGIN_CODE(_ctx); CORO_BEGIN_CODE(_ctx);
grabThumbnail(); grabThumbnail();
CORO_INVOKE_0(MainWaitFrame); CORO_INVOKE_0(mainWaitFrame);
CORO_INVOKE_0(MainWaitFrame); CORO_INVOKE_0(mainWaitFrame);
MainFreeze(); mainFreeze();
_ctx->buf = getSaveStateFileName(0); _ctx->buf = getSaveStateFileName(0);
_theEngine.saveState(_ctx->buf, (byte *)_curThumbnail, "Autosave"); _theEngine.saveState(_ctx->buf, (byte *)_curThumbnail, "Autosave");
MainUnfreeze(); mainUnfreeze();
CORO_END_CODE; CORO_END_CODE;
} }

View file

@ -596,7 +596,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
if (m_bPastorella) { if (m_bPastorella) {
// Talking whilst a shepherdess // Talking whilst a shepherdess
MainFreeze(); mainFreeze();
switch (m_TalkDirection) { switch (m_TalkDirection) {
case UP: case UP:
SetPattern(PAT_PAST_TALKUP); SetPattern(PAT_PAST_TALKUP);
@ -614,7 +614,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
SetPattern(PAT_PAST_TALKRIGHT); SetPattern(PAT_PAST_TALKRIGHT);
break; break;
} }
MainUnfreeze(); mainUnfreeze();
return false; return false;
} }
@ -1127,10 +1127,10 @@ void RMTony::StartTalk(CORO_PARAM, TALKTYPE nTalkType) {
// Perform the set pattern // Perform the set pattern
if (_ctx->headStartPat != 0 || _ctx->bodyStartPat != 0) { if (_ctx->headStartPat != 0 || _ctx->bodyStartPat != 0) {
MainFreeze(); mainFreeze();
SetPattern(_ctx->headStartPat); SetPattern(_ctx->headStartPat);
m_body.SetPattern(_ctx->bodyStartPat); m_body.SetPattern(_ctx->bodyStartPat);
MainUnfreeze(); mainUnfreeze();
if (_ctx->bodyStartPat != 0) if (_ctx->bodyStartPat != 0)
CORO_INVOKE_0(m_body.WaitForEndPattern); CORO_INVOKE_0(m_body.WaitForEndPattern);
@ -1138,11 +1138,11 @@ void RMTony::StartTalk(CORO_PARAM, TALKTYPE nTalkType) {
CORO_INVOKE_0(WaitForEndPattern); CORO_INVOKE_0(WaitForEndPattern);
} }
MainFreeze(); mainFreeze();
SetPattern(_ctx->headLoopPat); SetPattern(_ctx->headLoopPat);
if (_ctx->bodyLoopPat) if (_ctx->bodyLoopPat)
m_body.SetPattern(_ctx->bodyLoopPat); m_body.SetPattern(_ctx->bodyLoopPat);
MainUnfreeze(); mainUnfreeze();
CORO_END_CODE; CORO_END_CODE;
} }
@ -1175,9 +1175,9 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
} }
if (m_bPastorella) { if (m_bPastorella) {
MainFreeze(); mainFreeze();
SetPattern(finalPat); SetPattern(finalPat);
MainUnfreeze(); mainUnfreeze();
m_bIsTalking = false; m_bIsTalking = false;
return false; return false;
} }
@ -1447,7 +1447,7 @@ void RMTony::EndTalk(CORO_PARAM) {
// Handles the end of an animated and static, leaving everything unchanged // Handles the end of an animated and static, leaving everything unchanged
if (m_bIsStaticTalk) { if (m_bIsStaticTalk) {
if (m_nTalkType == TALK_CONBARBASTATIC) { if (m_nTalkType == TALK_CONBARBASTATIC) {
MainFreeze(); mainFreeze();
SetPattern(0); SetPattern(0);
if (m_TalkDirection == UP || m_TalkDirection == LEFT) { if (m_TalkDirection == UP || m_TalkDirection == LEFT) {
m_body.SetPattern(BPAT_CONBARBALEFT_STATIC); m_body.SetPattern(BPAT_CONBARBALEFT_STATIC);
@ -1456,11 +1456,11 @@ void RMTony::EndTalk(CORO_PARAM) {
m_body.SetPattern(BPAT_CONBARBARIGHT_STATIC); m_body.SetPattern(BPAT_CONBARBARIGHT_STATIC);
m_nBodyOffset.Set(-26, -14); m_nBodyOffset.Set(-26, -14);
} }
MainUnfreeze(); mainUnfreeze();
} else { } else {
MainFreeze(); mainFreeze();
SetPattern(_ctx->headStandPat); SetPattern(_ctx->headStandPat);
MainUnfreeze(); mainUnfreeze();
CORO_INVOKE_0(m_body.WaitForEndPattern); CORO_INVOKE_0(m_body.WaitForEndPattern);
} }
@ -1471,36 +1471,36 @@ void RMTony::EndTalk(CORO_PARAM) {
// Set the pattern // Set the pattern
if (_ctx->headEndPat != 0 && _ctx->bodyEndPat != 0) { if (_ctx->headEndPat != 0 && _ctx->bodyEndPat != 0) {
MainFreeze(); mainFreeze();
SetPattern(_ctx->headEndPat); SetPattern(_ctx->headEndPat);
MainUnfreeze(); mainUnfreeze();
CORO_INVOKE_0(m_body.WaitForEndPattern); CORO_INVOKE_0(m_body.WaitForEndPattern);
MainFreeze(); mainFreeze();
m_body.SetPattern(_ctx->bodyEndPat); m_body.SetPattern(_ctx->bodyEndPat);
MainUnfreeze(); mainUnfreeze();
CORO_INVOKE_0(WaitForEndPattern); CORO_INVOKE_0(WaitForEndPattern);
CORO_INVOKE_0(m_body.WaitForEndPattern); CORO_INVOKE_0(m_body.WaitForEndPattern);
} else if (_ctx->bodyEndPat != 0) { } else if (_ctx->bodyEndPat != 0) {
MainFreeze(); mainFreeze();
SetPattern(_ctx->headStandPat); SetPattern(_ctx->headStandPat);
MainUnfreeze(); mainUnfreeze();
CORO_INVOKE_0(m_body.WaitForEndPattern); CORO_INVOKE_0(m_body.WaitForEndPattern);
MainFreeze(); mainFreeze();
m_body.SetPattern(_ctx->bodyEndPat); m_body.SetPattern(_ctx->bodyEndPat);
MainUnfreeze(); mainUnfreeze();
CORO_INVOKE_0(m_body.WaitForEndPattern); CORO_INVOKE_0(m_body.WaitForEndPattern);
} else if (_ctx->headEndPat != 0) { } else if (_ctx->headEndPat != 0) {
CORO_INVOKE_0(m_body.WaitForEndPattern); CORO_INVOKE_0(m_body.WaitForEndPattern);
MainFreeze(); mainFreeze();
SetPattern(_ctx->headEndPat); SetPattern(_ctx->headEndPat);
MainUnfreeze(); mainUnfreeze();
CORO_INVOKE_0(WaitForEndPattern); CORO_INVOKE_0(WaitForEndPattern);
} else { } else {
@ -1508,10 +1508,10 @@ void RMTony::EndTalk(CORO_PARAM) {
} }
if (_ctx->finalPat != 0) { if (_ctx->finalPat != 0) {
MainFreeze(); mainFreeze();
m_body.SetPattern(0); m_body.SetPattern(0);
SetPattern(_ctx->finalPat); SetPattern(_ctx->finalPat);
MainUnfreeze(); mainUnfreeze();
} }
m_bIsTalking = false; m_bIsTalking = false;
@ -1740,19 +1740,19 @@ void RMTony::StartStatic(CORO_PARAM, TALKTYPE nTalk) {
// e vai con i pattern // e vai con i pattern
m_bIsStaticTalk = true; m_bIsStaticTalk = true;
MainFreeze(); mainFreeze();
SetPattern(_ctx->headPat); SetPattern(_ctx->headPat);
m_body.SetPattern(_ctx->bodyStartPat); m_body.SetPattern(_ctx->bodyStartPat);
MainUnfreeze(); mainUnfreeze();
CORO_INVOKE_0(m_body.WaitForEndPattern); CORO_INVOKE_0(m_body.WaitForEndPattern);
CORO_INVOKE_0(WaitForEndPattern); CORO_INVOKE_0(WaitForEndPattern);
MainFreeze(); mainFreeze();
if (_ctx->headLoopPat != -1) if (_ctx->headLoopPat != -1)
SetPattern(_ctx->headLoopPat); SetPattern(_ctx->headLoopPat);
m_body.SetPattern(_ctx->bodyLoopPat); m_body.SetPattern(_ctx->bodyLoopPat);
MainUnfreeze(); mainUnfreeze();
CORO_END_CODE; CORO_END_CODE;
} }
@ -1910,24 +1910,24 @@ void RMTony::EndStatic(CORO_PARAM, TALKTYPE nTalk) {
EndStaticCalculate(nTalk, _ctx->bodyEndPat, _ctx->finalPat, _ctx->headEndPat); EndStaticCalculate(nTalk, _ctx->bodyEndPat, _ctx->finalPat, _ctx->headEndPat);
if (_ctx->headEndPat != 0) { if (_ctx->headEndPat != 0) {
MainFreeze(); mainFreeze();
SetPattern(_ctx->headEndPat); SetPattern(_ctx->headEndPat);
MainUnfreeze(); mainUnfreeze();
CORO_INVOKE_0(WaitForEndPattern); CORO_INVOKE_0(WaitForEndPattern);
} else { } else {
// Play please // Play please
MainFreeze(); mainFreeze();
m_body.SetPattern(_ctx->bodyEndPat); m_body.SetPattern(_ctx->bodyEndPat);
MainUnfreeze(); mainUnfreeze();
CORO_INVOKE_0(m_body.WaitForEndPattern); CORO_INVOKE_0(m_body.WaitForEndPattern);
} }
MainFreeze(); mainFreeze();
SetPattern(_ctx->finalPat); SetPattern(_ctx->finalPat);
m_body.SetPattern(0); m_body.SetPattern(0);
MainUnfreeze(); mainUnfreeze();
m_bIsStaticTalk = false; m_bIsStaticTalk = false;