summaryrefslogtreecommitdiff
path: root/src/koopatlas/core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/koopatlas/core.cpp')
-rw-r--r--src/koopatlas/core.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp
index 5e15d99..4a0d190 100644
--- a/src/koopatlas/core.cpp
+++ b/src/koopatlas/core.cpp
@@ -219,26 +219,33 @@ bool WMInit_SetupExtra(void *ptr) {
STKI_ITEM(wm->stockItem,i) = obj;
}
+ // need Player before we can set up paths
+ SpammyReport("creating player\n");
+ wm->player = (daWMPlayer_c*)CreateParentedObject(WM_PLAYER, wm, 0, 2);
+ wm->player->modelHandler->mdlClass->setPowerup(2);
+ wm->player->modelHandler->mdlClass->startAnimation(0, 1.2f, 10.0f, 0.0f);
+
// since we've got all the resources, set up the path data too
SpammyReport("preparing level info\n");
wm->levelInfo.load(wm->levelInfoLoader.buffer);
+ SpammyReport("preparing path manager\n");
wm->pathManager.setup();
- // and now Player setup
- wm->player = (daWMPlayer_c*)CreateParentedObject(WM_PLAYER, wm, 0, 2);
- wm->player->modelHandler->mdlClass->setPowerup(2);
- wm->player->modelHandler->mdlClass->startAnimation(0, 1.2f, 10.0f, 0.0f);
-
+ // and put the player into position
dKPNode_s *cNode = wm->pathManager.currentNode;
wm->player->pos = (Vec){cNode->x, -cNode->y, wm->player->pos.z};
// is last param correct? must check :/
+ SpammyReport("creating MAP\n");
wm->map = (dWMMap_c*)CreateParentedObject(WM_MAP, wm, 0, 0);
+ SpammyReport("creating HUD\n");
wm->hud = (dWMHud_c*)CreateParentedObject(WM_HUD, wm, 0, 0);
// note: world_camera is not created here
// because we require it earlier
// it is created in dScKoopatlas_c::onCreate
+ SpammyReport("SetupExtra done\n");
+
return true;
}
@@ -249,6 +256,11 @@ bool WMInit_SetupWipe(void *ptr) {
if (wm->hasUninitialisedProcesses()) {
SpammyReport("WMInit_SetupWipe returning false\n");
+
+#ifdef WM_SPAMMY_DEBUGGING
+ fBase_c *p = wm->findNextUninitialisedProcess();
+ SpammyReport("Not done yet: %p [%d]\n", p, p->name);
+#endif
return false;
}
@@ -394,7 +406,7 @@ bool dScKoopatlas_c::canDoStuff() {
int dScKoopatlas_c::onExecute() {
if (!canDoStuff()) return true;
- SpammyReport("Executing state: %s\n", state.getCurrentState()->getName());
+ //SpammyReport("Executing state: %s\n", state.getCurrentState()->getName());
state.execute();
return true;