summaryrefslogtreecommitdiff
path: root/src/koopatlas/hud.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/koopatlas/hud.cpp')
-rw-r--r--src/koopatlas/hud.cpp23
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();