From 82be0718d3c8b6bd6425f73190754410797a5cb5 Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 18 Oct 2012 07:26:47 +0200 Subject: pretty much almost finished. almost. also I'm a moron --- src/koopatlas/starcoin.cpp | 52 +++++----------------------------------------- src/koopatlas/starcoin.h | 2 +- 2 files changed, 6 insertions(+), 48 deletions(-) (limited to 'src/koopatlas') diff --git a/src/koopatlas/starcoin.cpp b/src/koopatlas/starcoin.cpp index 49ff46f..d8611d0 100644 --- a/src/koopatlas/starcoin.cpp +++ b/src/koopatlas/starcoin.cpp @@ -199,9 +199,8 @@ void dWMStarCoin_c::loadInfo() { // figure out which sections should be available for (int i = 0; i < dLevelInfo_c::s_info.sectionCount(); i++) { dLevelInfo_c::section_s *section = dLevelInfo_c::s_info.getSectionByIndex(i); - OSReport("Checking section %d\n", i); - bool haveLevels; + bool haveLevels = false; for (int j = 0; j < section->levelCount; j++) { dLevelInfo_c::entry_s *l = §ion->levels[j]; if (l->flags & 2) { @@ -213,24 +212,11 @@ void dWMStarCoin_c::loadInfo() { } if (haveLevels) { - OSReport("section %d has levels\n", i); if (i == wantedSection) { - OSReport("It was the wanted section\n"); currentSection = wantedSection; currentSectionIndex = availableSectionCount; } - OSReport("Assigned to ID %d\n", availableSectionCount); sectionIndices[availableSectionCount++] = i; - OSReport("{%d, %d, %d, %d, %d, %d, %d, %d, ...}\n", - sectionIndices[0], - sectionIndices[1], - sectionIndices[2], - sectionIndices[3], - sectionIndices[4], - sectionIndices[5], - sectionIndices[6], - sectionIndices[7] - ); } } @@ -239,16 +225,6 @@ void dWMStarCoin_c::loadInfo() { currentSectionIndex = 0; currentSection = sectionIndices[0]; } - OSReport("{%d, %d, %d, %d, %d, %d, %d, %d, ...}\n", - sectionIndices[0], - sectionIndices[1], - sectionIndices[2], - sectionIndices[3], - sectionIndices[4], - sectionIndices[5], - sectionIndices[6], - sectionIndices[7] - ); } void dWMStarCoin_c::loadSectionInfo() { @@ -329,6 +305,10 @@ void dWMStarCoin_c::loadSectionInfo() { names[1] = 0; } + // if the second column is empty, remove its name + if (currentPosition[1] == 0 && useSubworlds) + names[1] = 0; + // work out the names WriteAsciiToTextBox(LeftTitle, linfo->getNameForLevel(names[0])); if (names[1]) @@ -410,32 +390,10 @@ void dWMStarCoin_c::executeState_Wait() { state.setState(&StateID_HideSectionWait); } else if ((nowPressed & WPAD_LEFT) && canScrollLeft()) { currentSection = sectionIndices[--currentSectionIndex]; - OSReport("Set section to %d from index %d\n", currentSection, currentSectionIndex); - OSReport("{%d, %d, %d, %d, %d, %d, %d, %d, ...}\n", - sectionIndices[0], - sectionIndices[1], - sectionIndices[2], - sectionIndices[3], - sectionIndices[4], - sectionIndices[5], - sectionIndices[6], - sectionIndices[7] - ); willExit = false; state.setState(&StateID_HideSectionWait); } else if ((nowPressed & WPAD_RIGHT) && canScrollRight()) { currentSection = sectionIndices[++currentSectionIndex]; - OSReport("Set section to %d from index %d\n", currentSection, currentSectionIndex); - OSReport("{%d, %d, %d, %d, %d, %d, %d, %d, ...}\n", - sectionIndices[0], - sectionIndices[1], - sectionIndices[2], - sectionIndices[3], - sectionIndices[4], - sectionIndices[5], - sectionIndices[6], - sectionIndices[7] - ); willExit = false; state.setState(&StateID_HideSectionWait); } diff --git a/src/koopatlas/starcoin.h b/src/koopatlas/starcoin.h index 5e88343..4ba7aa4 100644 --- a/src/koopatlas/starcoin.h +++ b/src/koopatlas/starcoin.h @@ -40,7 +40,7 @@ class dWMStarCoin_c : public dActor_c { int currentSection; int currentSectionIndex; - bool sectionIndices[MAX_SECTION_COUNT]; + int sectionIndices[MAX_SECTION_COUNT]; int availableSectionCount; bool isLeftArrowVisible, isRightArrowVisible; -- cgit v1.2.3