diff options
author | Treeki <treeki@gmail.com> | 2012-10-07 03:44:34 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-10-07 03:44:34 +0200 |
commit | ca0c9bcb0ff52cb1a9dbeb66a9065b855f1c365f (patch) | |
tree | 2e144c77d067a4fd3bcb4858b37aecbfafefc330 /src | |
parent | 3de0e0bdf41fc05c15d21dfa67f267b0024ab4f0 (diff) | |
download | kamek-ca0c9bcb0ff52cb1a9dbeb66a9065b855f1c365f.tar.gz kamek-ca0c9bcb0ff52cb1a9dbeb66a9065b855f1c365f.zip |
fixed Continue on the world map
Diffstat (limited to 'src')
-rw-r--r-- | src/koopatlas/core.cpp | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index c1f7a43..b43b62a 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -7,7 +7,7 @@ extern "C" void LoadMapScene(); dScKoopatlas_c *dScKoopatlas_c::instance = 0; CREATE_STATE_E(dScKoopatlas_c, Limbo); -CREATE_STATE_E(dScKoopatlas_c, ContinueWait); +CREATE_STATE(dScKoopatlas_c, ContinueWait); CREATE_STATE_E(dScKoopatlas_c, Normal); CREATE_STATE_E(dScKoopatlas_c, CSMenu); CREATE_STATE_E(dScKoopatlas_c, TitleConfirmOpenWait); @@ -221,6 +221,15 @@ bool WMInit_SetupExtra(void *ptr) { // ok, now we can set up other required shit dScKoopatlas_c *wm = (dScKoopatlas_c*)ptr; + // check if we need to handle Continue + if (CheckIfContinueShouldBeActivated()) { + SpammyReport("continue is activated\n"); + wm->state.setState(&wm->StateID_ContinueWait); + } else { + SpammyReport("continue is not activated\n"); + wm->state.setState(&wm->StateID_Normal); + } + // first up: player models for Stocked Items for (int i = 0; i < 4; i++) { void *obj = CreateChildObject(WM_2D_PLAYER, wm, i, 0, 0); @@ -371,18 +380,6 @@ int dScKoopatlas_c::onCreate() { SpammyReport("continue\n"); this->continueObj = CreateParentedObject(CONTINUE, this, 0, 0); - // check if we need to handle Continue - if (CheckIfContinueShouldBeActivated()) { - SpammyReport("continue is activated\n"); - state.setState(&StateID_ContinueWait); - CONT_UNK1(this->continueObj) = true; - CONT_UNK2(this->continueObj) = true; - CONT_UNK3(this->continueObj) = false; - } else { - SpammyReport("continue is not activated\n"); - state.setState(&StateID_Normal); - } - SpammyReport("stock item\n"); this->stockItem = CreateParentedObject(STOCK_ITEM, this, 0, 0); SpammyReport("stock item shadow\n"); @@ -459,6 +456,12 @@ int dScKoopatlas_c::onExecute() { void dScKoopatlas_c::executeState_Limbo() { } +void dScKoopatlas_c::beginState_ContinueWait() { + GameMgrP->_AFC = 1; + CONT_UNK1(this->continueObj) = true; + CONT_UNK2(this->continueObj) = true; + CONT_UNK3(this->continueObj) = false; +} void dScKoopatlas_c::executeState_ContinueWait() { // Waiting for the Continue anim to finish if (CONT_DONE(this->continueObj)) { @@ -474,6 +477,10 @@ void dScKoopatlas_c::executeState_ContinueWait() { state.setState(&StateID_Normal); } } +void dScKoopatlas_c::endState_ContinueWait() { + GameMgrP->_AFC = 0; +} + void dScKoopatlas_c::executeState_Normal() { int nowPressed = Remocon_GetPressed(GetActiveRemocon()); |