summaryrefslogtreecommitdiff
path: root/src/koopatlas/hud.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/koopatlas/hud.h69
1 files changed, 55 insertions, 14 deletions
diff --git a/src/koopatlas/hud.h b/src/koopatlas/hud.h
index 347fcb4..c0079af 100644
--- a/src/koopatlas/hud.h
+++ b/src/koopatlas/hud.h
@@ -3,6 +3,23 @@
#include "koopatlas/core.h"
+// Colourises an IA8 texture
+class dTexMapColouriser_c {
+ public:
+ dTexMapColouriser_c();
+ ~dTexMapColouriser_c();
+
+ void resetAndClear();
+ void setTexMap(nw4r::lyt::TexMap *tm);
+ void applyAlso(nw4r::lyt::TexMap *tm);
+ void colourise(int h, int s, int l);
+
+ private:
+ nw4r::lyt::TexMap *texmap;
+ u16 *original;
+ u16 *mine;
+};
+
class dWMHud_c : public dBase_c {
public:
dWMHud_c();
@@ -15,25 +32,49 @@ class dWMHud_c : public dBase_c {
bool layoutLoaded;
m2d::EmbedLayout_c layout;
- void updateLives();
+ static dWMHud_c *build();
+ static dWMHud_c *instance;
- void showPointBar();
- void hidePointBar();
+ void enteredNode(dKPNode_s *node = 0);
+ void leftNode();
- void setPointName();
- void checkPointStatus();
- void setLevelText(const char *str, int length = -1);
- void setLevelText(const wchar_t *str, int length = -1);
+ void hideAndShowFooter();
- void setWorldName();
- void setWorldText(const char *str, int length = -1);
- void setWorldText(const wchar_t *str, int length = -1);
-
- static dWMHud_c *build();
- static dWMHud_c *instance;
+ void setupLives();
private:
- bool isPointBarShown;
+ void playShowAnim(int id);
+ void playHideAnim(int id);
+ void loadHeaderInfo();
+
+ bool willShowHeader;
+ dKPNode_s *nodeForHeader;
+
+ int displayedControllerType;
+ void updatePressableButtonThingies();
+
+ void loadFooterInfo();
+ bool willShowFooter;
+
+ dTexMapColouriser_c headerCol, footerCol;
+
+
+ nw4r::lyt::Pane
+ *N_IconPosXP_00[4];
+
+ nw4r::lyt::Picture
+ *Header_Centre, *Header_Right, *Footer,
+ *NormalExitFlag, *SecretExitFlag,
+ *StarCoinOn[3],
+ *P_marioFace_00, *P_luigiFace_00,
+ *P_BkinoFace_00, *P_YkinoFace_00;
+
+ nw4r::lyt::TextBox
+ *LevelName, *LevelNameS,
+ *LevelNumber, *LevelNumberS,
+ *WorldName, *WorldNameS,
+ *StarCoinCounter,
+ *T_lifeNumber[4];
};
#endif