summaryrefslogtreecommitdiff
path: root/src/koopatlas/hud.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-27 23:29:46 +0200
committerTreeki <treeki@gmail.com>2012-09-27 23:29:46 +0200
commit81ef1a8b7f7d63c72b92f779d73a8b2b0f8158c1 (patch)
treeeb3567c82f79dd6290f95cfb6a6e600cea1e870f /src/koopatlas/hud.cpp
parent624a89dc12d88973486b39937871c5facf6b9bb6 (diff)
downloadkamek-81ef1a8b7f7d63c72b92f779d73a8b2b0f8158c1.tar.gz
kamek-81ef1a8b7f7d63c72b92f779d73a8b2b0f8158c1.zip
new levelinfo format and a couple of fixes
Diffstat (limited to '')
-rw-r--r--src/koopatlas/hud.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp
index 90e769e..667feb2 100644
--- a/src/koopatlas/hud.cpp
+++ b/src/koopatlas/hud.cpp
@@ -156,6 +156,7 @@ dWMHud_c *dWMHud_c::build() {
dWMHud_c::dWMHud_c() {
layoutLoaded = false;
displayedControllerType = -1;
+ isFooterVisible = false;
}
enum WMHudAnimation {
@@ -267,6 +268,7 @@ int dWMHud_c::onExecute() {
if (willShowFooter && (!(layout.isAnimOn(SHOW_FOOTER)))) {
willShowFooter = false;
+ isFooterVisible = true;
loadFooterInfo();
playShowAnim(SHOW_FOOTER);
}
@@ -310,13 +312,15 @@ void dWMHud_c::playHideAnim(int id) {
layout.enableNonLoopAnim(id, true);
}
layout.grpHandlers[id].frameCtrl.flags = 3; // NO_LOOP | REVERSE
+ if (id == SHOW_FOOTER)
+ isFooterVisible = false;
}
void dWMHud_c::loadHeaderInfo() {
dLevelInfo_c *levelInfo = &dScKoopatlas_c::instance->levelInfo;
- dLevelInfo_c::entry_s *infEntry = levelInfo->search(
+ dLevelInfo_c::entry_s *infEntry = levelInfo->searchBySlot(
nodeForHeader->levelNumber[0]-1, nodeForHeader->levelNumber[1]-1);
if (infEntry == 0) {
@@ -434,9 +438,15 @@ void dWMHud_c::leftNode() {
}
-void dWMHud_c::hideAndShowFooter() {
+void dWMHud_c::hideFooter() {
+ if (isFooterVisible)
+ playHideAnim(SHOW_FOOTER);
+}
+
+void dWMHud_c::showFooter() {
willShowFooter = true;
- playHideAnim(SHOW_FOOTER);
+ if (isFooterVisible)
+ playHideAnim(SHOW_FOOTER);
}