summaryrefslogtreecommitdiff
path: root/src/worldmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/worldmap.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/worldmap.cpp b/src/worldmap.cpp
index cf40166..7bfa461 100644
--- a/src/worldmap.cpp
+++ b/src/worldmap.cpp
@@ -218,24 +218,32 @@ void dScNewerWorldMap_c::GenText() {
}
int dScNewerWorldMap_c::onCreate() {
+ OSReport("1:Loading scene\n");
+
LoadMapScene();
+ OSReport("2:Loading scene\n");
GameSetup__LoadScene(0); // lol, stolen from GAME_SETUP
+ OSReport("3:Layout alloc\n");
this->layout = (Layout*)AllocFromGameHeap1(sizeof(Layout));
if (!this->layout) {
OSReport("memalloc fail\n");
InfiniteLoop;
}
+ OSReport("4:Layout ctor\n");
EmbeddedLayout_ctor(this->layout);
+ OSReport("5:Layout load arc\n");
EmbeddedLayout_LoadArc(this->layout, "NewerRes/wmap.arc");
+ OSReport("6:Layout build\n");
if (!EmbeddedLayout_Build(this->layout, "levelSelect.brlyt", 0)) {
OSReport("build fail\n");
InfiniteLoop;
}
+ OSReport("7:Layout load brlan\n");
const char *anims[2] = {anim1, anim2};
EmbeddedLayout_LoadBrlans(this->layout, anims, 2);
@@ -249,8 +257,10 @@ int dScNewerWorldMap_c::onCreate() {
};
int mappings[30] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+ OSReport("8:Layout load group\n");
EmbeddedLayout_LoadGroups(this->layout, groups, mappings, 30);
+ OSReport("9:Layout reset anims\n");
EmbeddedLayout_DisableAllAnims(this->layout);
for (int i = 0; i < 15; i++) {
@@ -258,12 +268,17 @@ int dScNewerWorldMap_c::onCreate() {
}
+ OSReport("10:Item 1\n");
this->selectCursor = CreateParentedObject(SELECT_CURSOR, this, 0, 0);
+ OSReport("11:Item 2\n");
this->csMenu = CreateParentedObject(COURSE_SELECT_MENU, this, 0, 0);
+ OSReport("12:Item 3\n");
this->yesNoWindow = CreateParentedObject(YES_NO_WINDOW, this, 0, 0);
+ OSReport("13:Item 4\n");
this->numPeopleChange = CreateParentedObject(NUMBER_OF_PEOPLE_CHANGE, this, 0, 0);
for (int i = 0; i < 4; i++) {
+ OSReport("14:Character change select %d\n", i);
void *ccsb = CreateParentedObject(CHARACTER_CHANGE_SELECT_BASE, this, i, 0);
void *ccsc = CreateParentedObject(CHARACTER_CHANGE_SELECT_CONTENTS, this, i, 0);
void *ccsa = CreateParentedObject(CHARACTER_CHANGE_SELECT_ARROW, this, i, 0);
@@ -275,12 +290,16 @@ int dScNewerWorldMap_c::onCreate() {
NPCHG_CCI(this->numPeopleChange, i) = cci;
}
+ OSReport("15:Item 5\n");
this->continueObj = CreateParentedObject(CONTINUE, this, 0, 0);
+ OSReport("16:Item 6\n");
this->stockItem = CreateParentedObject(STOCK_ITEM, this, 0, 0);
+ OSReport("17:Item 7\n");
this->stockItemShadow = CreateParentedObject(STOCK_ITEM_SHADOW, this, 0, 0);
STKI_SHADOW(this->stockItem) = this->stockItemShadow;
+ OSReport("18:Item 8\n");
this->easyPairing = CreateParentedObject(EASY_PAIRING, this, 0, 0);
this->state = STATE_START_DVD;
@@ -290,10 +309,13 @@ int dScNewerWorldMap_c::onCreate() {
*CurrentDrawFunc = NewerMapDrawFunc;
// level info
+ OSReport("19:Load level info\n");
this->levelInfo = LoadFile(&this->levelInfoFH, "/NewerRes/LevelInfo.bin");
+ OSReport("20:Prepare level info\n");
LevelInfo_Prepare(&this->levelInfoFH);
// load the menu info
+ OSReport("21:Load save info\n");
SaveBlock *save = GetSaveFile()->GetBlock(-1);
this->currentPage = save->current_world;
@@ -312,10 +334,13 @@ int dScNewerWorldMap_c::onCreate() {
this->selections[this->currentPage] = save->current_path_node;
// show button anim
+ OSReport("22:Enable anim\n");
EmbeddedLayout_EnableNonLoopAnim(this->layout, save->current_path_node, false);
+ OSReport("23:Make text\n");
this->GenText();
+ OSReport("24:onCreate complete\n");
return true;
}