Prepare for dumping

This commit is contained in:
Diegoisawesome 2017-10-23 21:18:49 -05:00
parent cd7c3476d5
commit c23a633a44
5 changed files with 720 additions and 424 deletions

View File

@ -1,5 +1,6 @@
.include "asm/macros/asm.inc"
.include "asm/macros/function.inc"
.include "asm/macros/movement.inc"
.include "asm/macros/window.inc"
.include "asm/macros/pokemon_data.inc"
.include "asm/macros/ec.inc"

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,113 @@
.macro new_map_group
.set cur_map_group, cur_map_group + 1
inc cur_map_group
.set cur_map_num, 0
.endm
.macro map_group map_name
.set GROUP_\map_name, cur_map_group
.set MAP_\map_name, cur_map_num
.set cur_map_num, cur_map_num + 1
inc cur_map_num
.endm
.macro map map_name
.byte GROUP_\map_name
.byte MAP_\map_name
.endm
.macro warp_map map_name
.byte MAP_\map_name
.byte GROUP_\map_name
.endm
.macro heal_location map_name, x, y
.byte GROUP_\map_name
.byte MAP_\map_name
.2byte \x
.2byte \y
.space 2
.endm
.equiv GROUP_NONE, 0x7f
.equiv MAP_NONE, 0x7f
.equiv GROUP_UNDEFINED, 0xff
.equiv MAP_UNDEFINED, 0xff
.macro map_script type, address
.byte \type
.4byte \address
.endm
.macro map_script_2 word1, word2, address
.2byte \word1
.2byte \word2
.4byte \address
.endm
.macro object_event byte1, word1, byte2, byte3, byte4, byte5, byte6, byte7, byte8, byte9, byte10, byte11, byte12, byte13, byte14, script, word2, byte15, byte16
.byte \byte1
.2byte \word1
.byte \byte2, \byte3, \byte4, \byte5, \byte6, \byte7, \byte8, \byte9, \byte10, \byte11, \byte12, \byte13, \byte14
.4byte \script
.2byte \word2
.byte \byte15, \byte16
inc _num_npcs
.endm
.macro warp_def x, y, byte, warp, map
.2byte \x, \y
.byte \byte, \warp
warp_map \map
inc _num_warps
.endm
.macro coord_event x, y, byte1, byte2, word1, word2, word3, script
.2byte \x, \y
.byte \byte1, \byte2
.2byte \word1, \word2, \word3
.4byte \script
inc _num_traps
.endm
.macro bg_event x, y, byte, kind, word, arg6, arg7, arg8
.2byte \x, \y
.byte \byte, \kind
.2byte \word
.if \kind < 5
.4byte \arg6
.else
.2byte \arg6
.byte \arg7, \arg8
.endif
inc _num_signs
.endm
.macro map_events npcs, warps, traps, signs
.byte _num_npcs, _num_warps, _num_traps, _num_signs
.4byte \npcs, \warps, \traps, \signs
reset_map_events
.endm
.macro reset_map_events
.set _num_npcs, 0
.set _num_warps, 0
.set _num_traps, 0
.set _num_signs, 0
.endm
reset_map_events
.equiv connection_down, 1
.equiv connection_up, 2
.equiv connection_left, 3
.equiv connection_right, 4
.equiv connection_dive, 5
.equiv connection_emerge, 6
.macro connection direction, offset, map, filler
.4byte connection_\direction
.4byte \offset
map \map
.space 2
.endm

118
asm/macros/movement.inc Normal file
View File

@ -0,0 +1,118 @@
.macro create_movement name
enum _\name
.macro \name
.byte _\name
.endm
.endm
enum_start
create_movement step_00
create_movement step_01
create_movement step_02
create_movement step_03
create_movement slow_step_down
create_movement slow_step_up
create_movement slow_step_left
create_movement slow_step_right
create_movement step_down
create_movement step_up
create_movement step_left
create_movement step_right
create_movement fast_step_down
create_movement fast_step_up
create_movement fast_step_left
create_movement fast_step_right
create_movement step_10
create_movement step_11
create_movement step_12
create_movement step_13
create_movement step_14
create_movement step_15
create_movement step_16
create_movement step_17
create_movement step_18
create_movement step_19
create_movement step_1a
create_movement step_1b
create_movement step_1c
create_movement step_1d
create_movement step_1e
create_movement step_1f
create_movement step_20
create_movement step_21
create_movement step_22
create_movement step_23
create_movement step_24
create_movement step_25
create_movement step_26
create_movement step_27
create_movement step_28
create_movement step_29
create_movement step_2a
create_movement step_2b
create_movement step_2c
create_movement step_2d
create_movement step_2e
create_movement step_2f
create_movement step_30
create_movement step_31
create_movement step_32
create_movement step_33
create_movement step_34
create_movement step_35
create_movement step_36
create_movement step_37
create_movement step_38
create_movement step_39
create_movement step_3a
create_movement step_3b
create_movement step_3c
create_movement step_3d
create_movement step_3e
create_movement step_3f
create_movement step_40
create_movement step_41
create_movement step_42
create_movement step_43
create_movement step_44
create_movement step_45
create_movement step_46
create_movement step_47
create_movement step_48
create_movement step_49
create_movement step_4a
create_movement step_4b
create_movement step_4c
create_movement step_4d
create_movement step_4e
create_movement step_4f
create_movement step_50
create_movement step_51
create_movement step_52
create_movement step_53
create_movement step_54
create_movement step_55
create_movement step_56
create_movement step_57
create_movement step_58
create_movement step_59
create_movement step_5a
create_movement step_5b
create_movement step_5c
create_movement step_5d
create_movement step_5e
create_movement step_5f
create_movement step_60
create_movement step_61
create_movement step_62
create_movement step_63
enum_start 0x91
create_movement step_91
create_movement step_92
enum_start 0x96
create_movement step_96
enum_start 0xfe
create_movement step_end

View File

@ -1,4 +1,5 @@
.include "asm/macros.inc"
.include "asm/macros/events.inc"
.include "constants/constants.inc"
.section script_data, "aw", %progbits