summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2024-12-29 00:59:57 -0600
committerKiritoDv <kiritodev01@gmail.com>2024-12-29 00:59:57 -0600
commitfd0cd322f86937e34accd753ff0d6b119c12fe3b (patch)
treec9c647b21737239a36ae5cd880fc5b39828ef0e4
parente48ef51adc7438970de73c0f3a5a6fc477a566b6 (diff)
Added two new events for boss health and edge arrows
-rw-r--r--src/engine/fox_game.c8
-rw-r--r--src/port/hooks/list/EngineEvent.h2
-rw-r--r--src/port/hooks/list/ItemEvent.h2
-rw-r--r--src/port/mods/PortEnhancements.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c
index c8871eb7..b1293894 100644
--- a/src/engine/fox_game.c
+++ b/src/engine/fox_game.c
@@ -568,9 +568,13 @@ void Game_Update(void) {
Radio_Draw();
if (gShowHud) {
HUD_Draw();
- HUD_EdgeArrows_Update();
+ CALL_CANCELLABLE_EVENT(DrawEdgeArrowsHUDEvent){
+ HUD_EdgeArrows_Update();
+ }
+ }
+ CALL_CANCELLABLE_EVENT(DrawBossHealthHUDEvent){
+ HUD_DrawBossHealth();
}
- HUD_DrawBossHealth();
}
} else {
for (i = 0; i < gCamCount; i++) {
diff --git a/src/port/hooks/list/EngineEvent.h b/src/port/hooks/list/EngineEvent.h
index dc3f72f5..1417918a 100644
--- a/src/port/hooks/list/EngineEvent.h
+++ b/src/port/hooks/list/EngineEvent.h
@@ -15,6 +15,8 @@ DEFINE_EVENT(DrawIncomingMsgHUDEvent);
DEFINE_EVENT(DrawGoldRingsHUDEvent);
DEFINE_EVENT(DrawLivesCounterHUDEvent);
DEFINE_EVENT(DrawTrainingRingPassCountHUDEvent);
+DEFINE_EVENT(DrawEdgeArrowsHUDEvent);
+DEFINE_EVENT(DrawBossHealthHUDEvent);
DEFINE_EVENT(DrawGlobalHUDPreEvent);
DEFINE_EVENT(DrawGlobalHUDPostEvent); \ No newline at end of file
diff --git a/src/port/hooks/list/ItemEvent.h b/src/port/hooks/list/ItemEvent.h
index bf9739ef..f5296a34 100644
--- a/src/port/hooks/list/ItemEvent.h
+++ b/src/port/hooks/list/ItemEvent.h
@@ -4,6 +4,6 @@
#include "sf64object.h"
#include "port/hooks/impl/EventSystem.h"
-DEFINE_EVENT(ItemDropEvent,
+DEFINE_EVENT(ItemDropEvent,
Item* item;
); \ No newline at end of file
diff --git a/src/port/mods/PortEnhancements.c b/src/port/mods/PortEnhancements.c
index fad4a327..2b1cb672 100644
--- a/src/port/mods/PortEnhancements.c
+++ b/src/port/mods/PortEnhancements.c
@@ -172,6 +172,8 @@ void PortEnhancements_Init() {
REGISTER_EVENT(DrawGoldRingsHUDEvent);
REGISTER_EVENT(DrawLivesCounterHUDEvent);
REGISTER_EVENT(DrawTrainingRingPassCountHUDEvent);
+ REGISTER_EVENT(DrawEdgeArrowsHUDEvent);
+ REGISTER_EVENT(DrawBossHealthHUDEvent);
REGISTER_EVENT(DrawGlobalHUDPreEvent);
REGISTER_EVENT(DrawGlobalHUDPostEvent);