2017-12-14 05:36:24 +00:00
|
|
|
map: macro
|
|
|
|
;\1: map id
|
|
|
|
db GROUP_\1, MAP_\1
|
|
|
|
endm
|
|
|
|
|
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
scene_script: macro
|
2017-12-14 05:36:24 +00:00
|
|
|
;\1: script pointer
|
|
|
|
dw \1, 0
|
|
|
|
endm
|
|
|
|
|
|
|
|
warp_def: macro
|
|
|
|
;\1: y: top to bottom, starts at 0
|
|
|
|
;\2: x: left to right, starts at 0
|
|
|
|
;\3: warp destination: starts at 1
|
|
|
|
;\4: map id: from constants/map_constants.asm
|
|
|
|
db \1, \2, \3
|
|
|
|
map \4
|
|
|
|
endm
|
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
coord_event: macro
|
2017-12-24 22:35:33 +00:00
|
|
|
;\1: scene id: controlled by setscene/setmapscene
|
2017-12-14 05:36:24 +00:00
|
|
|
;\2: y: top to bottom, starts at 0
|
|
|
|
;\3: x: left to right, starts at 0
|
|
|
|
;\4: script pointer
|
|
|
|
db \1, \2, \3, $0
|
|
|
|
dw \4
|
|
|
|
db $0, $0
|
|
|
|
endm
|
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
bg_event: macro
|
2017-12-14 05:36:24 +00:00
|
|
|
;\1: y: top to bottom, starts at 0
|
|
|
|
;\2: x: left to right, starts at 0
|
2017-12-24 18:46:34 +00:00
|
|
|
;\3: function: a BGEVENT_* constant
|
2017-12-14 05:36:24 +00:00
|
|
|
;\4: script pointer
|
|
|
|
db \1, \2, \3
|
|
|
|
dw \4
|
|
|
|
endm
|
|
|
|
|
2017-12-24 18:46:34 +00:00
|
|
|
object_event: macro
|
2017-12-14 05:36:24 +00:00
|
|
|
;\1: sprite: a SPRITE_* constant
|
|
|
|
;\2: y: top to bottom, starts at 0
|
|
|
|
;\3: x: left to right, starts at 0
|
|
|
|
;\4: movement function: a SPRITEMOVEDATA_* constant
|
|
|
|
;\5, \6: movement radius: y, x
|
2017-12-24 22:35:33 +00:00
|
|
|
;\7, \8: hour limits: h1, h2 (0-23)
|
|
|
|
; * if h1 < h2, the object_event will only appear from h1 to h2
|
|
|
|
; * if h1 > h2, the object_event will not appear from h2 to h1
|
|
|
|
; * if h1 == h2, the object_event will always appear
|
|
|
|
; * if h1 == -1, h2 is treated as a time-of-day value:
|
2017-12-23 06:19:34 +00:00
|
|
|
; a combo of MORN, DAY, and/or NITE, or -1 to always appear
|
2017-12-14 05:36:24 +00:00
|
|
|
;\9: color: a PAL_NPC_* constant, or 0 for sprite default
|
2017-12-24 18:46:34 +00:00
|
|
|
;\10: function: a OBJECTTYPE_* constant
|
|
|
|
;\11: sight range: applies to OBJECTTYPE_TRAINER
|
2017-12-14 05:36:24 +00:00
|
|
|
;\12: script pointer
|
2017-12-24 22:35:33 +00:00
|
|
|
;\13: event flag: an EVENT_* constant, or -1 to always appear
|
2017-12-14 05:36:24 +00:00
|
|
|
db \1, \2 + 4, \3 + 4, \4
|
|
|
|
dn \5, \6
|
|
|
|
db \7, \8
|
|
|
|
shift
|
|
|
|
dn \8, \9
|
|
|
|
shift
|
|
|
|
db \9
|
|
|
|
shift
|
|
|
|
dw \9
|
|
|
|
shift
|
|
|
|
dw \9
|
|
|
|
endm
|
|
|
|
|
|
|
|
|
|
|
|
trainer: macro
|
|
|
|
;\1: flag: an EVENT_BEAT_* constant
|
|
|
|
;\2: trainer group
|
|
|
|
;\3: trainer id
|
|
|
|
;\4: seen text
|
|
|
|
;\5: win text
|
|
|
|
;\6: loss text
|
|
|
|
;\7: after-battle text
|
|
|
|
dw \1
|
|
|
|
db \2, \3
|
|
|
|
dw \4, \5, \6, \7
|
|
|
|
endm
|
|
|
|
|
|
|
|
itemball: macro
|
|
|
|
;\1: item: from constants/item_constants.asm
|
|
|
|
;\2: quantity: default 1
|
|
|
|
if _NARG == 2
|
|
|
|
db \1, \2
|
|
|
|
else
|
|
|
|
db \1, 1
|
|
|
|
endc
|
|
|
|
endm
|
|
|
|
|
|
|
|
elevfloor: macro
|
|
|
|
;\1: floor: a FLOOR_* constant
|
|
|
|
;\2: warp destination: starts at 1
|
|
|
|
;\3: map id
|
|
|
|
db \1, \2
|
|
|
|
map \3
|
|
|
|
ENDM
|
|
|
|
|
|
|
|
stonetable: macro
|
|
|
|
;\1: warp id
|
2017-12-24 18:46:34 +00:00
|
|
|
;\2: object_event id
|
2017-12-14 05:36:24 +00:00
|
|
|
;\3: script pointer
|
|
|
|
db \1, \2
|
|
|
|
dw \3
|
|
|
|
endm
|