Simplify berry_fix includes
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
.include "../../asm/macros/asm.inc"
|
||||
.include "../../asm/macros/function.inc"
|
||||
.include "../../constants/gba_constants.inc"
|
||||
.include "asm/macros/function.inc"
|
||||
.include "constants/gba_constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.include "constants/gba_constants.inc"
|
||||
.include "asm/macros.inc"
|
||||
.include "asm/macros/function.inc"
|
||||
.include "constants/gba_constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
.include "asm/macros/asm.inc"
|
||||
.include "asm/macros/function.inc"
|
||||
.include "asm/macros/movement.inc"
|
||||
.include "asm/macros/pokemon_data.inc"
|
||||
.include "asm/macros/ec.inc"
|
||||
.include "asm/macros/map.inc"
|
||||
.include "asm/macros/m4a.inc"
|
||||
|
||||
.macro region_map_location x, y, width, height, name
|
||||
.byte \x
|
||||
.byte \y
|
||||
.byte \width
|
||||
.byte \height
|
||||
.4byte gMapName_\name
|
||||
.endm
|
||||
|
||||
.macro obj_tiles address, uncompressed_size, tag
|
||||
.4byte \address
|
||||
.2byte \uncompressed_size
|
||||
.2byte \tag
|
||||
.endm
|
||||
|
||||
.macro null_obj_tiles
|
||||
obj_tiles 0, 0, 0
|
||||
.endm
|
||||
|
||||
.macro obj_pal address, tag
|
||||
.4byte \address
|
||||
.2byte \tag
|
||||
.2byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro null_obj_pal
|
||||
obj_pal 0, 0
|
||||
.endm
|
||||
|
||||
.macro paired_pals tag, address
|
||||
.2byte \tag
|
||||
.2byte 0 @ padding
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ For object animation frames.
|
||||
.macro obj_frame_tiles address, uncompressed_size
|
||||
.4byte \address
|
||||
.2byte \uncompressed_size
|
||||
.2byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro spr_template tile_tag, pal_tag, oam, anims, images, affine_anims, callback
|
||||
.2byte \tile_tag
|
||||
.2byte \pal_tag
|
||||
.4byte \oam
|
||||
.4byte \anims
|
||||
.4byte \images
|
||||
.4byte \affine_anims
|
||||
.4byte \callback
|
||||
.endm
|
||||
|
||||
@ Berry trees have a table defining the palette slot used for each of their 5
|
||||
@ stages. However, the first 2 stages always use the same slots regardless of
|
||||
@ the type of tree and the slots of the last 3 stages always equal each other.
|
||||
.macro berry_tree_palette_slot_table slot
|
||||
.byte 3, 4, \slot, \slot, \slot
|
||||
.endm
|
||||
|
||||
.macro subsprite x, y, priority, tile_num_offset, size
|
||||
.2byte \x
|
||||
.2byte \y
|
||||
.2byte ((\priority) << 14) | ((\tile_num_offset) << 4) | SPRITE_SIZE_\size
|
||||
.2byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro obj_image_anim_frame pic_id, duration, flags = 0
|
||||
.2byte \pic_id
|
||||
.byte (\flags) | (\duration)
|
||||
.byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro obj_image_anim_loop count
|
||||
.2byte 0xfffd
|
||||
.byte \count
|
||||
.byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro obj_image_anim_jump target_index
|
||||
.2byte 0xfffe
|
||||
.byte \target_index
|
||||
.byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro obj_image_anim_end
|
||||
.2byte 0xffff
|
||||
.2byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro obj_rot_scal_anim_frame delta_x_scale, delta_y_scale, delta_angle, duration
|
||||
.2byte \delta_x_scale
|
||||
.2byte \delta_y_scale
|
||||
.byte \delta_angle
|
||||
.byte \duration
|
||||
.2byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro obj_rot_scal_anim_loop count
|
||||
.2byte 0x7ffd
|
||||
.2byte \count
|
||||
.4byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro obj_rot_scal_anim_jump target_index
|
||||
.2byte 0x7ffe
|
||||
.2byte \target_index
|
||||
.4byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro obj_rot_scal_anim_end unknown=0
|
||||
.2byte 0x7fff
|
||||
.2byte \unknown
|
||||
.fill 4 @ padding
|
||||
.endm
|
||||
|
||||
.macro credits_entry number, text
|
||||
.4byte \number
|
||||
.4byte \text
|
||||
.endm
|
||||
|
||||
.macro door_anim_frame unknown, offset
|
||||
.byte \unknown
|
||||
.byte 0 @ padding
|
||||
.2byte \offset
|
||||
.endm
|
||||
|
||||
.macro door_anim_gfx metatile_num, unknown, tile_addr, palette_addr
|
||||
.2byte \metatile_num
|
||||
.2byte \unknown
|
||||
.4byte \tile_addr
|
||||
.4byte \palette_addr
|
||||
.endm
|
||||
|
||||
.macro trainer_eye_trainer opp_1, opp_2, opp_3, opp_4, opp_5, map_name
|
||||
.2byte OPPONENT_\opp_1
|
||||
.2byte OPPONENT_\opp_2
|
||||
.2byte OPPONENT_\opp_3
|
||||
.2byte OPPONENT_\opp_4
|
||||
.2byte OPPONENT_\opp_5
|
||||
.2byte GROUP_\map_name
|
||||
.2byte MAP_\map_name
|
||||
.space 2
|
||||
.endm
|
||||
|
||||
.macro window_template bg, top, left, height, width, palno, baseBlock
|
||||
.byte \bg, \top, \left, \height, \width, \palno
|
||||
.2byte \baseBlock
|
||||
.endm
|
||||
@@ -1,17 +0,0 @@
|
||||
.ifndef GUARD_ASM_MACROS_ASM_INC
|
||||
.set GUARD_ASM_MACROS_ASM_INC, 1
|
||||
|
||||
.macro inc x
|
||||
.set \x, \x + 1
|
||||
.endm
|
||||
|
||||
.macro enum_start x=0
|
||||
.set __enum__, \x
|
||||
.endm
|
||||
|
||||
.macro enum constant
|
||||
.equiv \constant, __enum__
|
||||
inc __enum__
|
||||
.endm
|
||||
|
||||
.endif @ GUARD_ASM_MACROS_ASM_INC
|
||||
@@ -1,554 +0,0 @@
|
||||
.macro if_random_less_than percent, address
|
||||
.byte 0x00
|
||||
.byte \percent
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro if_random_greater_than percent, address
|
||||
.byte 0x01
|
||||
.byte \percent
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro if_random_equal address
|
||||
.byte 0x02
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro if_random_not_equal address
|
||||
.byte 0x03
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro score score
|
||||
.byte 0x04
|
||||
.byte \score
|
||||
.endm
|
||||
|
||||
.macro if_hp_less_than target, percent, address
|
||||
.byte 0x05
|
||||
.byte \target
|
||||
.byte \percent
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_hp_more_than target, percent, address
|
||||
.byte 0x06
|
||||
.byte \target
|
||||
.byte \percent
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_hp_equal target, percent, address
|
||||
.byte 0x07
|
||||
.byte \target
|
||||
.byte \percent
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_hp_not_equal target, percent, address
|
||||
.byte 0x08
|
||||
.byte \target
|
||||
.byte \percent
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_status target, status, address
|
||||
.byte 0x09
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_status target, status, address
|
||||
.byte 0x0a
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_status2 target, status, address
|
||||
.byte 0x0b
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_status2 target, status, address
|
||||
.byte 0x0c
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_status3 target, status, address
|
||||
.byte 0x0d
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_status3 target, status, address
|
||||
.byte 0x0e
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_status4 target, status, address
|
||||
.byte 0x0f
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_status4 target, status, address
|
||||
.byte 0x10
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_less_than value, address
|
||||
.byte 0x11
|
||||
.byte \value
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_more_than value, address
|
||||
.byte 0x12
|
||||
.byte \value
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_equal value, address
|
||||
.byte 0x13
|
||||
.byte \value
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_equal value, address
|
||||
.byte 0x14
|
||||
.byte \value
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_less_than_32 value, address
|
||||
.byte 0x15
|
||||
.4byte \value
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_more_than_32 value, address
|
||||
.byte 0x16
|
||||
.4byte \value
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_equal_32 value, address
|
||||
.byte 0x17
|
||||
.4byte \value
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_equal_32 value, address
|
||||
.byte 0x18
|
||||
.4byte \value
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_move move, address
|
||||
.byte 0x19
|
||||
.2byte \move
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_move move, address
|
||||
.byte 0x1a
|
||||
.2byte \move
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_in_bytes list, address
|
||||
.byte 0x1b
|
||||
.4byte \list
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_in_bytes list, address
|
||||
.byte 0x1c
|
||||
.4byte \list
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_in_words list, address
|
||||
.byte 0x1d
|
||||
.4byte \list
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_in_words list, address
|
||||
.byte 0x1e
|
||||
.4byte \list
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_user_can_damage address
|
||||
.byte 0x1f
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_user_cant_damage address
|
||||
.byte 0x20
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro get_turn_count
|
||||
.byte 0x21
|
||||
.endm
|
||||
|
||||
.macro get_type byte
|
||||
.byte 0x22
|
||||
.byte \byte
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro get_move_power
|
||||
.byte 0x23
|
||||
.endm
|
||||
|
||||
.macro is_most_powerful_move
|
||||
.byte 0x24
|
||||
.endm
|
||||
|
||||
.macro get_move target
|
||||
.byte 0x25
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro if_arg_equal type, address
|
||||
.byte 0x26
|
||||
.byte \type
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro if_arg_not_equal type, address
|
||||
.byte 0x27
|
||||
.byte \type
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_would_go_first target, address
|
||||
.byte 0x28
|
||||
.byte \target
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_would_not_go_first target, address
|
||||
.byte 0x29
|
||||
.byte \target
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_2a
|
||||
.byte 0x2a
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_2b
|
||||
.byte 0x2b
|
||||
.endm
|
||||
|
||||
.macro count_alive_pokemon target
|
||||
.byte 0x2c
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro get_considered_move
|
||||
.byte 0x2d
|
||||
.endm
|
||||
|
||||
.macro get_effect
|
||||
.byte 0x2e
|
||||
.endm
|
||||
|
||||
.macro get_ability target
|
||||
.byte 0x2f
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro get_highest_possible_damage
|
||||
.byte 0x30
|
||||
.endm
|
||||
|
||||
.macro if_damage_bonus value, address
|
||||
.byte 0x31
|
||||
.byte \value
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_32
|
||||
.byte 0x32
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_33
|
||||
.byte 0x33
|
||||
.endm
|
||||
|
||||
.macro if_status_in_party target, status, address
|
||||
.byte 0x34
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ bugged
|
||||
.macro if_status_not_in_party target, status, address
|
||||
.byte 0x35
|
||||
.byte \target
|
||||
.4byte \status
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro get_weather
|
||||
.byte 0x36
|
||||
.endm
|
||||
|
||||
.macro if_effect byte, address
|
||||
.byte 0x37
|
||||
.byte \byte
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_effect byte, address
|
||||
.byte 0x38
|
||||
.byte \byte
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_stat_level_less_than target, stat, level, address
|
||||
.byte 0x39
|
||||
.byte \target
|
||||
.byte \stat
|
||||
.byte \level
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_stat_level_more_than target, stat, level, address
|
||||
.byte 0x3a
|
||||
.byte \target
|
||||
.byte \stat
|
||||
.byte \level
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_stat_level_equal target, stat, level, address
|
||||
.byte 0x3b
|
||||
.byte \target
|
||||
.byte \stat
|
||||
.byte \level
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_stat_level_not_equal target, stat, level, address
|
||||
.byte 0x3c
|
||||
.byte \target
|
||||
.byte \stat
|
||||
.byte \level
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_can_faint address
|
||||
.byte 0x3d
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_cant_faint address
|
||||
.byte 0x3e
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro if_has_move, target, move, address
|
||||
.byte 0x3f
|
||||
.byte \target
|
||||
.2byte \move
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro if_dont_have_move, target, move, address
|
||||
.byte 0x40
|
||||
.byte \target
|
||||
.2byte \move
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_move_effect target, effect, address
|
||||
.byte 0x41
|
||||
.byte \target
|
||||
.byte \effect
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_move_effect target, effect, address
|
||||
.byte 0x42
|
||||
.byte \target
|
||||
.byte \effect
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_last_move_did_damage target, byte, address
|
||||
.byte 0x43
|
||||
.byte \target
|
||||
.byte \byte
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_encored target, address
|
||||
.byte 0x44
|
||||
.byte \target
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro flee
|
||||
.byte 0x45
|
||||
.endm
|
||||
|
||||
.macro if_random_100 address
|
||||
.byte 0x46
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro watch
|
||||
.byte 0x47
|
||||
.endm
|
||||
|
||||
.macro get_hold_effect target
|
||||
.byte 0x48
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro get_gender target
|
||||
.byte 0x49
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro is_first_turn target
|
||||
.byte 0x4a
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro get_stockpile_count target
|
||||
.byte 0x4b
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro is_double_battle
|
||||
.byte 0x4c
|
||||
.endm
|
||||
|
||||
.macro get_item target
|
||||
.byte 0x4d
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro get_move_type_from_result
|
||||
.byte 0x4e
|
||||
.endm
|
||||
|
||||
.macro get_move_power_from_result
|
||||
.byte 0x4f
|
||||
.endm
|
||||
|
||||
.macro get_move_effect_from_result
|
||||
.byte 0x50
|
||||
.endm
|
||||
|
||||
.macro get_protect_count target
|
||||
.byte 0x51
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_52
|
||||
.byte 0x52
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_53
|
||||
.byte 0x53
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_54
|
||||
.byte 0x54
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_55
|
||||
.byte 0x55
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_56
|
||||
.byte 0x56
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_57
|
||||
.byte 0x57
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro call address
|
||||
.byte 0x58
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro jump address
|
||||
.byte 0x59
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro end
|
||||
.byte 0x5a
|
||||
.endm
|
||||
|
||||
.macro if_level_cond cond, address
|
||||
.byte 0x5b
|
||||
.byte \cond
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_user_higher_level address
|
||||
if_level_cond 0, \address
|
||||
.endm
|
||||
|
||||
.macro if_target_higher_level address
|
||||
if_level_cond 1, \address
|
||||
.endm
|
||||
|
||||
.macro if_equal_levels address
|
||||
if_level_cond 2, \address
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro if_taunted address
|
||||
.byte 0x5c
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_taunted address
|
||||
.byte 0x5d
|
||||
.4byte \address
|
||||
.endm
|
||||
@@ -1,266 +0,0 @@
|
||||
.macro loadsprite id
|
||||
.byte 0x00
|
||||
.2byte \id
|
||||
.endm
|
||||
|
||||
.macro unloadsprite id
|
||||
.byte 0x01
|
||||
.2byte \id
|
||||
.endm
|
||||
|
||||
.macro sprite template, priority, argv:vararg
|
||||
.byte 0x02
|
||||
.4byte \template
|
||||
.byte \priority
|
||||
.byte (.Lsprite_\@_2 - .Lsprite_\@_1) / 2
|
||||
.Lsprite_\@_1:
|
||||
.2byte \argv
|
||||
.Lsprite_\@_2:
|
||||
.endm
|
||||
|
||||
.macro createtask addr, priority, argv:vararg
|
||||
.byte 0x03
|
||||
.4byte \addr
|
||||
.byte \priority
|
||||
.byte (.Lcreatetask_\@_2 - .Lcreatetask_\@_1) / 2
|
||||
.Lcreatetask_\@_1:
|
||||
.2byte \argv
|
||||
.Lcreatetask_\@_2:
|
||||
.endm
|
||||
|
||||
.macro pause delay
|
||||
.byte 0x04
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro wait
|
||||
.byte 0x05
|
||||
.endm
|
||||
|
||||
.macro hang1
|
||||
.byte 0x06
|
||||
.endm
|
||||
|
||||
.macro hang2
|
||||
.byte 0x07
|
||||
.endm
|
||||
|
||||
.macro end
|
||||
.byte 0x08
|
||||
.endm
|
||||
|
||||
.macro playse id
|
||||
.byte 0x09
|
||||
.2byte \id
|
||||
.endm
|
||||
|
||||
.macro monbg which
|
||||
.byte 0x0A
|
||||
.byte \which
|
||||
.endm
|
||||
|
||||
.macro clearmonbg which
|
||||
.byte 0x0B
|
||||
.byte \which
|
||||
.endm
|
||||
|
||||
.macro setalpha eva, evb
|
||||
.byte 0x0C
|
||||
.2byte ((\evb) << 8) | (\eva)
|
||||
.endm
|
||||
|
||||
.macro blendoff
|
||||
.byte 0x0D
|
||||
.endm
|
||||
|
||||
.macro call addr
|
||||
.byte 0x0E
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro ret
|
||||
.byte 0x0F
|
||||
.endm
|
||||
|
||||
.macro setvar var_num, value
|
||||
.byte 0x10
|
||||
.byte \var_num
|
||||
.2byte \value
|
||||
.endm
|
||||
|
||||
.macro ifelse addr1, addr2
|
||||
.byte 0x11
|
||||
.4byte \addr1
|
||||
.4byte \addr2
|
||||
.endm
|
||||
|
||||
.macro jumpif cond, addr
|
||||
.byte 0x12
|
||||
.byte \cond
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro jump addr
|
||||
.byte 0x13
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro fadetobg id
|
||||
.byte 0x14
|
||||
.byte \id
|
||||
.endm
|
||||
|
||||
.macro restorebg
|
||||
.byte 0x15
|
||||
.endm
|
||||
|
||||
.macro waitbgfadeout
|
||||
.byte 0x16
|
||||
.endm
|
||||
|
||||
.macro waitbgfadein
|
||||
.byte 0x17
|
||||
.endm
|
||||
|
||||
.macro changebg id
|
||||
.byte 0x18
|
||||
.byte \id
|
||||
.endm
|
||||
|
||||
.macro panse_19 id, pan
|
||||
.byte 0x19
|
||||
.2byte \id
|
||||
.byte \pan
|
||||
.endm
|
||||
|
||||
.macro setpan pan
|
||||
.byte 0x1A
|
||||
.byte \pan
|
||||
.endm
|
||||
|
||||
.macro panse_1B id, pan_start, pan_end, step, delay
|
||||
.byte 0x1B
|
||||
.2byte \id
|
||||
.byte \pan_start
|
||||
.byte \pan_end
|
||||
.byte \step
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro panse_1C id, pan, delay, count
|
||||
.byte 0x1C
|
||||
.2byte \id
|
||||
.byte \pan
|
||||
.byte \delay
|
||||
.byte \count
|
||||
.endm
|
||||
|
||||
.macro panse_1D id, pan, count
|
||||
.byte 0x1D
|
||||
.2byte \id
|
||||
.byte \pan
|
||||
.byte \count
|
||||
.endm
|
||||
|
||||
.macro setbldcnt bldcnt
|
||||
.byte 0x1E
|
||||
.2byte \bldcnt
|
||||
.endm
|
||||
|
||||
.macro createtask_1F addr, argv:vararg
|
||||
.byte 0x1F
|
||||
.4byte \addr
|
||||
.byte (.Lcreatetask_1F_\@_2 - .Lcreatetask_1F_\@_1) / 2
|
||||
.Lcreatetask_1F_\@_1:
|
||||
.2byte \argv
|
||||
.Lcreatetask_1F_\@_2:
|
||||
.endm
|
||||
|
||||
.macro waitsound
|
||||
.byte 0x20
|
||||
.endm
|
||||
|
||||
.macro jumpvareq var_num, value, addr
|
||||
.byte 0x21
|
||||
.byte \var_num
|
||||
.2byte \value
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro monbg_22 unk
|
||||
.byte 0x22
|
||||
.byte \unk
|
||||
.endm
|
||||
|
||||
.macro clearmonbg_23 unk
|
||||
.byte 0x23
|
||||
.byte \unk
|
||||
.endm
|
||||
|
||||
.macro jumpunkcond addr
|
||||
.byte 0x24
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro fadetobg_25 a, b, c
|
||||
.byte 0x25
|
||||
.byte \a
|
||||
.byte \b
|
||||
.byte \c
|
||||
.endm
|
||||
|
||||
.macro panse_26 id, pan_start, pan_end, step, delay
|
||||
.byte 0x26
|
||||
.2byte \id
|
||||
.byte \pan_start
|
||||
.byte \pan_end
|
||||
.byte \step
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro panse_27 id, pan_start, pan_end, step, delay
|
||||
.byte 0x27
|
||||
.2byte \id
|
||||
.byte \pan_start
|
||||
.byte \pan_end
|
||||
.byte \step
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro monbgprio_28 unk
|
||||
.byte 0x28
|
||||
.byte \unk
|
||||
.endm
|
||||
|
||||
.macro monbgprio_29
|
||||
.byte 0x29
|
||||
.endm
|
||||
|
||||
.macro monbgprio_2A unk
|
||||
.byte 0x2A
|
||||
.byte \unk
|
||||
.endm
|
||||
|
||||
.macro invisible side
|
||||
.byte 0x2B
|
||||
.byte \side
|
||||
.endm
|
||||
|
||||
.macro visible side
|
||||
.byte 0x2C
|
||||
.byte \side
|
||||
.endm
|
||||
|
||||
.macro doublebattle_2D unk
|
||||
.byte 0x2D
|
||||
.byte \unk
|
||||
.endm
|
||||
|
||||
.macro doublebattle_2E unk
|
||||
.byte 0x2E
|
||||
.byte \unk
|
||||
.endm
|
||||
|
||||
.macro stopsound
|
||||
.byte 0x2F
|
||||
.endm
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,506 +0,0 @@
|
||||
@ Add a positive/negative value to the score of the move being evaluated.
|
||||
|
||||
.macro score score
|
||||
.byte 0x00
|
||||
.byte \score
|
||||
.endm
|
||||
|
||||
@ turn (AKA "Appeal No.")
|
||||
|
||||
.macro get_turn
|
||||
.byte 0x01
|
||||
.endm
|
||||
|
||||
.macro if_turn_less_than param, addr
|
||||
.byte 0x02
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_turn_more_than param, addr
|
||||
.byte 0x03
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_turn_eq param, addr
|
||||
.byte 0x04
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_turn_not_eq param, addr
|
||||
.byte 0x05
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ audience excitement
|
||||
|
||||
.macro get_excitement
|
||||
.byte 0x06
|
||||
.endm
|
||||
|
||||
.macro if_excitement_less_than param, addr
|
||||
.byte 0x07
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_excitement_more_than param, addr
|
||||
.byte 0x08
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_excitement_eq param, addr
|
||||
.byte 0x09
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_excitement_not_eq param, addr
|
||||
.byte 0x0A
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ the order that the user goes in the current turn
|
||||
|
||||
.macro get_user_order
|
||||
.byte 0x0B
|
||||
.endm
|
||||
|
||||
.macro if_user_order_less_than param addr
|
||||
.byte 0x0C
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_user_order_more_than param addr
|
||||
.byte 0x0D
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_user_order_eq param addr
|
||||
.byte 0x0E
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_user_order_not_eq param addr
|
||||
.byte 0x0F
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ user condition
|
||||
|
||||
.macro get_user_condition
|
||||
.byte 0x10
|
||||
.endm
|
||||
|
||||
.macro if_user_condition_less_than param, addr
|
||||
.byte 0x11
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_user_condition_more_than param, addr
|
||||
.byte 0x12
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_user_condition_eq param, addr
|
||||
.byte 0x13
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_user_condition_not_eq param, addr
|
||||
.byte 0x14
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ 15
|
||||
@ 16
|
||||
@ 17
|
||||
@ 18
|
||||
@ 19
|
||||
@ 1A
|
||||
@ 1B
|
||||
@ 1C
|
||||
@ 1D
|
||||
@ 1E
|
||||
|
||||
@ contest type
|
||||
|
||||
.macro get_contest_type
|
||||
.byte 0x1F
|
||||
.endm
|
||||
|
||||
.macro if_contest_type_eq param, addr
|
||||
.byte 0x20
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_contest_type_not_eq param, addr
|
||||
.byte 0x21
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ move excitement (change in excitement due to move)
|
||||
|
||||
.macro get_move_excitement
|
||||
.byte 0x22
|
||||
.endm
|
||||
|
||||
.macro if_move_excitement_less_than param, addr
|
||||
.byte 0x23
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_move_excitement_more_than param, addr
|
||||
.byte 0x24
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_move_excitement_eq param, addr
|
||||
.byte 0x25
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_move_excitement_not_eq param, addr
|
||||
.byte 0x26
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ move effect
|
||||
|
||||
.macro get_effect
|
||||
.byte 0x27
|
||||
.endm
|
||||
|
||||
.macro if_effect_eq param, addr
|
||||
.byte 0x28
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_effect_not_eq param, addr
|
||||
.byte 0x29
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ move effect type
|
||||
|
||||
.macro get_effect_type
|
||||
.byte 0x2A
|
||||
.endm
|
||||
|
||||
.macro if_effect_type_eq param, addr
|
||||
.byte 0x2B
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_effect_type_not_eq param, addr
|
||||
.byte 0x2C
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ whether the current move is the most appealing in the user's moveset
|
||||
|
||||
.macro check_most_appealing_move
|
||||
.byte 0x2D
|
||||
.endm
|
||||
|
||||
.macro if_most_appealing_move addr
|
||||
.byte 0x2E
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ 2F
|
||||
@ 30
|
||||
@ 31
|
||||
@ 32
|
||||
@ 33
|
||||
@ 34
|
||||
@ 35
|
||||
@ 36
|
||||
@ 37
|
||||
@ 38
|
||||
@ 39
|
||||
@ 3A
|
||||
|
||||
@ number of times current move has been used
|
||||
|
||||
.macro get_move_used_count
|
||||
.byte 0x3B
|
||||
.endm
|
||||
|
||||
.macro if_move_used_count_less_than param, addr
|
||||
.byte 0x3C
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_move_used_count_more_than param, addr
|
||||
.byte 0x3D
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_move_used_count_eq param, addr
|
||||
.byte 0x3E
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_move_used_count_not_eq param, addr
|
||||
.byte 0x3F
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ whether the current move is a combo starter (with another move in the moveset)
|
||||
|
||||
.macro check_combo_starter
|
||||
.byte 0x40
|
||||
.endm
|
||||
|
||||
.macro if_combo_starter addr
|
||||
.byte 0x41
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_not_combo_starter addr
|
||||
.byte 0x42
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ whether the current move is a combo finisher (with another move in the moveset)
|
||||
|
||||
.macro check_combo_finisher
|
||||
.byte 0x43
|
||||
.endm
|
||||
|
||||
.macro if_combo_finisher addr
|
||||
.byte 0x44
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_not_combo_finisher addr
|
||||
.byte 0x45
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ whether the current move would finish a combo
|
||||
|
||||
.macro check_would_finish_combo
|
||||
.byte 0x46
|
||||
.endm
|
||||
|
||||
.macro if_would_finish_combo addr
|
||||
.byte 0x47
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_would_not_finish_combo addr
|
||||
.byte 0x48
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ condition of mon (indexed by order)
|
||||
|
||||
.macro get_condition mon
|
||||
.byte 0x49
|
||||
.byte \mon
|
||||
.endm
|
||||
|
||||
.macro if_condition_less_than mon, value, addr
|
||||
.byte 0x4A
|
||||
.byte \mon
|
||||
.byte \value
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_condition_more_than mon, value, addr
|
||||
.byte 0x4B
|
||||
.byte \mon
|
||||
.byte \value
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_condition_eq mon, value, addr
|
||||
.byte 0x4C
|
||||
.byte \mon
|
||||
.byte \value
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_condition_not_eq mon, value, addr
|
||||
.byte 0x4D
|
||||
.byte \mon
|
||||
.byte \value
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ whether the mon used a combo starter move
|
||||
@ Even though this value is always 1 or 0 (i.e. TRUE/FALSE),
|
||||
@ there are less-than and greater-than comparison operations for some reason.
|
||||
|
||||
.macro get_used_combo_starter mon
|
||||
.byte 0x4E
|
||||
.byte \mon
|
||||
.endm
|
||||
|
||||
.macro if_used_combo_starter_less_than mon, value, addr
|
||||
.byte 0x4F
|
||||
.byte \mon
|
||||
.byte \value
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_used_combo_starter_more_than mon, value, addr
|
||||
.byte 0x50
|
||||
.byte \mon
|
||||
.byte \value
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_used_combo_starter_eq mon, value, addr
|
||||
.byte 0x51
|
||||
.byte \mon
|
||||
.byte \value
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_used_combo_starter_not_eq mon, value, addr
|
||||
.byte 0x52
|
||||
.byte \mon
|
||||
.byte \value
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ whether the mon can make an appeal
|
||||
|
||||
.macro check_can_participate mon
|
||||
.byte 0x53
|
||||
.byte \mon
|
||||
.endm
|
||||
|
||||
.macro if_can_participate mon, addr
|
||||
.byte 0x54
|
||||
.byte \mon
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_cannot_participate mon, addr
|
||||
.byte 0x55
|
||||
.byte \mon
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ 56
|
||||
@ 57
|
||||
|
||||
.macro contest_58 param addr
|
||||
.byte 0x58
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ 59
|
||||
@ 5A
|
||||
@ 5B
|
||||
@ 5C
|
||||
@ 5D
|
||||
@ 5E
|
||||
@ 5F
|
||||
@ 60
|
||||
@ 61
|
||||
@ 62
|
||||
@ 63
|
||||
@ 64
|
||||
@ 65
|
||||
@ 66
|
||||
@ 67
|
||||
@ 68
|
||||
@ 69
|
||||
@ 6A
|
||||
@ 6B
|
||||
@ 6C
|
||||
@ 6D
|
||||
@ 6E
|
||||
@ 6F
|
||||
@ 70
|
||||
@ 71
|
||||
@ 72
|
||||
@ 73
|
||||
@ 74
|
||||
@ 75
|
||||
@ 76
|
||||
@ 77
|
||||
@ 78
|
||||
@ 79
|
||||
@ 7A
|
||||
@ 7B
|
||||
@ 7C
|
||||
|
||||
.macro if_random param addr
|
||||
.byte 0x7D
|
||||
.byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ 7E
|
||||
|
||||
.macro jump addr
|
||||
.byte 0x7F
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro call addr
|
||||
.byte 0x80
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro end
|
||||
.byte 0x81
|
||||
.endm
|
||||
|
||||
.macro check_user_has_exciting_move
|
||||
.byte 0x82
|
||||
.endm
|
||||
|
||||
.macro if_user_has_exciting_move addr
|
||||
.byte 0x83
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
.macro if_user_doesnt_have_exciting_move addr
|
||||
.byte 0x84
|
||||
.4byte \addr
|
||||
.endm
|
||||
|
||||
@ 85
|
||||
@ 86
|
||||
|
||||
.macro if_effect_in_user_moveset param addr
|
||||
.byte 0x87
|
||||
.2byte \param
|
||||
.4byte \addr
|
||||
.endm
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
.macro ec_duplicates count
|
||||
.2byte 0xff00 + \count
|
||||
.endm
|
||||
|
||||
.macro ec_words_by_letter label
|
||||
.2byte (gEasyChatWordsByLetter_\label - gEasyChatWordsAlphabetized) / 2
|
||||
.endm
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,42 +0,0 @@
|
||||
.macro loadtiles address
|
||||
.byte 0
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro loadfadedpal address
|
||||
.byte 1
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro loadpal address
|
||||
.byte 2
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro callnative address
|
||||
.byte 3
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro end
|
||||
.byte 4
|
||||
.endm
|
||||
|
||||
.macro loadgfx_callnative tiles_address, palette_address, function_address
|
||||
.byte 5
|
||||
.4byte \tiles_address
|
||||
.4byte \palette_address
|
||||
.4byte \function_address
|
||||
.endm
|
||||
|
||||
.macro loadtiles_callnative tiles_address, function_address
|
||||
.byte 6
|
||||
.4byte \tiles_address
|
||||
.4byte \function_address
|
||||
.endm
|
||||
|
||||
.macro loadfadedpal_callnative palette_address, function_address
|
||||
.byte 7
|
||||
.4byte \palette_address
|
||||
.4byte \function_address
|
||||
.endm
|
||||
@@ -1,13 +0,0 @@
|
||||
.macro song label, music_player, unknown
|
||||
.4byte \label
|
||||
.2byte \music_player
|
||||
.2byte \unknown
|
||||
.endm
|
||||
|
||||
.macro music_player info_struct, track_struct, unknown_1, unknown_2
|
||||
.4byte \info_struct
|
||||
.4byte \track_struct
|
||||
.byte \unknown_1
|
||||
.space 1
|
||||
.2byte \unknown_2
|
||||
.endm
|
||||
@@ -1,84 +0,0 @@
|
||||
.macro map map_id
|
||||
.byte \map_id >> 8 @ map group
|
||||
.byte \map_id & 0xFF @ map num
|
||||
.endm
|
||||
|
||||
.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_id
|
||||
.2byte \x, \y
|
||||
.byte \byte, \warp
|
||||
.byte \map_id & 0xFF @ map num
|
||||
.byte \map_id >> 8 @ map group
|
||||
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
|
||||
@@ -1,120 +0,0 @@
|
||||
.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
|
||||
create_movement step_64
|
||||
create_movement step_65
|
||||
|
||||
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
|
||||
@@ -1,125 +0,0 @@
|
||||
.macro voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
|
||||
.byte 0
|
||||
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_directsound_no_resample base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
|
||||
.byte 8
|
||||
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_directsound_alt base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
|
||||
.byte 16
|
||||
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
|
||||
.byte \base_midi_key
|
||||
.byte 0
|
||||
.if \pan != 0
|
||||
.byte (0x80 | \pan)
|
||||
.else
|
||||
.byte 0
|
||||
.endif
|
||||
.4byte \sample_data_pointer
|
||||
.byte \attack
|
||||
.byte \decay
|
||||
.byte \sustain
|
||||
.byte \release
|
||||
.endm
|
||||
|
||||
.macro voice_square_1 sweep, duty_cycle, attack, decay, sustain, release
|
||||
_voice_square_1 1, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_square_1_alt sweep, duty_cycle, attack, decay, sustain, release
|
||||
_voice_square_1 9, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_square_1 type, sweep, duty_cycle, attack, decay, sustain, release
|
||||
.byte \type, 60, 0
|
||||
.byte \sweep
|
||||
.byte (\duty_cycle & 0x3)
|
||||
.byte 0, 0, 0
|
||||
.byte (\attack & 0x7)
|
||||
.byte (\decay & 0x7)
|
||||
.byte (\sustain & 0xF)
|
||||
.byte (\release & 0x7)
|
||||
.endm
|
||||
|
||||
.macro voice_square_2 duty_cycle, attack, decay, sustain, release
|
||||
_voice_square_2 2, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_square_2_alt duty_cycle, attack, decay, sustain, release
|
||||
_voice_square_2 10, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_square_2 type, duty_cycle, attack, decay, sustain, release
|
||||
.byte \type, 60, 0, 0
|
||||
.byte (\duty_cycle & 0x3)
|
||||
.byte 0, 0, 0
|
||||
.byte (\attack & 0x7)
|
||||
.byte (\decay & 0x7)
|
||||
.byte (\sustain & 0xF)
|
||||
.byte (\release & 0x7)
|
||||
.endm
|
||||
|
||||
.macro voice_programmable_wave wave_samples_pointer, attack, decay, sustain, release
|
||||
_voice_programmable_wave 3, \wave_samples_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_programmable_wave_alt wave_samples_pointer, attack, decay, sustain, release
|
||||
_voice_programmable_wave 11, \wave_samples_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_programmable_wave type, wave_samples_pointer, attack, decay, sustain, release
|
||||
.byte \type, 60, 0, 0
|
||||
.4byte \wave_samples_pointer
|
||||
.byte (\attack & 0x7)
|
||||
.byte (\decay & 0x7)
|
||||
.byte (\sustain & 0xF)
|
||||
.byte (\release & 0x7)
|
||||
.endm
|
||||
|
||||
.macro voice_noise period, attack, decay, sustain, release
|
||||
_voice_noise 4, \period, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_noise_alt period, attack, decay, sustain, release
|
||||
_voice_noise 12, \period, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_noise type, period, attack, decay, sustain, release
|
||||
.byte \type, 60, 0, 0
|
||||
.byte (\period & 0x1)
|
||||
.byte 0, 0, 0
|
||||
.byte (\attack & 0x7)
|
||||
.byte (\decay & 0x7)
|
||||
.byte (\sustain & 0xF)
|
||||
.byte (\release & 0x7)
|
||||
.endm
|
||||
|
||||
.macro voice_keysplit voice_group_pointer, keysplit_table_pointer
|
||||
.byte 0x40, 0, 0, 0
|
||||
.4byte \voice_group_pointer
|
||||
.4byte \keysplit_table_pointer
|
||||
.endm
|
||||
|
||||
.macro voice_keysplit_all voice_group_pointer
|
||||
.byte 0x80, 0, 0, 0
|
||||
.4byte \voice_group_pointer
|
||||
.4byte 0
|
||||
.endm
|
||||
|
||||
.macro cry sample
|
||||
.byte 0x20, 60, 0, 0
|
||||
.4byte \sample
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
.endm
|
||||
|
||||
.macro cry2 sample
|
||||
.byte 0x30, 60, 0, 0
|
||||
.4byte \sample
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
.endm
|
||||
@@ -1,57 +0,0 @@
|
||||
.macro pokedex_entry pokemon_name, height, weight, pokemon_scale, pokemon_offset, trainer_scale, trainer_offset
|
||||
.2byte \height @ in decimeters
|
||||
.2byte \weight @ in hectograms
|
||||
.4byte DexDescription_\pokemon_name\()_1
|
||||
.4byte DexDescription_\pokemon_name\()_2
|
||||
.2byte 0 @ unused
|
||||
.2byte \pokemon_scale
|
||||
.2byte \pokemon_offset
|
||||
.2byte \trainer_scale
|
||||
.2byte \trainer_offset
|
||||
.2byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro base_stats hp, attack, defense, speed, sp_attack, sp_defense
|
||||
.byte \hp
|
||||
.byte \attack
|
||||
.byte \defense
|
||||
.byte \speed
|
||||
.byte \sp_attack
|
||||
.byte \sp_defense
|
||||
.endm
|
||||
|
||||
.macro ev_yield hp, attack, defense, speed, sp_attack, sp_defense
|
||||
.2byte (\sp_defense << 10) | (\sp_attack << 8) | (\speed << 6) | (\defense << 4) | (\attack << 2) | \hp
|
||||
.endm
|
||||
|
||||
.macro level_up_move level, move
|
||||
.2byte (\level << 9) | \move
|
||||
.endm
|
||||
|
||||
.macro evo_entry method, parameter, target_species
|
||||
.2byte \method
|
||||
.2byte \parameter
|
||||
.2byte \target_species
|
||||
.2byte 0 @ padding
|
||||
.endm
|
||||
|
||||
.macro empty_evo_entries count
|
||||
.fill 8 * \count, 1, 0
|
||||
.endm
|
||||
|
||||
.macro egg_moves_begin species
|
||||
.2byte 20000 + \species
|
||||
.endm
|
||||
|
||||
@ If the min level equals the max level, only one level argument is needed.
|
||||
.macro wild_mon species, min_level, max_level
|
||||
.byte \min_level
|
||||
|
||||
.ifb \max_level
|
||||
.byte \min_level
|
||||
.else
|
||||
.byte \max_level
|
||||
.endif
|
||||
|
||||
.2byte SPECIES_\species
|
||||
.endm
|
||||
Reference in New Issue
Block a user