Trigger types on areas

This commit is contained in:
2026-07-07 07:07:32 -05:00
parent 988a0f2294
commit 189babd2cf
3 changed files with 57 additions and 22 deletions
+4 -3
View File
@@ -20,8 +20,8 @@
#include "assert/assert.h"
#include "console/console.h"
void rpgTestAreaCallback(entity_t *entity) {
consolePrint("rpgTestAreaCallback");
void rpgTestAreaCallback(entity_t *entity, const uint8_t trigger) {
consolePrint("rpgTestAreaCallback: trigger=%u", trigger);
}
errorret_t rpgInit(void) {
@@ -53,7 +53,8 @@ errorret_t rpgInit(void) {
(worldpos_t){ 11, 3, 0 },
(worldpos_t){ 16, 9, 10 },
rpgTestAreaCallback,
MAP_AREA_NOTIFY_ALL
MAP_AREA_NOTIFY_ALL,
MAP_TRIGGER_ENTER | MAP_TRIGGER_EXIT
);
assertTrue(areaIndex != 0xFF, "No available map area slots!.");