mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Add HUD_DISPLAY_CAMERA_STATUS
This commit is contained in:
parent
815bbe0053
commit
96e21e13a1
7 changed files with 28 additions and 15 deletions
|
@ -9358,6 +9358,9 @@ HUD_DISPLAY_FLAGS = 5
|
|||
--- @type HudDisplayValue
|
||||
HUD_DISPLAY_TIMER = 6
|
||||
|
||||
--- @type HudDisplayValue
|
||||
HUD_DISPLAY_CAMERA_STATUS = 7
|
||||
|
||||
--- @class ModelExtendedId
|
||||
|
||||
--- @type ModelExtendedId
|
||||
|
|
|
@ -3360,6 +3360,7 @@
|
|||
| HUD_DISPLAY_KEYS | 4 |
|
||||
| HUD_DISPLAY_FLAGS | 5 |
|
||||
| HUD_DISPLAY_TIMER | 6 |
|
||||
| HUD_DISPLAY_CAMERA_STATUS | 7 |
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
|
|
|
@ -545,6 +545,10 @@ void render_hud_timer(void) {
|
|||
gSPDisplayList(gDisplayListHead++, dl_hud_img_end);
|
||||
}
|
||||
|
||||
s16 get_hud_camera_status(void) {
|
||||
return sCameraHUD.status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets HUD status camera value depending of the actions
|
||||
* defined in update_camera_status.
|
||||
|
|
|
@ -33,6 +33,7 @@ s32 gfx_dimensions_rect_from_right_edge(s32 v);
|
|||
|
||||
void render_hud_icon(Vtx *vtx, const u8 *texture, u32 fmt, u32 siz, s32 texW, s32 texH, s32 x, s32 y, s32 w, s32 h, s32 tileX, s32 tileY, s32 tileW, s32 tileH);
|
||||
|
||||
s16 get_hud_camera_status(void);
|
||||
void set_hud_camera_status(s16 status);
|
||||
void render_hud(void);
|
||||
|
||||
|
|
|
@ -3309,6 +3309,7 @@ char gSmluaConstants[] = ""
|
|||
"HUD_DISPLAY_KEYS = 4\n"
|
||||
"HUD_DISPLAY_FLAGS = 5\n"
|
||||
"HUD_DISPLAY_TIMER = 6\n"
|
||||
"HUD_DISPLAY_CAMERA_STATUS = 7\n"
|
||||
"HUD_DISPLAY_FLAGS_NONE = 0x0000\n"
|
||||
"HUD_DISPLAY_FLAGS_LIVES = 0x0001\n"
|
||||
"HUD_DISPLAY_FLAGS_COIN_COUNT = 0x0002\n"
|
||||
|
|
|
@ -149,26 +149,28 @@ bool hud_is_hidden(void) {
|
|||
|
||||
s32 hud_get_value(enum HudDisplayValue type) {
|
||||
switch (type) {
|
||||
case HUD_DISPLAY_LIVES: return gHudDisplay.lives;
|
||||
case HUD_DISPLAY_COINS: return gHudDisplay.coins;
|
||||
case HUD_DISPLAY_STARS: return gHudDisplay.stars;
|
||||
case HUD_DISPLAY_WEDGES: return gHudDisplay.wedges;
|
||||
case HUD_DISPLAY_KEYS: return gHudDisplay.keys;
|
||||
case HUD_DISPLAY_FLAGS: return gHudDisplay.flags;
|
||||
case HUD_DISPLAY_TIMER: return gHudDisplay.timer;
|
||||
case HUD_DISPLAY_LIVES: return gHudDisplay.lives;
|
||||
case HUD_DISPLAY_COINS: return gHudDisplay.coins;
|
||||
case HUD_DISPLAY_STARS: return gHudDisplay.stars;
|
||||
case HUD_DISPLAY_WEDGES: return gHudDisplay.wedges;
|
||||
case HUD_DISPLAY_KEYS: return gHudDisplay.keys;
|
||||
case HUD_DISPLAY_FLAGS: return gHudDisplay.flags;
|
||||
case HUD_DISPLAY_TIMER: return gHudDisplay.timer;
|
||||
case HUD_DISPLAY_CAMERA_STATUS: return get_hud_camera_status();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void hud_set_value(enum HudDisplayValue type, s32 value) {
|
||||
switch (type) {
|
||||
case HUD_DISPLAY_LIVES: gHudDisplay.lives = value; break;
|
||||
case HUD_DISPLAY_COINS: gHudDisplay.coins = value; break;
|
||||
case HUD_DISPLAY_STARS: gHudDisplay.stars = value; break;
|
||||
case HUD_DISPLAY_WEDGES: gHudDisplay.wedges = value; break;
|
||||
case HUD_DISPLAY_KEYS: gHudDisplay.keys = value; break;
|
||||
case HUD_DISPLAY_FLAGS: gHudDisplay.flags = value; break;
|
||||
case HUD_DISPLAY_TIMER: gHudDisplay.timer = value; break;
|
||||
case HUD_DISPLAY_LIVES: gHudDisplay.lives = value; break;
|
||||
case HUD_DISPLAY_COINS: gHudDisplay.coins = value; break;
|
||||
case HUD_DISPLAY_STARS: gHudDisplay.stars = value; break;
|
||||
case HUD_DISPLAY_WEDGES: gHudDisplay.wedges = value; break;
|
||||
case HUD_DISPLAY_KEYS: gHudDisplay.keys = value; break;
|
||||
case HUD_DISPLAY_FLAGS: gHudDisplay.flags = value; break;
|
||||
case HUD_DISPLAY_TIMER: gHudDisplay.timer = value; break;
|
||||
case HUD_DISPLAY_CAMERA_STATUS: set_hud_camera_status(value); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ enum HudDisplayValue {
|
|||
HUD_DISPLAY_KEYS,
|
||||
HUD_DISPLAY_FLAGS,
|
||||
HUD_DISPLAY_TIMER,
|
||||
HUD_DISPLAY_CAMERA_STATUS
|
||||
};
|
||||
|
||||
enum HudDisplayFlags {
|
||||
|
@ -25,7 +26,7 @@ enum HudDisplayFlags {
|
|||
HUD_DISPLAY_FLAGS_TIMER = 0x0040,
|
||||
HUD_DISPLAY_FLAGS_CAMERA = 0x0080,
|
||||
HUD_DISPLAY_FLAGS_POWER = 0x0100,
|
||||
HUD_DISPLAY_FLAGS_EMPHASIZE_POWER = 0x8000,
|
||||
HUD_DISPLAY_FLAGS_EMPHASIZE_POWER = 0x8000
|
||||
};
|
||||
|
||||
struct DateTime {
|
||||
|
|
Loading…
Reference in a new issue