From a1397358c8a04c92e750d0202e78b190929a060c Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 2 Dec 2024 06:01:25 +0100 Subject: [PATCH] WIP: flag setting for maps --- src/map.s | 18 ++++++++++++++++++ src/wram.s | 2 ++ 2 files changed, 20 insertions(+) diff --git a/src/map.s b/src/map.s index 8d25df4..41acf89 100644 --- a/src/map.s +++ b/src/map.s @@ -195,6 +195,24 @@ room_draw: ret + ; sets a tile position flag + ; as a flag + ; for actor -> actor collision detection + ; inputs: + ; a: the flag to set (flags | a) + ; de: y/x +room_set_flag: + ret + + ; unsets a tile position flag + ; as a flag + ; for actor -> actor collision detection + ; inputs: + ; a: the flag to set (flags ^ a) + ; de: y/x +room_unset_flag: + ret + ; base room ; this can be copied and modified ; by the map gen diff --git a/src/wram.s b/src/wram.s index f7f36fe..365095a 100644 --- a/src/wram.s +++ b/src/wram.s @@ -92,6 +92,8 @@ damage_anim: .adv 1 ; room flags .se 1 .de RF_WALL, 1 +.de RF_ACTOR, 2 +.de RF_DOOR, 4 ; current room struct ; same layout as room struct itself -- 2.30.2