diff options
author | Treeki <treeki@gmail.com> | 2012-10-18 07:26:47 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-10-18 07:26:47 +0200 |
commit | 82be0718d3c8b6bd6425f73190754410797a5cb5 (patch) | |
tree | c08cfaaf98dfc54d1f377c76c635c6406d884c7e /src | |
parent | 035bfe6144a9baa8c03f10e92a9689506068f47f (diff) | |
download | kamek-82be0718d3c8b6bd6425f73190754410797a5cb5.tar.gz kamek-82be0718d3c8b6bd6425f73190754410797a5cb5.zip |
pretty much almost finished. almost. also I'm a moron
Diffstat (limited to 'src')
-rw-r--r-- | src/koopatlas/starcoin.cpp | 52 | ||||
-rw-r--r-- | src/koopatlas/starcoin.h | 2 |
2 files changed, 6 insertions, 48 deletions
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; |