diff options
Diffstat (limited to 'src/worldmap.cpp')
-rw-r--r-- | src/worldmap.cpp | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/src/worldmap.cpp b/src/worldmap.cpp index 12c3486..4f8b0c5 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -97,11 +97,15 @@ dScNewerWorldMap_c::dScNewerWorldMap_c() { #define CONT_UNK3(cont) (*((bool*)(((u32)(cont))+0x2E0)))
bool WMInit_StartLoading(void *ptr) {
+ SpammyReport("WMInit_StartLoading called\n");
+
DVD_Start();
return true;
}
bool WMInit_LoadSIAnims(void *ptr) {
+ SpammyReport("WMInit_LoadSIAnims called\n");
+
DVD_LoadFile(GetDVDClass(), "WorldMap", "SI_kinoko", 0);
DVD_LoadFile(GetDVDClass(), "WorldMap", "SI_fireflower", 0);
DVD_LoadFile(GetDVDClass(), "WorldMap", "SI_iceflower", 0);
@@ -112,19 +116,28 @@ bool WMInit_LoadSIAnims(void *ptr) { }
bool WMInit_EndLoading(void *ptr) {
- if (DVD_StillLoading(GetDVDClass2()))
+ SpammyReport("WMInit_EndLoading called\n");
+
+ if (DVD_StillLoading(GetDVDClass2())) {
+ SpammyReport("WMInit_EndLoading returning false\n");
return false;
+ }
DVD_End();
+ SpammyReport("WMInit_EndLoading returning true\n");
return true;
}
bool WMInit_LoadResources(void *ptr) {
+ SpammyReport("WMInit_LoadResources returning true\n");
+
dScNewerWorldMap_c *wm = (dScNewerWorldMap_c*)ptr;
return wm->resMng.loadSet("MMFullWorld");
}
bool WMInit_SetupWait(void *ptr) {
+ SpammyReport("WMInit_SetupWait called\n");
+
dScNewerWorldMap_c *wm = (dScNewerWorldMap_c*)ptr;
bool success = true;
@@ -142,6 +155,8 @@ bool WMInit_SetupWait(void *ptr) { }
bool WMInit_SetupExtra(void *ptr) {
+ SpammyReport("WMInit_SetupExtra called\n");
+
// ok, now we can set up other required shit
dScNewerWorldMap_c *wm = (dScNewerWorldMap_c*)ptr;
@@ -176,16 +191,22 @@ bool WMInit_SetupExtra(void *ptr) { // is last param correct? must check :/
wm->map = (dWMMap_c*)CreateParentedObject(WM_MAP, wm, 0, 0);
+ wm->hud = (dWMHud_c*)CreateParentedObject(WM_HUD, wm, 0, 0);
return true;
}
bool WMInit_SetupWipe(void *ptr) {
+ SpammyReport("WMInit_SetupWipe called\n");
+
dScNewerWorldMap_c *wm = (dScNewerWorldMap_c*)ptr;
- if (wm->hasUninitialisedProcesses())
+ if (wm->hasUninitialisedProcesses()) {
+ SpammyReport("WMInit_SetupWipe returning false\n");
return false;
+ }
+ SpammyReport("WMInit_SetupWipe returning true\n");
return true;
}
@@ -255,19 +276,35 @@ void dScNewerWorldMap_c::StartLevel(LevelInfo::Entry *entry) { int dScNewerWorldMap_c::onCreate() {
+ SpammyReport("onCreate() called\n");
+
+ SpammyReport("LoadMapScene()\n");
LoadMapScene();
+
+ SpammyReport("GameSetup__LoadScene(0)\n");
GameSetup__LoadScene(0); // lol, stolen from GAME_SETUP
+ SpammyReport("select cursor\n");
this->selectCursor = CreateParentedObject(SELECT_CURSOR, this, 0, 0);
+
+ SpammyReport("cs menu\n");
this->csMenu = CreateParentedObject(COURSE_SELECT_MENU, this, 0, 0);
+
+ SpammyReport("yes no window\n");
this->yesNoWindow = CreateParentedObject(YES_NO_WINDOW, this, 0, 0);
+
+ SpammyReport("number of people change\n");
this->numPeopleChange = CreateParentedObject(NUMBER_OF_PEOPLE_CHANGE, this, 0, 0);
for (int i = 0; i < 4; i++) {
+ SpammyReport("ccsb %d\n", i);
void *ccsb = CreateParentedObject(CHARACTER_CHANGE_SELECT_BASE, this, i, 0);
+ SpammyReport("ccsc %d\n", i);
void *ccsc = CreateParentedObject(CHARACTER_CHANGE_SELECT_CONTENTS, this, i, 0);
+ SpammyReport("ccsa %d\n", i);
void *ccsa = CreateParentedObject(CHARACTER_CHANGE_SELECT_ARROW, this, i, 0);
+ SpammyReport("ccsi %d\n", i);
void *cci = CreateParentedObject(CHARACTER_CHANGE_INDICATOR, this, i, 0);
NPCHG_CCSB(this->numPeopleChange, i) = ccsb;
@@ -276,32 +313,43 @@ int dScNewerWorldMap_c::onCreate() { NPCHG_CCI(this->numPeopleChange, i) = cci;
}
+ SpammyReport("continue\n");
this->continueObj = CreateParentedObject(CONTINUE, this, 0, 0);
// check if we need to handle Continue
if (CheckIfContinueShouldBeActivated()) {
+ SpammyReport("continue is activated\n");
this->state = STATE_CONTINUE_WAIT;
CONT_UNK1(this->continueObj) = true;
CONT_UNK2(this->continueObj) = true;
CONT_UNK3(this->continueObj) = false;
} else {
+ SpammyReport("continue is not activated\n");
this->state = STATE_NORMAL;
}
+ SpammyReport("stock item\n");
this->stockItem = CreateParentedObject(STOCK_ITEM, this, 0, 0);
+ SpammyReport("stock item shadow\n");
this->stockItemShadow = CreateParentedObject(STOCK_ITEM_SHADOW, this, 0, 0);
STKI_SHADOW(this->stockItem) = this->stockItemShadow;
+ SpammyReport("easy pairing\n");
this->easyPairing = CreateParentedObject(EASY_PAIRING, this, 0, 0);
+ SpammyReport("world camera\n");
CreateParentedObject(WORLD_CAMERA, this, 0, 0);
+ SpammyReport("setting NewerMapDrawFunc\n");
*CurrentDrawFunc = NewerMapDrawFunc;
// level info
+ SpammyReport("loading level info file\n");
levelInfoFile.open("/NewerRes/LevelInfo.bin");
+ SpammyReport("preparing level info\n");
levelInfo.load(levelInfoFile.ptr());
+ SpammyReport("onCreate() completed\n");
return true;
}
|