summaryrefslogtreecommitdiff
path: root/src/port
diff options
context:
space:
mode:
Diffstat (limited to 'src/port')
-rw-r--r--src/port/hooks/Events.h3
-rw-r--r--src/port/hooks/list/ActionEvent.h17
-rw-r--r--src/port/mods/PortEnhancements.c13
3 files changed, 32 insertions, 1 deletions
diff --git a/src/port/hooks/Events.h b/src/port/hooks/Events.h
index 30afe9ec..3f53a7d1 100644
--- a/src/port/hooks/Events.h
+++ b/src/port/hooks/Events.h
@@ -2,4 +2,5 @@
#include "list/EngineEvent.h"
#include "list/ActorEvent.h"
-#include "list/ItemEvent.h" \ No newline at end of file
+#include "list/ItemEvent.h"
+#include "list/ActionEvent.h" \ No newline at end of file
diff --git a/src/port/hooks/list/ActionEvent.h b/src/port/hooks/list/ActionEvent.h
new file mode 100644
index 00000000..333c6453
--- /dev/null
+++ b/src/port/hooks/list/ActionEvent.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "sf64player.h"
+#include "port/hooks/impl/EventSystem.h"
+
+DEFINE_EVENT(PlayerActionBoostEvent, Player* player;);
+
+DEFINE_EVENT(PlayerActionBrakeEvent, Player* player;);
+
+DEFINE_EVENT(PlayerActionPreShootEvent, Player* player; LaserStrength laser;);
+DEFINE_EVENT(PlayerActionPostShootEvent, Player* player; LaserStrength laser;);
+
+DEFINE_EVENT(PlayerActionPreShootChargedEvent, Player* player;);
+DEFINE_EVENT(PlayerActionPostShootChargedEvent, Player* player;);
+
+DEFINE_EVENT(PlayerActionPreBombEvent, Player* player;);
+DEFINE_EVENT(PlayerActionPostBombEvent, Player* player;); \ No newline at end of file
diff --git a/src/port/mods/PortEnhancements.c b/src/port/mods/PortEnhancements.c
index b2559422..84bfba62 100644
--- a/src/port/mods/PortEnhancements.c
+++ b/src/port/mods/PortEnhancements.c
@@ -193,6 +193,19 @@ void PortEnhancements_Register() {
REGISTER_EVENT(ObjectUpdateEvent);
REGISTER_EVENT(ObjectDrawEvent);
REGISTER_EVENT(ObjectDestroyEvent);
+
+ // Register player action events
+ REGISTER_EVENT(PlayerActionBoostEvent);
+ REGISTER_EVENT(PlayerActionBrakeEvent);
+
+ REGISTER_EVENT(PlayerActionPreShootEvent);
+ REGISTER_EVENT(PlayerActionPostShootEvent);
+
+ REGISTER_EVENT(PlayerActionPreShootChargedEvent);
+ REGISTER_EVENT(PlayerActionPostShootChargedEvent);
+
+ REGISTER_EVENT(PlayerActionPreBombEvent);
+ REGISTER_EVENT(PlayerActionPostBombEvent);
}
void PortEnhancements_Exit() {