diff options
Diffstat (limited to 'macros')
-rw-r--r-- | macros/enum.asm | 2 | ||||
-rw-r--r-- | macros/event.asm | 31 | ||||
-rw-r--r-- | macros/map.asm | 16 | ||||
-rw-r--r-- | macros/movement.asm | 11 | ||||
-rw-r--r-- | macros/text.asm | 17 | ||||
-rw-r--r-- | macros/trainer.asm | 22 |
6 files changed, 51 insertions, 48 deletions
diff --git a/macros/enum.asm b/macros/enum.asm index aee6ee530..50a136ba9 100644 --- a/macros/enum.asm +++ b/macros/enum.asm @@ -31,6 +31,6 @@ const_value = const_value + 1 ENDM shift_const: MACRO -\1 EQU 1 << const_value +\1 EQU (1 << const_value) const_value = const_value + 1 ENDM diff --git a/macros/event.asm b/macros/event.asm index 678648a04..f2ab6fae5 100644 --- a/macros/event.asm +++ b/macros/event.asm @@ -120,16 +120,14 @@ ptcallasm: macro enum checkmaptriggers_command checkmaptriggers: macro db checkmaptriggers_command - db \1 ; map_group - db \2 ; map_id + map \1 ; map endm enum domaptrigger_command domaptrigger: macro db domaptrigger_command - db \1 ; map_group - db \2 ; map_id - db \3 ; trigger_id + map \1 ; map + db \2 ; trigger_id endm enum checktriggers_command @@ -385,24 +383,21 @@ xycompare: macro warpmod: macro db warpmod_command db \1 ; warp_id - db \2 ; map_group - db \3 ; map_id + map \2 ; map endm enum blackoutmod_command blackoutmod: macro db blackoutmod_command - db \1 ; map_group - db \2 ; map_id + map \1 ; map endm enum warp_command warp: macro db warp_command - db \1 ; map_group - db \2 ; map_id - db \3 ; x - db \4 ; y + map \1 ; map + db \2 ; x + db \3 ; y endm enum readmoney_command @@ -997,8 +992,7 @@ verbosegiveitem2: macro loadwilddata: macro db loadwilddata_command db \1 ; flag - db \2 ; map_group - db \3 ; map_id + map \2 ; map endm enum halloffame_command @@ -1015,10 +1009,9 @@ credits: macro warpfacing: macro db warpfacing_command db \1 ; facing - db \2 ; map_group - db \3 ; map_id - db \4 ; x - db \5 ; y + map \2 ; map + db \3 ; x + db \4 ; y endm enum storetext_command diff --git a/macros/map.asm b/macros/map.asm index 17b1f5a65..a999a38c6 100644 --- a/macros/map.asm +++ b/macros/map.asm @@ -5,8 +5,8 @@ map: MACRO ; db GROUP_\1, MAP_\1 \1\@ EQUS "GROUP_\1" -\1\@2 EQUS "MAP_\1" - db \1\@, \1\@2 +\1\@_2 EQUS "MAP_\1" + db \1\@, \1\@_2 ENDM roam_map: MACRO @@ -61,8 +61,7 @@ warp_def: macro db \1 ; y db \2 ; x db \3 ; warp_to - db \4 ; map group - db \5 ; map number + map \4 ; map endm @@ -166,9 +165,9 @@ ENDM mapgroup: MACRO ; map id, height, width \1\@ EQUS "GROUP_\1" -\1\@2 EQUS "MAP_\1" +\1\@_2 EQUS "MAP_\1" \1\@ EQU const_value - enum \1\@2 + enum \1\@_2 \1_HEIGHT EQU \2 \1_WIDTH EQU \3 ENDM @@ -177,3 +176,8 @@ newgroup: MACRO const_value = const_value + 1 enum_start 1 ENDM + +elevfloor: MACRO + db \1, \2 + map \3 +ENDM diff --git a/macros/movement.asm b/macros/movement.asm index a647e4176..d0b97fb8c 100644 --- a/macros/movement.asm +++ b/macros/movement.asm @@ -359,12 +359,12 @@ __enum__ = $51 enum movement_fish_got_bite fish_got_bite: macro - db movement_fish_got_bite + db movement_fish_got_bite ; $51 endm enum movement_fish_got_bite_2 fish_got_bite_2: macro - db movement_fish_got_bite_2 + db movement_fish_got_bite_2 ; $52 endm enum movement_hide_emote @@ -382,3 +382,10 @@ step_shake: macro db movement_step_shake ; $55 db \1 ; displacement endm + +__enum__ = $57 + enum movement_rock_smash +rock_smash: macro + db movement_rock_smash ; $57 + db \1 + endm diff --git a/macros/text.asm b/macros/text.asm index 8174c5200..97f919c7c 100644 --- a/macros/text.asm +++ b/macros/text.asm @@ -12,19 +12,19 @@ page EQUS "db $50," ; Start a new Pokedex page. dex EQUS "db $e8, $50" ; End a Pokedex entry. -TX_RAM: MACRO - db 1 - dw \1 - ENDM +TX_RAM EQU $01 +TX_FAR EQU $16 -TX_FAR: MACRO - db $16 +text_jump: MACRO + db TX_FAR dw \1 db BANK(\1) ENDM - -text_from_ram EQUS "TX_RAM" +text_from_ram: MACRO + db TX_RAM + dw \1 + ENDM text_dunno1: macro db 5 @@ -81,4 +81,3 @@ current_day: macro db $15 endm -text_jump EQUS "TX_FAR" diff --git a/macros/trainer.asm b/macros/trainer.asm index b7c8ad803..2e6c61884 100644 --- a/macros/trainer.asm +++ b/macros/trainer.asm @@ -1,11 +1,11 @@ -trainerclass: MACRO
- enum \1
-const_value = 1
-ENDM
-
-trainer: MACRO
- ; flag, group, id, seen text, win text, lost text, talk-again text
- dw \1
- db \2, \3
- dw \4, \5, \6, \7
-ENDM
+trainerclass: MACRO + enum \1 +const_value = 1 +ENDM + +trainer: MACRO + ; flag, group, id, seen text, win text, lost text, talk-again text + dw \1 + db \2, \3 + dw \4, \5, \6, \7 +ENDM |