diff options
author | Treeki <treeki@gmail.com> | 2012-01-17 00:40:00 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-01-17 00:40:00 +0100 |
commit | bb5d7f7e737e318d095d23939b7d288eaf5f9e63 (patch) | |
tree | ec41984cd10376e7fec2b24e22b1b695c3692b36 /src/koopatlas/hud.cpp | |
parent | 28efd888af3ffe227565683e2cd2960ea5b52f61 (diff) | |
download | kamek-bb5d7f7e737e318d095d23939b7d288eaf5f9e63.tar.gz kamek-bb5d7f7e737e318d095d23939b7d288eaf5f9e63.zip |
added path support and the new API LevelInfo
Diffstat (limited to 'src/koopatlas/hud.cpp')
-rw-r--r-- | src/koopatlas/hud.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index c5b2c6e..183e85f 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -95,13 +95,14 @@ void dWMHud_c::setPointName() { int length; // figure this out... - /*WMPathPoint *point = dWMPathManager_c::instance->currentPoint; + dKPNode_s *node = dScKoopatlas_c::instance->pathManager.currentNode; - if (point->type == WMPathPoint::LEVEL_TYPE) { - LevelInfo *li = &dScNewerWorldMap_c::instance->levelInfo; - LevelInfo::Entry *entry = li->search(point->params[0] - 1, point->params[1] - 1); + if (node->type == dKPNode_s::LEVEL) { + OSReport("Trying level %d-%d\n", node->levelNumber[0], node->levelNumber[1]); + dLevelInfo_c *li = &dScKoopatlas_c::instance->levelInfo; + dLevelInfo_c::entry_s *entry = li->search(node->levelNumber[0] - 1, node->levelNumber[1] - 1); - char *levelName = li->getNameForLevel(entry); + const char *levelName = li->getNameForLevel(entry); // copy it // I need to make this into a function. @@ -114,13 +115,7 @@ void dWMHud_c::setPointName() { } else { newPointName[0] = 0; length = 0; - }*/ - - const char *str = "This needs to be done\0"; - length = 21; - for (int i = 0; i < length; i++) - newPointName[i] = str[i]; - newPointName[length] = 0; + } nw4r::lyt::TextBox *box = layout.findTextBoxByName("T_levelname_01"); @@ -144,9 +139,9 @@ void dWMHud_c::setPointName() { void dWMHud_c::showPointBar() { - //WMPathPoint *point = dWMPathManager_c::instance->currentPoint; + dKPNode_s *node = dScKoopatlas_c::instance->pathManager.currentNode; - if (true) {//point->type == WMPathPoint::LEVEL_TYPE) { + if (node->type == dKPNode_s::LEVEL) { isPointBarShown = true; updateText(); |