summaryrefslogtreecommitdiff
path: root/macros.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
committerdannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
commit5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch)
treedde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /macros.asm
parent53fcd05aa24693093d8af1dc8ec4fedd3957decc (diff)
Sync with pokered
Diffstat (limited to 'macros.asm')
-rw-r--r--macros.asm41
1 files changed, 24 insertions, 17 deletions
diff --git a/macros.asm b/macros.asm
index db13fec6..3da4a691 100644
--- a/macros.asm
+++ b/macros.asm
@@ -1,8 +1,15 @@
-INCLUDE "macros/asm_macros.asm"
-INCLUDE "macros/data_macros.asm"
-INCLUDE "macros/text_macros.asm"
-INCLUDE "macros/audio_macros.asm"
-INCLUDE "macros/event_macros.asm"
+INCLUDE "macros/const.asm"
+INCLUDE "macros/predef.asm"
+INCLUDE "macros/farcall.asm"
+INCLUDE "macros/data.asm"
+INCLUDE "macros/code.asm"
+INCLUDE "macros/gfx.asm"
+INCLUDE "macros/coords.asm"
+
+INCLUDE "macros/scripts/audio.asm"
+INCLUDE "macros/scripts/maps.asm"
+INCLUDE "macros/scripts/events.asm"
+INCLUDE "macros/scripts/text.asm"
SHADE_BLACK EQU %11
SHADE_DARK EQU %10
@@ -22,61 +29,61 @@ setpalOBP: MACRO
ENDM
homecall_jump: MACRO
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, BANK(\1)
call BankswitchCommon
call \1
pop af
jp BankswitchCommon
- ENDM
+ENDM
homecall_jump_sf: MACRO
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, BANK(\1)
call BankswitchCommon
call \1
pop bc
- ld a,b
+ ld a, b
jp BankswitchCommon
- ENDM
+ENDM
homecall_sf: MACRO ; homecall but save flags by popping into bc instead of af
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, BANK(\1)
call BankswitchCommon
call \1
pop bc
- ld a,b
+ ld a, b
call BankswitchCommon
- ENDM
+ENDM
switchbank: MACRO
ld a, BANK(\1)
call BankswitchCommon
- ENDM
+ENDM
callbs: MACRO
ld a, BANK(\1)
call BankswitchCommon
call \1
- ENDM
+ENDM
calladb_ModifyPikachuHappiness: MACRO
ld hl, ModifyPikachuHappiness
ld d, \1
ld b, BANK(ModifyPikachuHappiness)
call Bankswitch
- ENDM
+ENDM
callabd_ModifyPikachuHappiness: MACRO
ld hl, ModifyPikachuHappiness
ld b, BANK(ModifyPikachuHappiness)
ld d, \1
call Bankswitch
- ENDM
+ENDM
sine_wave: MACRO
; \1: amplitude