diff options
Diffstat (limited to 'src/macros')
-rw-r--r-- | src/macros/code.asm | 18 | ||||
-rw-r--r-- | src/macros/constants.asm | 6 | ||||
-rw-r--r-- | src/macros/scripts.asm | 2 | ||||
-rw-r--r-- | src/macros/wram.asm | 15 |
4 files changed, 36 insertions, 5 deletions
diff --git a/src/macros/code.asm b/src/macros/code.asm index 55f4b63..8f2bd0d 100644 --- a/src/macros/code.asm +++ b/src/macros/code.asm @@ -26,6 +26,24 @@ else endc ENDM +; runs SetEventFlagValue with the next value as the flag, c as the new value +set_flag_value: MACRO + call SetStackFlagValue + db \1 +ENDM + +; runs ZeroOutEventFlag with the next value as the flag +zero_out_flag: MACRO + call ZeroStackFlagValue + db \1 +ENDM + +; runs GetEventFlagValue with the next value as the flag. returns value in a +get_flag_value: MACRO + call GetStackFlagValue + db \1 +ENDM + ; the rst $38 handler is a single ret instruction ; probably used for testing purposes during development debug_ret EQUS "rst $38" diff --git a/src/macros/constants.asm b/src/macros/constants.asm index c841972..264e3ed 100644 --- a/src/macros/constants.asm +++ b/src/macros/constants.asm @@ -12,8 +12,6 @@ const_value = const_value + 1 ENDM flag_def: MACRO -\1 EQU const_value -const_value = const_value + 1 -db \2 -db \3 + db \1 + db \2 ENDM diff --git a/src/macros/scripts.asm b/src/macros/scripts.asm index 1f36cba..7f2bbb5 100644 --- a/src/macros/scripts.asm +++ b/src/macros/scripts.asm @@ -81,7 +81,7 @@ ENDM const Func_d39d_index ; $40 const Func_d3b9_index ; $41 const OWScript_GivePCPack_index ; $42 - const Func_d3d1_index ; $43 + const OWScript_nop_index ; $43 const Func_d3d4_index ; $44 const Func_d3e0_index ; $45 const Func_d3fe_index ; $46 diff --git a/src/macros/wram.asm b/src/macros/wram.asm index ca8a9d0..415d19a 100644 --- a/src/macros/wram.asm +++ b/src/macros/wram.asm @@ -65,3 +65,18 @@ sprite_anim_struct: MACRO \1MovementCounter:: ds 1 \1Field0x0f:: ds 1 ENDM + +loaded_npc_struct: MACRO +\1ID:: ds 1 +\1Sprite:: ds 1 +\1CoordX:: ds 1 +\1CoordY:: ds 1 +\1Direction:: ds 1 +\1Field0x05:: ds 1 +\1Field0x06:: ds 1 +\1Field0x07:: ds 1 +\1Field0x08:: ds 1 +\1Field0x09:: ds 1 +\1Field0x0a:: ds 1 +\1Field0x0b:: ds 1 +ENDM |