Merge branch 'upcoming' into SonikkuA-DatH-Teatime2
This commit is contained in:
11825 files changed
+358517
-203825
No files matched your search
-129
@@ -1,8 +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/map.inc"
|
||||
.include "asm/macros/field_effect_script.inc"
|
||||
.include "asm/macros/trainer_hill.inc"
|
||||
@@ -16,130 +14,3 @@
|
||||
.include "asm/macros/battle_frontier/battle_pyramid.inc"
|
||||
.include "asm/macros/battle_frontier/battle_tower.inc"
|
||||
.include "asm/macros/battle_frontier/frontier_util.inc"
|
||||
|
||||
.macro region_map_entry x, y, width, height, name
|
||||
.byte \x
|
||||
.byte \y
|
||||
.byte \width
|
||||
.byte \height
|
||||
.4byte gMapName_\name
|
||||
.endm
|
||||
|
||||
.macro obj_tiles address, uncompressed_size, tag = 0
|
||||
.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
|
||||
.byte \x
|
||||
.byte \y
|
||||
.2byte ((\priority) << 14) | ((\tile_num_offset) << 4) | SPRITE_SIZE_\size
|
||||
.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 door_anim_frame unknown, offset
|
||||
.byte \unknown
|
||||
.byte 0 @ padding
|
||||
.2byte \offset
|
||||
.endm
|
||||
|
||||
.macro door_anim_gfx metatile_num, unknown, unknown2, tile_addr, palette_addr
|
||||
.2byte \metatile_num
|
||||
.byte \unknown
|
||||
.byte \unknown2
|
||||
.4byte \tile_addr
|
||||
.4byte \palette_addr
|
||||
.endm
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
.macro inc x
|
||||
.macro inc x:req
|
||||
.set \x, \x + 1
|
||||
.endm
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
.set __enum__, \x
|
||||
.endm
|
||||
|
||||
.macro enum constant
|
||||
.macro enum constant:req
|
||||
.equiv \constant, __enum__
|
||||
inc __enum__
|
||||
.endm
|
||||
@@ -251,11 +251,11 @@
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro nullsub_2A
|
||||
.macro nop_2A
|
||||
.byte 0x2a
|
||||
.endm
|
||||
|
||||
.macro nullsub_2B
|
||||
.macro nop_2B
|
||||
.byte 0x2b
|
||||
.endm
|
||||
|
||||
@@ -287,11 +287,11 @@
|
||||
.4byte \param1
|
||||
.endm
|
||||
|
||||
.macro nullsub_32
|
||||
.macro nop_32
|
||||
.byte 0x32
|
||||
.endm
|
||||
|
||||
.macro nullsub_33
|
||||
.macro nop_33
|
||||
.byte 0x33
|
||||
.endm
|
||||
|
||||
@@ -490,12 +490,12 @@
|
||||
.endm
|
||||
|
||||
.macro call_if_move_flag flag ptr
|
||||
.byte 0x52
|
||||
.byte 0x56
|
||||
.4byte \flag
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro nullsub_57
|
||||
.macro nop_57
|
||||
.byte 0x57
|
||||
.endm
|
||||
|
||||
@@ -558,151 +558,151 @@
|
||||
.2byte \param1
|
||||
.4byte \param2
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_ally_chosen_move
|
||||
.byte 0x63
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_no_attacking_moves battler:req, param1:req
|
||||
.byte 0x64
|
||||
.byte \battler
|
||||
.4byte \param1
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_hazards_count battler:req, effect:req
|
||||
.byte 0x65
|
||||
.byte \battler
|
||||
.2byte \effect
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_doesnt_hold_berry battler:req, ptr:req
|
||||
.byte 0x66
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_share_type battler1:req, battler2:req, ptr:req
|
||||
.byte 0x67
|
||||
.byte \battler1
|
||||
.byte \battler2
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_cant_use_last_resort battler:req, ptr:req
|
||||
.byte 0x68
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_move_with_split battler:req, split:req, ptr:req
|
||||
.byte 0x69
|
||||
.byte \battler
|
||||
.byte \split
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_no_move_with_split battler:req, split:req, ptr:req
|
||||
.byte 0x6A
|
||||
.byte \battler
|
||||
.byte \split
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_physical_moves_unusable attacker:req, target:req, ptr:req
|
||||
.byte 0x6B
|
||||
.byte \attacker
|
||||
.byte \target
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_ai_can_go_down ptr:req
|
||||
.byte 0x6C
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_move_with_type battler:req, type:req, ptr:req
|
||||
.byte 0x6D
|
||||
.byte \battler
|
||||
.byte \type
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_no_move_used battler:req, ptr:req
|
||||
.byte 0x6E
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_move_with_flag battler:req, flag:req, ptr:req
|
||||
.byte 0x6F
|
||||
.byte \battler
|
||||
.4byte \flag
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_battler_absent battler:req, ptr:req
|
||||
.byte 0x70
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_grounded battler:req, ptr:req
|
||||
.byte 0x71
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_best_dmg_hp_percent
|
||||
.byte 0x72
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_curr_dmg_hp_percent
|
||||
.byte 0x73
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_move_split_from_result
|
||||
.byte 0x74
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_considered_move_split
|
||||
.byte 0x75
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_considered_move_target
|
||||
.byte 0x76
|
||||
.endm
|
||||
|
||||
|
||||
.macro compare_speeds battler1:req, battler2:req
|
||||
.byte 0x77
|
||||
.byte \battler1
|
||||
.byte \battler2
|
||||
.endm
|
||||
|
||||
|
||||
.macro is_wakeup_turn battler:req
|
||||
.byte 0x78
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_move_with_accuracy_lt battler:req, value:req, ptr:req
|
||||
.byte 0x79
|
||||
.byte \battler
|
||||
.byte \value
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
@ useful script macros
|
||||
.macro if_has_physical_move battler:req, ptr:req
|
||||
if_has_move_with_split \battler, SPLIT_PHYSICAL, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_no_physical_move battler:req, ptr:req
|
||||
if_has_no_move_with_split \battler, SPLIT_PHYSICAL, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_special_move battler:req, ptr:req
|
||||
if_has_move_with_split \battler, SPLIT_SPECIAL, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_no_special_move battler:req, ptr:req
|
||||
if_has_no_move_with_split \battler, SPLIT_SPECIAL, \ptr
|
||||
.endm
|
||||
@@ -714,33 +714,33 @@
|
||||
.macro get_curr_move_type
|
||||
get_type AI_TYPE_MOVE
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_user_type1
|
||||
get_type AI_TYPE1_USER
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_user_type2
|
||||
get_type AI_TYPE2_USER
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_target_type1
|
||||
get_type AI_TYPE1_TARGET
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_target_type2
|
||||
get_type AI_TYPE2_TARGET
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_ability battler:req, ability:req, ptr:req
|
||||
check_ability \battler, \ability
|
||||
if_equal 1, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_no_ability battler:req, ability:req, ptr:req
|
||||
check_ability \battler, \ability
|
||||
if_equal 0, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_type battler:req, type:req, ptr:req
|
||||
is_of_type \battler, \type
|
||||
if_equal 1, \ptr
|
||||
@@ -750,20 +750,20 @@
|
||||
is_of_type \battler, \type
|
||||
if_equal 0, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_target_faster ptr:req
|
||||
if_user_goes 1, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_user_faster ptr:req
|
||||
if_user_goes 0, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_double_battle ptr:req
|
||||
is_double_battle
|
||||
if_equal 1, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_not_double_battle ptr:req
|
||||
is_double_battle
|
||||
if_equal 0, \ptr
|
||||
@@ -772,11 +772,11 @@
|
||||
.macro if_any_move_disabled battler:req, ptr:req
|
||||
if_any_move_disabled_or_encored \battler, 0, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_any_move_encored battler:req, ptr:req
|
||||
if_any_move_disabled_or_encored \battler, 1, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro call_if_always_hit ptr:req
|
||||
get_move_accuracy
|
||||
call_if_eq 0, \ptr
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
.byte 0x02
|
||||
.4byte \template
|
||||
.if \anim_battler == ANIM_TARGET
|
||||
.byte 0x80 | (\subpriority_offset & 0x7F)
|
||||
.byte ANIMSPRITE_IS_TARGET | (\subpriority_offset & 0x7F)
|
||||
.else
|
||||
.byte (\subpriority_offset & 0x7F)
|
||||
.endif
|
||||
@@ -34,20 +34,20 @@
|
||||
.Lcreatetask_\@_2:
|
||||
.endm
|
||||
|
||||
.macro delay param0:req
|
||||
.macro delay frames:req
|
||||
.byte 0x4
|
||||
.byte \param0
|
||||
.byte \frames
|
||||
.endm
|
||||
|
||||
.macro waitforvisualfinish
|
||||
.byte 0x5
|
||||
.endm
|
||||
|
||||
.macro hang1
|
||||
.macro nop
|
||||
.byte 0x6
|
||||
.endm
|
||||
|
||||
.macro hang2
|
||||
.macro nop2
|
||||
.byte 0x7
|
||||
.endm
|
||||
|
||||
@@ -79,30 +79,30 @@
|
||||
.byte 0xd
|
||||
.endm
|
||||
|
||||
.macro call param0:req
|
||||
.macro call ptr:req
|
||||
.byte 0xe
|
||||
.4byte \param0
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro return
|
||||
.byte 0xf
|
||||
.endm
|
||||
|
||||
.macro setarg param0:req, param1:req
|
||||
.macro setarg argId:req, value:req
|
||||
.byte 0x10
|
||||
.byte \param0
|
||||
.2byte \param1
|
||||
.byte \argId
|
||||
.2byte \value
|
||||
.endm
|
||||
|
||||
.macro choosetwoturnanim param0:req, param1:req
|
||||
.macro choosetwoturnanim ptr1:req, ptr2:req
|
||||
.byte 0x11
|
||||
.4byte \param0
|
||||
.4byte \param1
|
||||
.4byte \ptr1
|
||||
.4byte \ptr2
|
||||
.endm
|
||||
|
||||
.macro jumpifmoveturn param0:req, ptr:req
|
||||
.macro jumpifmoveturn value:req, ptr:req
|
||||
.byte 0x12
|
||||
.byte \param0
|
||||
.byte \value
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
@@ -144,13 +144,13 @@
|
||||
.byte \pan
|
||||
.endm
|
||||
|
||||
.macro panse_1B se:req, param1:req, param2:req, param3:req, param4:req
|
||||
.macro panse se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req
|
||||
.byte 0x1b
|
||||
.2byte \se
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \param3
|
||||
.byte \param4
|
||||
.byte \currentPan
|
||||
.byte \targetPan
|
||||
.byte \incrementPan
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro loopsewithpan se:req, pan:req, wait:req, times:req
|
||||
@@ -168,9 +168,9 @@
|
||||
.byte \wait
|
||||
.endm
|
||||
|
||||
.macro setbldcnt param0:req
|
||||
.macro setbldcnt bldcnt:req
|
||||
.byte 0x1e
|
||||
.2byte \param0
|
||||
.2byte \bldcnt
|
||||
.endm
|
||||
|
||||
.macro createsoundtask addr:req, argv:vararg
|
||||
@@ -186,19 +186,19 @@
|
||||
.byte 0x20
|
||||
.endm
|
||||
|
||||
.macro jumpargeq param0:req, param1:req, ptr:req
|
||||
.macro jumpargeq argId:req, value:req, ptr:req
|
||||
.byte 0x21
|
||||
.byte \param0
|
||||
.2byte \param1
|
||||
.byte \argId
|
||||
.2byte \value
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro monbg_22 battler:req
|
||||
.macro monbg_static battler:req
|
||||
.byte 0x22
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro clearmonbg_23 battler:req
|
||||
.macro clearmonbg_static battler:req
|
||||
.byte 0x23
|
||||
.byte \battler
|
||||
.endm
|
||||
@@ -208,41 +208,41 @@
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro fadetobgfromset param0:req, param1:req, param2:req
|
||||
.macro fadetobgfromset bgOpponent:req, bgPlayer:req, bgContest:req
|
||||
.byte 0x25
|
||||
.byte \param0
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \bgOpponent
|
||||
.byte \bgPlayer
|
||||
.byte \bgContest
|
||||
.endm
|
||||
|
||||
.macro panse_26 se:req, param1:req, param2:req, param3:req, param4:req
|
||||
.macro panse_adjustnone se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req
|
||||
.byte 0x26
|
||||
.2byte \se
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \param3
|
||||
.byte \param4
|
||||
.byte \currentPan
|
||||
.byte \targetPan
|
||||
.byte \incrementPan
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro panse_27 se:req, param1:req, param2:req, param3:req, param4:req
|
||||
.macro panse_adjustall se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req
|
||||
.byte 0x27
|
||||
.2byte \se
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \param3
|
||||
.byte \param4
|
||||
.byte \currentPan
|
||||
.byte \targetPan
|
||||
.byte \incrementPan
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro monbgprio_28 battler:req
|
||||
.macro splitbgprio battler:req
|
||||
.byte 0x28
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro monbgprio_29
|
||||
.macro splitbgprio_all
|
||||
.byte 0x29
|
||||
.endm
|
||||
|
||||
.macro monbgprio_2A battler:req
|
||||
.macro splitbgprio_foes battler:req
|
||||
.byte 0x2a
|
||||
.byte \battler
|
||||
.endm
|
||||
@@ -257,12 +257,12 @@
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro doublebattle_2D battler:req
|
||||
.macro teamattack_moveback battler:req
|
||||
.byte 0x2d
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro doublebattle_2E battler:req
|
||||
.macro teamattack_movefwd battler:req
|
||||
.byte 0x2e
|
||||
.byte \battler
|
||||
.endm
|
||||
@@ -270,61 +270,75 @@
|
||||
.macro stopsound
|
||||
.byte 0x2f
|
||||
.endm
|
||||
|
||||
|
||||
@ useful macros
|
||||
.macro jumpreteq value:req, ptr:req
|
||||
jumpargeq ARG_RET_ID, \value, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro jumprettrue ptr:req
|
||||
jumpreteq TRUE, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro jumpretfalse ptr:req
|
||||
jumpreteq FALSE, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro jumpifdoublebattle ptr:req
|
||||
createvisualtask AnimTask_IsDoubleBattle, 0
|
||||
jumprettrue \ptr
|
||||
.endm
|
||||
|
||||
|
||||
@ keep CFRU macros cause I'm lazy. todo: update to createsprite and createvisualtask, respectively
|
||||
.macro launchtemplate launchtemplatePtr launchtemplatePriority launchtemplateArgsNo launchtemplatearg0 launchtemplatearg1 launchtemplatearg2 launchtemplatearg3 launchtemplatearg4 launchtemplatearg5 launchtemplatearg6 launchtemplatearg7 launchtemplatearg8
|
||||
.byte 0x2
|
||||
.word \launchtemplatePtr
|
||||
.byte \launchtemplatePriority
|
||||
.byte \launchtemplateArgsNo
|
||||
.hword \launchtemplatearg0
|
||||
.hword \launchtemplatearg1
|
||||
.hword \launchtemplatearg2
|
||||
.hword \launchtemplatearg3
|
||||
.hword \launchtemplatearg4
|
||||
.hword \launchtemplatearg5
|
||||
.hword \launchtemplatearg6
|
||||
.hword \launchtemplatearg7
|
||||
.hword \launchtemplatearg8
|
||||
.endm
|
||||
|
||||
.byte 0x2
|
||||
.word \launchtemplatePtr
|
||||
.byte \launchtemplatePriority
|
||||
.byte \launchtemplateArgsNo
|
||||
.hword \launchtemplatearg0
|
||||
.hword \launchtemplatearg1
|
||||
.hword \launchtemplatearg2
|
||||
.hword \launchtemplatearg3
|
||||
.hword \launchtemplatearg4
|
||||
.hword \launchtemplatearg5
|
||||
.hword \launchtemplatearg6
|
||||
.hword \launchtemplatearg7
|
||||
.hword \launchtemplatearg8
|
||||
.endm
|
||||
|
||||
.macro launchtask launchtaskPtr launchtaskPriority launchtaskArgsNo launchtaskarg0 launchtaskarg1 launchtaskarg2 launchtaskarg3 launchtaskarg4 launchtaskarg5 launchtaskarg6 launchtaskarg7 launchtaskarg8
|
||||
.byte 0x3
|
||||
.word \launchtaskPtr
|
||||
.byte \launchtaskPriority
|
||||
.byte \launchtaskArgsNo
|
||||
.hword \launchtaskarg0
|
||||
.hword \launchtaskarg1
|
||||
.hword \launchtaskarg2
|
||||
.hword \launchtaskarg3
|
||||
.hword \launchtaskarg4
|
||||
.hword \launchtaskarg5
|
||||
.hword \launchtaskarg6
|
||||
.hword \launchtaskarg7
|
||||
.hword \launchtaskarg8
|
||||
.endm
|
||||
|
||||
.byte 0x3
|
||||
.word \launchtaskPtr
|
||||
.byte \launchtaskPriority
|
||||
.byte \launchtaskArgsNo
|
||||
.hword \launchtaskarg0
|
||||
.hword \launchtaskarg1
|
||||
.hword \launchtaskarg2
|
||||
.hword \launchtaskarg3
|
||||
.hword \launchtaskarg4
|
||||
.hword \launchtaskarg5
|
||||
.hword \launchtaskarg6
|
||||
.hword \launchtaskarg7
|
||||
.hword \launchtaskarg8
|
||||
.endm
|
||||
|
||||
.macro setblends setblends_value
|
||||
.byte 0xC
|
||||
.hword \setblends_value
|
||||
.endm
|
||||
.byte 0xC
|
||||
.hword \setblends_value
|
||||
.endm
|
||||
|
||||
.macro launchsoundtask launchsoundtaskPtr launchsoundtaskArgsNo launchsoundtaskarg0 launchsoundtaskarg1 launchsoundtaskarg2 launchsoundtaskarg3 launchsoundtaskarg4 launchsoundtaskarg5 launchsoundtaskarg6 launchsoundtaskarg7 launchsoundtaskarg8
|
||||
.byte 0x1F
|
||||
.word \launchsoundtaskPtr
|
||||
.byte \launchsoundtaskArgsNo
|
||||
.hword \launchsoundtaskarg0
|
||||
.hword \launchsoundtaskarg1
|
||||
.hword \launchsoundtaskarg2
|
||||
.hword \launchsoundtaskarg3
|
||||
.hword \launchsoundtaskarg4
|
||||
.hword \launchsoundtaskarg5
|
||||
.hword \launchsoundtaskarg6
|
||||
.hword \launchsoundtaskarg7
|
||||
.hword \launchsoundtaskarg8
|
||||
.endm
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
|
||||
@ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason
|
||||
@ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason
|
||||
.macro apprentice_shouldcheckgone
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_CHECK_GONE
|
||||
special CallApprenticeFunction
|
||||
@@ -94,11 +94,19 @@
|
||||
@ Buffer some APPRENTICE_BUFF_* string to the given stringvar (0 for STR_VAR_1, 1 for STR_VAR_2, 2 for STR_VAR_3)
|
||||
.macro apprentice_buff stringvar:req, tobuff:req
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_BUFFER_STRING
|
||||
setvar VAR_0x8005, \stringvar
|
||||
.if \tobuff >= VARS_START
|
||||
copyvar VAR_0x8006, \tobuff
|
||||
.if \stringvar == STR_VAR_1
|
||||
setvar VAR_0x8005, 0
|
||||
.elseif \stringvar == STR_VAR_2
|
||||
setvar VAR_0x8005, 1
|
||||
.elseif \stringvar == STR_VAR_3
|
||||
setvar VAR_0x8005, 2
|
||||
.else
|
||||
setvar VAR_0x8006, \tobuff
|
||||
setvar VAR_0x8005, \stringvar
|
||||
.endif
|
||||
.if \tobuff >= VARS_START
|
||||
copyvar VAR_0x8006, \tobuff
|
||||
.else
|
||||
setvar VAR_0x8006, \tobuff
|
||||
.endif
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
@@ -109,7 +117,7 @@
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
|
||||
@ Set which mon the Apprentice should lead with
|
||||
@ Set which mon the Apprentice should lead with
|
||||
.macro apprentice_setleadmon monId:req
|
||||
copyvar VAR_0x8005, \monId
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_SET_LEAD_MON
|
||||
@@ -141,7 +149,7 @@
|
||||
special CallApprenticeFunction
|
||||
.endm
|
||||
|
||||
@ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason
|
||||
@ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason
|
||||
.macro apprentice_shouldleave
|
||||
setvar VAR_0x8004, APPRENTICE_FUNC_SHOULD_LEAVE
|
||||
special CallApprenticeFunction
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
.endm
|
||||
|
||||
@ Return the FACTORY_STYLE_* dependent on what types of moves the opponents team has, or FACTORY_NUM_STYLES if multiple styles tie for the same amount of moves
|
||||
.macro factory_getopponentstyle
|
||||
.macro factory_getopponentstyle
|
||||
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE
|
||||
special CallBattleFactoryFunction
|
||||
.endm
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
special CallBattlePalaceFunction
|
||||
.endm
|
||||
|
||||
@ Buffer the opponents intro speech to gStringVar4. Also used by Battle Arena and Factory
|
||||
@ Buffer the opponents intro speech to gStringVar4. Also used by Battle Arena and Factory
|
||||
.macro palace_getopponentintro
|
||||
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO
|
||||
special CallBattlePalaceFunction
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@ Initialize the Battle Pyramid challenge
|
||||
.macro pyramid_init
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT
|
||||
special CallBattlePyramidFunction
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@ Get the value of some PYRAMID_DATA_*. See GetBattlePyramidData for the data types that can be retrieved
|
||||
@@ -59,7 +59,7 @@
|
||||
@ Set the facility trainers to gBattleFrontierTrainers
|
||||
.macro pyramid_settrainers
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_TRAINERS
|
||||
special CallBattlePyramidFunction
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@ Show the post-battle hint text
|
||||
@@ -68,11 +68,11 @@
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@ VAR_RESULT is 1 if player is on a Pyramid floor, 2 if on the Pyramid peak, 0 otherwise
|
||||
@ VAR_RESULT is 1 if player is on a Pyramid floor, 2 if on the Pyramid peak, 0 otherwise
|
||||
.macro pyramid_inchallenge
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
.endm
|
||||
|
||||
@ Update the light around the player. 2 different modes, for setting or incrementing light. See PYRAMID_LIGHT_*
|
||||
.macro pyramid_updatelight radius:req, mode:req, sound=0xFFFF
|
||||
@@ -83,7 +83,7 @@
|
||||
setvar VAR_0x8007, \sound
|
||||
.endif
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
.endm
|
||||
|
||||
@ Reset the held items to what they were at the start of the challenge
|
||||
.macro pyramid_clearhelditems
|
||||
@@ -100,5 +100,5 @@
|
||||
@ Reset sketched moves and update the party order in the saveblock
|
||||
.macro pyramid_resetparty
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY
|
||||
special CallBattlePyramidFunction
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
@@ -89,15 +89,15 @@
|
||||
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_INTERVIEW_DATA
|
||||
special CallBattleTowerFunc
|
||||
.endm
|
||||
|
||||
|
||||
@Custom multi-battle commands
|
||||
|
||||
|
||||
.macro choose_mons
|
||||
fadescreen 1
|
||||
special ChooseHalfPartyForBattle @ choose 3 mons for battle
|
||||
waitstate
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_do type:req, partnerId:req, partnerPicId:req
|
||||
special ReducePlayerPartyToSelectedMons
|
||||
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SET_DATA
|
||||
@@ -113,26 +113,26 @@
|
||||
special CallFrontierUtilFunc
|
||||
special LoadPlayerParty
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
|
||||
multi_do MULTI_BATTLE_2_VS_2, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||
multi_do MULTI_BATTLE_2_VS_1, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
|
||||
.macro multi_wild partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
multi_do MULTI_BATTLE_2_VS_WILD, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_do_fixed type:req, partnerId:req, partnerPicId:req
|
||||
setvar VAR_0x8004, SPECIAL_BATTLE_MULTI
|
||||
setvar VAR_0x8005, \type
|
||||
@@ -144,20 +144,20 @@
|
||||
special CallFrontierUtilFunc
|
||||
special LoadPlayerParty
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_fixed_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
|
||||
multi_do_fixed MULTI_BATTLE_2_VS_2, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_fixed_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||
multi_do_fixed MULTI_BATTLE_2_VS_1, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
|
||||
.macro multi_fixed_wild partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
|
||||
@@ -136,7 +136,13 @@
|
||||
@ Buffer the name of gTrainerBattleOpponent_A in STR_VAR_1 (0) or STR_VAR_2 (1)
|
||||
.macro frontier_gettrainername stringVar:req
|
||||
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_BUFFER_TRAINER_NAME
|
||||
setvar VAR_0x8005, \stringVar
|
||||
.if \stringVar == STR_VAR_1
|
||||
setvar VAR_0x8005, 0
|
||||
.elseif \stringVar == STR_VAR_2
|
||||
setvar VAR_0x8005, 1
|
||||
.else
|
||||
setvar VAR_0x8005, \stringVar
|
||||
.endif
|
||||
special CallFrontierUtilFunc
|
||||
.endm
|
||||
|
||||
|
||||
+365
-263
File diff suppressed because it is too large.
Load diff
@@ -26,7 +26,7 @@
|
||||
special CallVerdanturfTentFunction
|
||||
.endm
|
||||
|
||||
@ Buffers the opponents intro speech to STR_VAR_4. Despite being a Verdanturf Tent function, it serves the same purpose for all 3 tents.
|
||||
@ Buffers the opponents intro speech to STR_VAR_4. Despite being a Verdanturf Tent function, it serves the same purpose for all 3 tents.
|
||||
.macro battletent_getopponentintro
|
||||
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GET_OPPONENT_INTRO
|
||||
special CallVerdanturfTentFunction
|
||||
@@ -36,7 +36,7 @@
|
||||
.macro verdanturftent_save challengeStatus:req
|
||||
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SAVE
|
||||
setvar VAR_0x8005, \challengeStatus
|
||||
special CallVerdanturfTentFunction
|
||||
special CallVerdanturfTentFunction
|
||||
.endm
|
||||
|
||||
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
|
||||
@@ -49,7 +49,7 @@
|
||||
.macro verdanturftent_giveprize
|
||||
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GIVE_PRIZE
|
||||
special CallVerdanturfTentFunction
|
||||
.endm
|
||||
.endm
|
||||
|
||||
|
||||
@ Fallarbor Tent
|
||||
@@ -79,7 +79,7 @@
|
||||
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_SAVE
|
||||
setvar VAR_0x8005, \challengeStatus
|
||||
special CallFallarborTentFunction
|
||||
.endm
|
||||
.endm
|
||||
|
||||
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
|
||||
.macro fallarbortent_setrandomprize
|
||||
@@ -97,7 +97,7 @@
|
||||
.macro fallarbortent_getopponentname
|
||||
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_GET_OPPONENT_NAME
|
||||
special CallFallarborTentFunction
|
||||
.endm
|
||||
.endm
|
||||
|
||||
|
||||
@ Slateport Tent
|
||||
@@ -127,15 +127,15 @@
|
||||
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SAVE
|
||||
setvar VAR_0x8005, \challengeStatus
|
||||
special CallSlateportTentFunction
|
||||
.endm
|
||||
.endm
|
||||
|
||||
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
|
||||
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
|
||||
.macro slateporttent_setrandomprize
|
||||
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SET_RANDOM_PRIZE
|
||||
special CallSlateportTentFunction
|
||||
.endm
|
||||
|
||||
@ Give the current prize item. FALSE if no room for prize
|
||||
@ Give the current prize item. FALSE if no room for prize
|
||||
.macro slateporttent_giveprize
|
||||
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GIVE_PRIZE
|
||||
special CallSlateportTentFunction
|
||||
@@ -157,7 +157,7 @@
|
||||
.macro slateporttent_generateopponentmons
|
||||
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GENERATE_OPPONENT_MONS
|
||||
special CallSlateportTentFunction
|
||||
.endm
|
||||
.endm
|
||||
|
||||
@ Slateport Tent's version of factory_generaterentalmons
|
||||
.macro slateporttent_generaterentalmons
|
||||
|
||||
+641
-483
File diff suppressed because it is too large.
Load diff
@@ -1,19 +1,21 @@
|
||||
.macro field_eff_loadtiles address
|
||||
@ The first .byte argument of each macro below is an index into gFieldEffectScriptFuncs
|
||||
|
||||
.macro field_eff_loadtiles address:req
|
||||
.byte 0
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro field_eff_loadfadedpal address
|
||||
.macro field_eff_loadfadedpal address:req
|
||||
.byte 1
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro field_eff_loadpal address
|
||||
.macro field_eff_loadpal address:req
|
||||
.byte 2
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro field_eff_callnative address
|
||||
.macro field_eff_callnative address:req
|
||||
.byte 3
|
||||
.4byte \address
|
||||
.endm
|
||||
@@ -22,20 +24,20 @@
|
||||
.byte 4
|
||||
.endm
|
||||
|
||||
.macro field_eff_loadgfx_callnative tiles_address, palette_address, function_address
|
||||
.macro field_eff_loadgfx_callnative tiles_address:req, palette_address:req, function_address:req
|
||||
.byte 5
|
||||
.4byte \tiles_address
|
||||
.4byte \palette_address
|
||||
.4byte \function_address
|
||||
.endm
|
||||
|
||||
.macro field_eff_loadtiles_callnative tiles_address, function_address
|
||||
.macro field_eff_loadtiles_callnative tiles_address:req, function_address:req
|
||||
.byte 6
|
||||
.4byte \tiles_address
|
||||
.4byte \function_address
|
||||
.endm
|
||||
|
||||
.macro field_eff_loadfadedpal_callnative palette_address, function_address
|
||||
.macro field_eff_loadfadedpal_callnative palette_address:req, function_address:req
|
||||
.byte 7
|
||||
.4byte \palette_address
|
||||
.4byte \function_address
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
.macro arm_func_start name
|
||||
.macro arm_func_start name:req
|
||||
.align 2, 0
|
||||
.global \name
|
||||
.arm
|
||||
.type \name, %function
|
||||
.endm
|
||||
|
||||
.macro arm_func_end name
|
||||
.macro arm_func_end name:req
|
||||
.size \name, .-\name
|
||||
.endm
|
||||
|
||||
.macro thumb_func_start name
|
||||
.macro thumb_func_start name:req
|
||||
.align 2, 0
|
||||
.global \name
|
||||
.thumb
|
||||
@@ -17,13 +17,13 @@
|
||||
.type \name, %function
|
||||
.endm
|
||||
|
||||
.macro non_word_aligned_thumb_func_start name
|
||||
.macro non_word_aligned_thumb_func_start name:req
|
||||
.global \name
|
||||
.thumb
|
||||
.thumb_func
|
||||
.type \name, %function
|
||||
.endm
|
||||
|
||||
.macro thumb_func_end name
|
||||
.macro thumb_func_end name:req
|
||||
.size \name, .-\name
|
||||
.endm
|
||||
+5
-5
@@ -1,13 +1,13 @@
|
||||
.macro song label, music_player, unknown
|
||||
.macro song label:req, music_player:req, unknown:req
|
||||
.4byte \label
|
||||
.2byte \music_player
|
||||
.2byte \unknown
|
||||
.endm
|
||||
|
||||
.macro music_player info_struct, track_struct, unknown_1, unknown_2
|
||||
.macro music_player info_struct:req, track_struct:req, num_tracks:req, unknown:req
|
||||
.4byte \info_struct
|
||||
.4byte \track_struct
|
||||
.byte \unknown_1
|
||||
.space 1
|
||||
.2byte \unknown_2
|
||||
.byte \num_tracks
|
||||
.space 1 @ Padding
|
||||
.2byte \unknown
|
||||
.endm
|
||||
+79
-46
@@ -1,83 +1,110 @@
|
||||
.macro map map_id
|
||||
@ Most of the macros in this file are for arranging map event data, and are output by mapjson using data from each map's JSON file.
|
||||
|
||||
@ Takes a MAP constant and outputs the map group and map number as separate bytes
|
||||
.macro map map_id:req
|
||||
.byte \map_id >> 8 @ map group
|
||||
.byte \map_id & 0xFF @ map num
|
||||
.endm
|
||||
|
||||
.macro map_script type, address
|
||||
@ Defines a map script. 'type' is any MAP_SCRIPT_* constant (see include/constants/map_scripts.h)
|
||||
.macro map_script type:req, script:req
|
||||
.byte \type
|
||||
.4byte \address
|
||||
.4byte \script
|
||||
.endm
|
||||
|
||||
.macro map_script_2 word1, word2, address
|
||||
.2byte \word1
|
||||
.2byte \word2
|
||||
.4byte \address
|
||||
@ Defines an entry in a map script table (for either ON_WARP_INTO_MAP_TABLE or ON_FRAME_TABLE)
|
||||
.macro map_script_2 var:req, compare:req, script:req
|
||||
.2byte \var
|
||||
.2byte \compare
|
||||
.4byte \script
|
||||
.endm
|
||||
|
||||
.macro object_event index:req, gfx:req, replacement:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req
|
||||
.byte \index, \gfx, \replacement, 0
|
||||
.2byte \x
|
||||
.2byte \y
|
||||
.byte \elevation, \movement_type, ((\y_radius << 4) | \x_radius), 0
|
||||
.2byte \trainer_type, \sight_radius_tree_etc
|
||||
@ Defines an object event template for map data. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
|
||||
.macro object_event index:req, gfx:req, inConnection:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req
|
||||
.byte \index
|
||||
.byte \gfx
|
||||
.byte \inConnection
|
||||
.space 1 @ Padding
|
||||
.2byte \x, \y
|
||||
.byte \elevation
|
||||
.byte \movement_type
|
||||
.byte ((\y_radius << 4) | \x_radius)
|
||||
.space 1 @ Padding
|
||||
.2byte \trainer_type
|
||||
.2byte \sight_radius_tree_etc
|
||||
.4byte \script
|
||||
.2byte \event_flag
|
||||
.2byte 0
|
||||
.space 2 @ Padding
|
||||
inc _num_npcs
|
||||
.endm
|
||||
|
||||
.macro warp_def x, y, byte, warp, map_id
|
||||
@ Defines a warp event for map data. Mirrors the struct layout of WarpEvent in include/global.fieldmap.h
|
||||
.macro warp_def x:req, y:req, elevation:req, warpId:req, map_id:req
|
||||
.2byte \x, \y
|
||||
.byte \byte, \warp
|
||||
.byte \elevation
|
||||
.byte \warpId
|
||||
.byte \map_id & 0xFF @ map num
|
||||
.byte \map_id >> 8 @ map group
|
||||
inc _num_warps
|
||||
.endm
|
||||
|
||||
.macro coord_event x, y, elevation, trigger, index, script
|
||||
@ Defines a coord event for map data. Mirrors the struct layout of CoordEvent in include/global.fieldmap.h
|
||||
.macro coord_event x:req, y:req, elevation:req, trigger:req, index:req, script:req
|
||||
.2byte \x, \y
|
||||
.byte \elevation, 0
|
||||
.2byte \trigger, \index, 0
|
||||
.byte \elevation
|
||||
.space 1 @ Padding
|
||||
.2byte \trigger
|
||||
.2byte \index
|
||||
.space 2 @ Padding
|
||||
.4byte \script
|
||||
inc _num_traps
|
||||
.endm
|
||||
|
||||
.macro coord_weather_event x, y, elevation, weather
|
||||
.2byte \x, \y
|
||||
.byte \elevation, 0
|
||||
.2byte \weather
|
||||
.2byte 0, 0
|
||||
.4byte 0
|
||||
inc _num_traps
|
||||
@ Defines a weather coord event for map data. Any coord event is treated as a weather coord event if its script is NULL
|
||||
.macro coord_weather_event x:req, y:req, elevation:req, weather:req
|
||||
coord_event \x, \y, \elevation, \weather, 0, NULL
|
||||
.endm
|
||||
|
||||
.macro bg_event x, y, elevation, kind, arg6, arg7
|
||||
@ Defines a generic background event for map data. Mirrors the struct layout of BgEvent in include/global.fieldmap.h
|
||||
@ 'kind' is any BG_EVENT_* constant (see include/constants/event_bg.h).
|
||||
@ 'arg6' and 'arg7' are used differently depending on the bg event type. See macros below
|
||||
.macro bg_event x:req, y:req, elevation:req, kind:req, arg6:req, arg7
|
||||
.2byte \x, \y
|
||||
.byte \elevation, \kind
|
||||
.2byte 0
|
||||
.byte \elevation
|
||||
.byte \kind
|
||||
.space 2 @ Padding
|
||||
.if \kind != BG_EVENT_HIDDEN_ITEM
|
||||
.4byte \arg6
|
||||
.4byte \arg6
|
||||
.else
|
||||
.2byte \arg6
|
||||
.2byte \arg7
|
||||
.2byte \arg6
|
||||
.2byte \arg7
|
||||
.endif
|
||||
inc _num_signs
|
||||
.endm
|
||||
|
||||
.macro bg_hidden_item_event x, y, height, item, flag
|
||||
bg_event \x, \y, \height, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START)
|
||||
@ Defines a background sign event for map data. 'facing_dir' is any of the BG_EVENT_PLAYER_FACING_* constants (see include/constants/event_bg.h)
|
||||
.macro bg_sign_event x:req, y:req, elevation:req, facing_dir:req, script:req
|
||||
bg_event \x, \y, \elevation, \facing_dir, \script
|
||||
.endm
|
||||
|
||||
.macro bg_secret_base_event x, y, height, secret_base_id
|
||||
bg_event \x, \y, \height, BG_EVENT_SECRET_BASE, \secret_base_id
|
||||
@ Defines a background hidden item event for map data
|
||||
.macro bg_hidden_item_event x:req, y:req, elevation:req, item:req, flag:req
|
||||
bg_event \x, \y, \elevation, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START)
|
||||
.endm
|
||||
|
||||
.macro map_events npcs, warps, traps, signs
|
||||
@ Defines a background secret base event for map data
|
||||
.macro bg_secret_base_event x:req, y:req, elevation:req, secret_base_id:req
|
||||
bg_event \x, \y, \elevation, BG_EVENT_SECRET_BASE, \secret_base_id
|
||||
.endm
|
||||
|
||||
@ Defines the table of event data for a map. Mirrors the struct layout of MapEvents in include/global.fieldmap.h
|
||||
.macro map_events npcs:req, warps:req, traps:req, signs:req
|
||||
.byte _num_npcs, _num_warps, _num_traps, _num_signs
|
||||
.4byte \npcs, \warps, \traps, \signs
|
||||
reset_map_events
|
||||
.endm
|
||||
|
||||
@ Resets the event counters used to track how many events a map has. Run when the events table is created by map_events
|
||||
.macro reset_map_events
|
||||
.set _num_npcs, 0
|
||||
.set _num_warps, 0
|
||||
@@ -85,23 +112,29 @@
|
||||
.set _num_signs, 0
|
||||
.endm
|
||||
|
||||
@ Initialize the event counters for the first map
|
||||
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
|
||||
@ Directions for connecting maps
|
||||
@ The map.json files will only have e.g. "down" as direction data, and this will be appended to "connection_" by the connection macro
|
||||
.equiv connection_down, CONNECTION_SOUTH
|
||||
.equiv connection_up, CONNECTION_NORTH
|
||||
.equiv connection_left, CONNECTION_WEST
|
||||
.equiv connection_right, CONNECTION_EAST
|
||||
.equiv connection_dive, CONNECTION_DIVE
|
||||
.equiv connection_emerge, CONNECTION_EMERGE
|
||||
|
||||
.macro connection direction, offset, map
|
||||
.4byte connection_\direction
|
||||
@ Defines a map connection. Mirrors the struct layout of MapConnection in include/global.fieldmap.h
|
||||
.macro connection direction:req, offset:req, map:req
|
||||
.byte connection_\direction
|
||||
.space 3 @ Padding
|
||||
.4byte \offset
|
||||
map \map
|
||||
.space 2
|
||||
.space 2 @ Padding
|
||||
.endm
|
||||
|
||||
@ Defines the flags for a map header. Mirrors the layout of the bitfield in struct MapHeader in include/global.fieldmap.h
|
||||
.macro map_header_flags allow_cycling:req, allow_escaping:req, allow_running:req, show_map_name:req
|
||||
.byte ((\show_map_name & 1) << 3) | ((\allow_running & 1) << 2) | ((\allow_escaping & 1) << 1) | \allow_cycling
|
||||
.endm
|
||||
+161
-126
@@ -1,131 +1,166 @@
|
||||
.macro create_movement_action name
|
||||
enum _\name
|
||||
.macro create_movement_action name:req, value:req
|
||||
.macro \name
|
||||
.byte _\name
|
||||
.byte \value
|
||||
.endm
|
||||
.endm
|
||||
|
||||
enum_start
|
||||
create_movement_action face_down
|
||||
create_movement_action face_up
|
||||
create_movement_action face_left
|
||||
create_movement_action face_right
|
||||
create_movement_action walk_slow_down
|
||||
create_movement_action walk_slow_up
|
||||
create_movement_action walk_slow_left
|
||||
create_movement_action walk_slow_right
|
||||
create_movement_action walk_down
|
||||
create_movement_action walk_up
|
||||
create_movement_action walk_left
|
||||
create_movement_action walk_right
|
||||
create_movement_action jump_2_down
|
||||
create_movement_action jump_2_up
|
||||
create_movement_action jump_2_left
|
||||
create_movement_action jump_2_right
|
||||
create_movement_action delay_1
|
||||
create_movement_action delay_2
|
||||
create_movement_action delay_4
|
||||
create_movement_action delay_8
|
||||
create_movement_action delay_16
|
||||
create_movement_action walk_fast_down
|
||||
create_movement_action walk_fast_up
|
||||
create_movement_action walk_fast_left
|
||||
create_movement_action walk_fast_right
|
||||
create_movement_action walk_in_place_slow_down
|
||||
create_movement_action walk_in_place_slow_up
|
||||
create_movement_action walk_in_place_slow_left
|
||||
create_movement_action walk_in_place_slow_right
|
||||
create_movement_action walk_in_place_down
|
||||
create_movement_action walk_in_place_up
|
||||
create_movement_action walk_in_place_left
|
||||
create_movement_action walk_in_place_right
|
||||
create_movement_action walk_in_place_fast_down
|
||||
create_movement_action walk_in_place_fast_up
|
||||
create_movement_action walk_in_place_fast_left
|
||||
create_movement_action walk_in_place_fast_right
|
||||
create_movement_action walk_in_place_fastest_down
|
||||
create_movement_action walk_in_place_fastest_up
|
||||
create_movement_action walk_in_place_fastest_left
|
||||
create_movement_action walk_in_place_fastest_right
|
||||
create_movement_action ride_water_current_down
|
||||
create_movement_action ride_water_current_up
|
||||
create_movement_action ride_water_current_left
|
||||
create_movement_action ride_water_current_right
|
||||
create_movement_action walk_fastest_down
|
||||
create_movement_action walk_fastest_up
|
||||
create_movement_action walk_fastest_left
|
||||
create_movement_action walk_fastest_right
|
||||
create_movement_action slide_down
|
||||
create_movement_action slide_up
|
||||
create_movement_action slide_left
|
||||
create_movement_action slide_right
|
||||
create_movement_action player_run_down
|
||||
create_movement_action player_run_up
|
||||
create_movement_action player_run_left
|
||||
create_movement_action player_run_right
|
||||
create_movement_action start_anim_in_direction
|
||||
create_movement_action jump_special_down
|
||||
create_movement_action jump_special_up
|
||||
create_movement_action jump_special_left
|
||||
create_movement_action jump_special_right
|
||||
create_movement_action face_player
|
||||
create_movement_action face_away_player
|
||||
create_movement_action lock_facing_direction
|
||||
create_movement_action unlock_facing_direction
|
||||
create_movement_action jump_down
|
||||
create_movement_action jump_up
|
||||
create_movement_action jump_left
|
||||
create_movement_action jump_right
|
||||
create_movement_action jump_in_place_down
|
||||
create_movement_action jump_in_place_up
|
||||
create_movement_action jump_in_place_left
|
||||
create_movement_action jump_in_place_right
|
||||
create_movement_action jump_in_place_down_up
|
||||
create_movement_action jump_in_place_up_down
|
||||
create_movement_action jump_in_place_left_right
|
||||
create_movement_action jump_in_place_right_left
|
||||
create_movement_action face_original_direction
|
||||
create_movement_action nurse_joy_bow
|
||||
create_movement_action enable_jump_landing_ground_effect
|
||||
create_movement_action disable_jump_landing_ground_effect
|
||||
create_movement_action disable_anim
|
||||
create_movement_action restore_anim
|
||||
create_movement_action set_invisible
|
||||
create_movement_action set_visible
|
||||
create_movement_action emote_exclamation_mark
|
||||
create_movement_action emote_question_mark
|
||||
create_movement_action emote_heart
|
||||
create_movement_action reveal_trainer
|
||||
create_movement_action rock_smash_break
|
||||
create_movement_action cut_tree
|
||||
create_movement_action set_fixed_priority
|
||||
create_movement_action clear_fixed_priority
|
||||
create_movement_action init_affine_anim
|
||||
create_movement_action clear_affine_anim
|
||||
create_movement_action hide_reflection
|
||||
create_movement_action show_reflection
|
||||
create_movement_action walk_down_start_affine
|
||||
create_movement_action walk_down_affine
|
||||
create_movement_action face_down, MOVEMENT_ACTION_FACE_DOWN
|
||||
create_movement_action face_up, MOVEMENT_ACTION_FACE_UP
|
||||
create_movement_action face_left, MOVEMENT_ACTION_FACE_LEFT
|
||||
create_movement_action face_right, MOVEMENT_ACTION_FACE_RIGHT
|
||||
create_movement_action walk_slow_down, MOVEMENT_ACTION_WALK_SLOW_DOWN
|
||||
create_movement_action walk_slow_up, MOVEMENT_ACTION_WALK_SLOW_UP
|
||||
create_movement_action walk_slow_left, MOVEMENT_ACTION_WALK_SLOW_LEFT
|
||||
create_movement_action walk_slow_right, MOVEMENT_ACTION_WALK_SLOW_RIGHT
|
||||
create_movement_action walk_down, MOVEMENT_ACTION_WALK_NORMAL_DOWN
|
||||
create_movement_action walk_up, MOVEMENT_ACTION_WALK_NORMAL_UP
|
||||
create_movement_action walk_left, MOVEMENT_ACTION_WALK_NORMAL_LEFT
|
||||
create_movement_action walk_right, MOVEMENT_ACTION_WALK_NORMAL_RIGHT
|
||||
create_movement_action jump_2_down, MOVEMENT_ACTION_JUMP_2_DOWN
|
||||
create_movement_action jump_2_up, MOVEMENT_ACTION_JUMP_2_UP
|
||||
create_movement_action jump_2_left, MOVEMENT_ACTION_JUMP_2_LEFT
|
||||
create_movement_action jump_2_right, MOVEMENT_ACTION_JUMP_2_RIGHT
|
||||
create_movement_action delay_1, MOVEMENT_ACTION_DELAY_1
|
||||
create_movement_action delay_2, MOVEMENT_ACTION_DELAY_2
|
||||
create_movement_action delay_4, MOVEMENT_ACTION_DELAY_4
|
||||
create_movement_action delay_8, MOVEMENT_ACTION_DELAY_8
|
||||
create_movement_action delay_16, MOVEMENT_ACTION_DELAY_16
|
||||
create_movement_action walk_fast_down, MOVEMENT_ACTION_WALK_FAST_DOWN
|
||||
create_movement_action walk_fast_up, MOVEMENT_ACTION_WALK_FAST_UP
|
||||
create_movement_action walk_fast_left, MOVEMENT_ACTION_WALK_FAST_LEFT
|
||||
create_movement_action walk_fast_right, MOVEMENT_ACTION_WALK_FAST_RIGHT
|
||||
create_movement_action walk_in_place_slow_down, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_DOWN
|
||||
create_movement_action walk_in_place_slow_up, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_UP
|
||||
create_movement_action walk_in_place_slow_left, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_LEFT
|
||||
create_movement_action walk_in_place_slow_right, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_RIGHT
|
||||
create_movement_action walk_in_place_down, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_DOWN
|
||||
create_movement_action walk_in_place_up, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_UP
|
||||
create_movement_action walk_in_place_left, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_LEFT
|
||||
create_movement_action walk_in_place_right, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_RIGHT
|
||||
create_movement_action walk_in_place_fast_down, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_DOWN
|
||||
create_movement_action walk_in_place_fast_up, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_UP
|
||||
create_movement_action walk_in_place_fast_left, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_LEFT
|
||||
create_movement_action walk_in_place_fast_right, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_RIGHT
|
||||
create_movement_action walk_in_place_faster_down, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_DOWN
|
||||
create_movement_action walk_in_place_faster_up, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_UP
|
||||
create_movement_action walk_in_place_faster_left, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_LEFT
|
||||
create_movement_action walk_in_place_faster_right, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_RIGHT
|
||||
create_movement_action ride_water_current_down, MOVEMENT_ACTION_RIDE_WATER_CURRENT_DOWN
|
||||
create_movement_action ride_water_current_up, MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP
|
||||
create_movement_action ride_water_current_left, MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT
|
||||
create_movement_action ride_water_current_right, MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT
|
||||
create_movement_action walk_faster_down, MOVEMENT_ACTION_WALK_FASTER_DOWN
|
||||
create_movement_action walk_faster_up, MOVEMENT_ACTION_WALK_FASTER_UP
|
||||
create_movement_action walk_faster_left, MOVEMENT_ACTION_WALK_FASTER_LEFT
|
||||
create_movement_action walk_faster_right, MOVEMENT_ACTION_WALK_FASTER_RIGHT
|
||||
create_movement_action slide_down, MOVEMENT_ACTION_SLIDE_DOWN
|
||||
create_movement_action slide_up, MOVEMENT_ACTION_SLIDE_UP
|
||||
create_movement_action slide_left, MOVEMENT_ACTION_SLIDE_LEFT
|
||||
create_movement_action slide_right, MOVEMENT_ACTION_SLIDE_RIGHT
|
||||
create_movement_action player_run_down, MOVEMENT_ACTION_PLAYER_RUN_DOWN
|
||||
create_movement_action player_run_up, MOVEMENT_ACTION_PLAYER_RUN_UP
|
||||
create_movement_action player_run_left, MOVEMENT_ACTION_PLAYER_RUN_LEFT
|
||||
create_movement_action player_run_right, MOVEMENT_ACTION_PLAYER_RUN_RIGHT
|
||||
create_movement_action start_anim_in_direction, MOVEMENT_ACTION_START_ANIM_IN_DIRECTION
|
||||
create_movement_action jump_special_down, MOVEMENT_ACTION_JUMP_SPECIAL_DOWN
|
||||
create_movement_action jump_special_up, MOVEMENT_ACTION_JUMP_SPECIAL_UP
|
||||
create_movement_action jump_special_left, MOVEMENT_ACTION_JUMP_SPECIAL_LEFT
|
||||
create_movement_action jump_special_right, MOVEMENT_ACTION_JUMP_SPECIAL_RIGHT
|
||||
create_movement_action face_player, MOVEMENT_ACTION_FACE_PLAYER
|
||||
create_movement_action face_away_player, MOVEMENT_ACTION_FACE_AWAY_PLAYER
|
||||
create_movement_action lock_facing_direction, MOVEMENT_ACTION_LOCK_FACING_DIRECTION
|
||||
create_movement_action unlock_facing_direction, MOVEMENT_ACTION_UNLOCK_FACING_DIRECTION
|
||||
create_movement_action jump_down, MOVEMENT_ACTION_JUMP_DOWN
|
||||
create_movement_action jump_up, MOVEMENT_ACTION_JUMP_UP
|
||||
create_movement_action jump_left, MOVEMENT_ACTION_JUMP_LEFT
|
||||
create_movement_action jump_right, MOVEMENT_ACTION_JUMP_RIGHT
|
||||
create_movement_action jump_in_place_down, MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN
|
||||
create_movement_action jump_in_place_up, MOVEMENT_ACTION_JUMP_IN_PLACE_UP
|
||||
create_movement_action jump_in_place_left, MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT
|
||||
create_movement_action jump_in_place_right, MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT
|
||||
create_movement_action jump_in_place_down_up, MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN_UP
|
||||
create_movement_action jump_in_place_up_down, MOVEMENT_ACTION_JUMP_IN_PLACE_UP_DOWN
|
||||
create_movement_action jump_in_place_left_right, MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT_RIGHT
|
||||
create_movement_action jump_in_place_right_left, MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT_LEFT
|
||||
create_movement_action face_original_direction, MOVEMENT_ACTION_FACE_ORIGINAL_DIRECTION
|
||||
create_movement_action nurse_joy_bow, MOVEMENT_ACTION_NURSE_JOY_BOW_DOWN
|
||||
create_movement_action enable_jump_landing_ground_effect, MOVEMENT_ACTION_ENABLE_JUMP_LANDING_GROUND_EFFECT
|
||||
create_movement_action disable_jump_landing_ground_effect, MOVEMENT_ACTION_DISABLE_JUMP_LANDING_GROUND_EFFECT
|
||||
create_movement_action disable_anim, MOVEMENT_ACTION_DISABLE_ANIMATION
|
||||
create_movement_action restore_anim, MOVEMENT_ACTION_RESTORE_ANIMATION
|
||||
create_movement_action set_invisible, MOVEMENT_ACTION_SET_INVISIBLE
|
||||
create_movement_action set_visible, MOVEMENT_ACTION_SET_VISIBLE
|
||||
create_movement_action emote_exclamation_mark, MOVEMENT_ACTION_EMOTE_EXCLAMATION_MARK
|
||||
create_movement_action emote_question_mark, MOVEMENT_ACTION_EMOTE_QUESTION_MARK
|
||||
create_movement_action emote_heart, MOVEMENT_ACTION_EMOTE_HEART
|
||||
create_movement_action reveal_trainer, MOVEMENT_ACTION_REVEAL_TRAINER
|
||||
create_movement_action rock_smash_break, MOVEMENT_ACTION_ROCK_SMASH_BREAK
|
||||
create_movement_action cut_tree, MOVEMENT_ACTION_CUT_TREE
|
||||
create_movement_action set_fixed_priority, MOVEMENT_ACTION_SET_FIXED_PRIORITY
|
||||
create_movement_action clear_fixed_priority, MOVEMENT_ACTION_CLEAR_FIXED_PRIORITY
|
||||
create_movement_action init_affine_anim, MOVEMENT_ACTION_INIT_AFFINE_ANIM
|
||||
create_movement_action clear_affine_anim, MOVEMENT_ACTION_CLEAR_AFFINE_ANIM
|
||||
create_movement_action hide_reflection, MOVEMENT_ACTION_HIDE_REFLECTION
|
||||
create_movement_action show_reflection, MOVEMENT_ACTION_SHOW_REFLECTION
|
||||
create_movement_action walk_down_start_affine, MOVEMENT_ACTION_WALK_DOWN_START_AFFINE
|
||||
create_movement_action walk_down_affine, MOVEMENT_ACTION_WALK_DOWN_AFFINE
|
||||
create_movement_action acro_wheelie_face_down, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN
|
||||
create_movement_action acro_wheelie_face_up, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_UP
|
||||
create_movement_action acro_wheelie_face_left, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_LEFT
|
||||
create_movement_action acro_wheelie_face_right, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_RIGHT
|
||||
create_movement_action acro_pop_wheelie_down, MOVEMENT_ACTION_ACRO_POP_WHEELIE_DOWN
|
||||
create_movement_action acro_pop_wheelie_up, MOVEMENT_ACTION_ACRO_POP_WHEELIE_UP
|
||||
create_movement_action acro_pop_wheelie_left, MOVEMENT_ACTION_ACRO_POP_WHEELIE_LEFT
|
||||
create_movement_action acro_pop_wheelie_right, MOVEMENT_ACTION_ACRO_POP_WHEELIE_RIGHT
|
||||
create_movement_action acro_end_wheelie_face_down, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_DOWN
|
||||
create_movement_action acro_end_wheelie_face_up, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_UP
|
||||
create_movement_action acro_end_wheelie_face_left, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_LEFT
|
||||
create_movement_action acro_end_wheelie_face_right, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_RIGHT
|
||||
create_movement_action acro_wheelie_hop_face_down, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_DOWN
|
||||
create_movement_action acro_wheelie_hop_face_up, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_UP
|
||||
create_movement_action acro_wheelie_hop_face_left, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_LEFT
|
||||
create_movement_action acro_wheelie_hop_face_right, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_RIGHT
|
||||
create_movement_action acro_wheelie_hop_down, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_DOWN
|
||||
create_movement_action acro_wheelie_hop_up, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_UP
|
||||
create_movement_action acro_wheelie_hop_left, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_LEFT
|
||||
create_movement_action acro_wheelie_hop_right, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_RIGHT
|
||||
create_movement_action acro_wheelie_jump_down, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_DOWN
|
||||
create_movement_action acro_wheelie_jump_up, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_UP
|
||||
create_movement_action acro_wheelie_jump_left, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_LEFT
|
||||
create_movement_action acro_wheelie_jump_right, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_RIGHT
|
||||
create_movement_action acro_wheelie_in_place_down, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_DOWN
|
||||
create_movement_action acro_wheelie_in_place_up, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_UP
|
||||
create_movement_action acro_wheelie_in_place_left, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_LEFT
|
||||
create_movement_action acro_wheelie_in_place_right, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_RIGHT
|
||||
create_movement_action acro_pop_wheelie_move_down, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_DOWN
|
||||
create_movement_action acro_pop_wheelie_move_up, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_UP
|
||||
create_movement_action acro_pop_wheelie_move_left, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_LEFT
|
||||
create_movement_action acro_pop_wheelie_move_right, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_RIGHT
|
||||
create_movement_action acro_wheelie_move_down, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_DOWN
|
||||
create_movement_action acro_wheelie_move_up, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_UP
|
||||
create_movement_action acro_wheelie_move_left, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_LEFT
|
||||
create_movement_action acro_wheelie_move_right, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_RIGHT
|
||||
create_movement_action acro_end_wheelie_move_down, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_DOWN
|
||||
create_movement_action acro_end_wheelie_move_up, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_UP
|
||||
create_movement_action acro_end_wheelie_move_left, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_LEFT
|
||||
create_movement_action acro_end_wheelie_move_right, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_RIGHT
|
||||
create_movement_action walk_diag_northwest, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_LEFT
|
||||
create_movement_action walk_diag_northeast, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_RIGHT
|
||||
create_movement_action walk_diag_southwest, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_LEFT
|
||||
create_movement_action walk_diag_southeast, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_RIGHT
|
||||
create_movement_action walk_slow_diag_northwest, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_LEFT
|
||||
create_movement_action walk_slow_diag_northeast, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_RIGHT
|
||||
create_movement_action walk_slow_diag_southwest, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_LEFT
|
||||
create_movement_action walk_slow_diag_southeast, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_RIGHT
|
||||
create_movement_action lock_anim, MOVEMENT_ACTION_LOCK_ANIM
|
||||
create_movement_action unlock_anim, MOVEMENT_ACTION_UNLOCK_ANIM
|
||||
create_movement_action walk_left_affine, MOVEMENT_ACTION_WALK_LEFT_AFFINE
|
||||
create_movement_action walk_right_affine, MOVEMENT_ACTION_WALK_RIGHT_AFFINE
|
||||
create_movement_action levitate, MOVEMENT_ACTION_LEVITATE
|
||||
create_movement_action stop_levitate, MOVEMENT_ACTION_STOP_LEVITATE
|
||||
create_movement_action destroy_extra_task, MOVEMENT_ACTION_STOP_LEVITATE_AT_TOP
|
||||
create_movement_action figure_8, MOVEMENT_ACTION_FIGURE_8
|
||||
create_movement_action fly_up, MOVEMENT_ACTION_FLY_UP
|
||||
create_movement_action fly_down, MOVEMENT_ACTION_FLY_DOWN
|
||||
|
||||
enum_start 0x8C
|
||||
create_movement_action walk_diag_northwest
|
||||
create_movement_action walk_diag_northeast
|
||||
create_movement_action walk_diag_southwest
|
||||
create_movement_action walk_diag_southeast
|
||||
create_movement_action walk_slow_diag_northwest
|
||||
create_movement_action walk_slow_diag_northeast
|
||||
create_movement_action walk_slow_diag_southwest
|
||||
create_movement_action walk_slow_diag_southeast
|
||||
create_movement_action store_lock_anim
|
||||
create_movement_action free_unlock_anim
|
||||
create_movement_action walk_left_affine
|
||||
create_movement_action walk_right_affine
|
||||
create_movement_action levitate
|
||||
create_movement_action stop_levitate
|
||||
create_movement_action destroy_extra_task
|
||||
create_movement_action figure_8
|
||||
create_movement_action fly_up
|
||||
create_movement_action fly_down
|
||||
|
||||
enum_start 0xfe
|
||||
create_movement_action step_end
|
||||
create_movement_action step_end, MOVEMENT_ACTION_STEP_END
|
||||
@@ -145,8 +145,20 @@
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
.endm
|
||||
|
||||
.macro cry2 sample:req
|
||||
.macro cry_reverse sample:req
|
||||
.byte 0x30, 60, 0, 0
|
||||
.4byte \sample
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
.endm
|
||||
|
||||
.macro cry_uncomp sample @ not compressed
|
||||
.byte 0x0, 60, 0, 0
|
||||
.4byte \sample
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
.endm
|
||||
|
||||
.macro cry_reverse_uncomp sample @ not compressed
|
||||
.byte 0x10, 60, 0, 0
|
||||
.4byte \sample
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
.endm
|
||||
@@ -1,56 +0,0 @@
|
||||
.macro pokedex_entry height, width, text_pointer, pokemon_scale, pokemon_offset, trainer_scale, trainer_offset
|
||||
.2byte \height @ in decimeters
|
||||
.2byte \width @ in hectograms
|
||||
.4byte \text_pointer
|
||||
.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
|
||||
.endm
|
||||
@@ -100,9 +100,9 @@
|
||||
special CallTrainerHillFunction
|
||||
.endm
|
||||
|
||||
@ Set the challenge mode to HILL_TAG_* (Normal, Variety, Unique, or Expert)
|
||||
.macro trainerhill_settag tag:req
|
||||
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_TAG
|
||||
copyvar VAR_0x8005, \tag
|
||||
@ Set the challenge mode to HILL_MODE_* (Normal, Variety, Unique, or Expert)
|
||||
.macro trainerhill_setmode mode:req
|
||||
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_MODE
|
||||
copyvar VAR_0x8005, \mode
|
||||
special CallTrainerHillFunction
|
||||
.endm
|
||||
@@ -1,35 +0,0 @@
|
||||
.macro window_template bg_id, x, y, width, height, palette, vram_tile_offset
|
||||
.byte \bg_id
|
||||
.byte \x
|
||||
.byte \y
|
||||
.byte \width
|
||||
.byte \height
|
||||
.byte \palette
|
||||
.2byte \vram_tile_offset
|
||||
.endm
|
||||
|
||||
.macro null_window_template
|
||||
window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000
|
||||
.endm
|
||||
|
||||
.macro glyph_width_func font_id, func
|
||||
.4byte \font_id
|
||||
.4byte \func
|
||||
.endm
|
||||
|
||||
.macro keypad_icon tile_offset, width, height
|
||||
.2byte \tile_offset
|
||||
.byte \width
|
||||
.byte \height
|
||||
.endm
|
||||
|
||||
.macro font_info func, max_glyph_width, glyph_height, glyph_spacing, line_spacing, text_color, shadow_color, bg_color
|
||||
.4byte \func
|
||||
.byte \max_glyph_width
|
||||
.byte \glyph_height
|
||||
.byte \glyph_spacing
|
||||
.byte \line_spacing
|
||||
.byte \text_color << 4 @ low nybble seems unused
|
||||
.byte (\shadow_color << 4) | \bg_color
|
||||
.2byte 0 @ padding
|
||||
.endm
|
||||
@@ -1,35 +0,0 @@
|
||||
.global RomHeaderNintendoLogo
|
||||
RomHeaderNintendoLogo:
|
||||
.space 156
|
||||
|
||||
RomHeaderGameTitle:
|
||||
.space 12
|
||||
|
||||
.global RomHeaderGameCode
|
||||
RomHeaderGameCode:
|
||||
.space 4
|
||||
|
||||
RomHeaderMakerCode:
|
||||
.space 2
|
||||
|
||||
RomHeaderMagic:
|
||||
.byte 0
|
||||
|
||||
RomHeaderMainUnitCode:
|
||||
.byte 0
|
||||
|
||||
RomHeaderDeviceType:
|
||||
.byte 0
|
||||
|
||||
RomHeaderReserved1:
|
||||
.space 7
|
||||
|
||||
.global RomHeaderSoftwareVersion
|
||||
RomHeaderSoftwareVersion:
|
||||
.byte 0
|
||||
|
||||
RomHeaderChecksum:
|
||||
.byte 0
|
||||
|
||||
RomHeaderReserved2:
|
||||
.space 2
|
||||
Reference in new issue
Block a user