| 
									
										
										
										
											2018-02-03 16:58:49 -05:00
										 |  |  | map_id: MACRO | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\1: map id | 
					
						
							|  |  |  | 	db GROUP_\1, MAP_\1 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:31:16 +01:00
										 |  |  | ENDM | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-21 17:42:25 -04:00
										 |  |  | object_const_def EQUS "const_def 2" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-24 09:49:26 -04:00
										 |  |  | def_scene_scripts: MACRO | 
					
						
							|  |  |  | if DEF(_NUM_SCENE_SCRIPTS) | 
					
						
							|  |  |  | 	PURGE _NUM_SCENE_SCRIPTS | 
					
						
							|  |  |  | endc | 
					
						
							|  |  |  | _NUM_SCENE_SCRIPTS EQUS "_NUM_SCENE_SCRIPTS_\@" | 
					
						
							|  |  |  | 	db _NUM_SCENE_SCRIPTS | 
					
						
							|  |  |  | _NUM_SCENE_SCRIPTS = 0 | 
					
						
							|  |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 13:23:44 +01:00
										 |  |  | scene_script: MACRO | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\1: script pointer | 
					
						
							| 
									
										
										
										
											2018-02-01 15:19:27 -05:00
										 |  |  | 	dw \1 | 
					
						
							|  |  |  | 	dw 0 ; filler | 
					
						
							| 
									
										
										
										
											2020-07-24 09:49:26 -04:00
										 |  |  | _NUM_SCENE_SCRIPTS = _NUM_SCENE_SCRIPTS + 1 | 
					
						
							|  |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def_callbacks: MACRO | 
					
						
							|  |  |  | if DEF(_NUM_CALLBACKS) | 
					
						
							|  |  |  | 	PURGE _NUM_CALLBACKS | 
					
						
							|  |  |  | endc | 
					
						
							|  |  |  | _NUM_CALLBACKS EQUS "_NUM_CALLBACKS_\@" | 
					
						
							|  |  |  | 	db _NUM_CALLBACKS | 
					
						
							|  |  |  | _NUM_CALLBACKS = 0 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:31:16 +01:00
										 |  |  | ENDM | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-13 00:47:38 -05:00
										 |  |  | callback: MACRO | 
					
						
							|  |  |  | ;\1: type: a MAPCALLBACK_* constant | 
					
						
							|  |  |  | ;\2: script pointer | 
					
						
							|  |  |  | 	dbw \1, \2 | 
					
						
							| 
									
										
										
										
											2020-07-24 09:49:26 -04:00
										 |  |  | _NUM_CALLBACKS = _NUM_CALLBACKS + 1 | 
					
						
							|  |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def_warp_events: MACRO | 
					
						
							|  |  |  | if DEF(_NUM_WARP_EVENTS) | 
					
						
							|  |  |  | 	PURGE _NUM_WARP_EVENTS | 
					
						
							|  |  |  | endc | 
					
						
							|  |  |  | _NUM_WARP_EVENTS EQUS "_NUM_WARP_EVENTS_\@" | 
					
						
							|  |  |  | 	db _NUM_WARP_EVENTS | 
					
						
							|  |  |  | _NUM_WARP_EVENTS = 0 | 
					
						
							| 
									
										
										
										
											2018-01-13 00:47:38 -05:00
										 |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-28 13:20:04 -05:00
										 |  |  | warp_event: MACRO | 
					
						
							| 
									
										
										
										
											2017-12-28 14:31:25 -05:00
										 |  |  | ;\1: x: left to right, starts at 0 | 
					
						
							|  |  |  | ;\2: y: top to bottom, starts at 0 | 
					
						
							| 
									
										
										
										
											2018-02-01 21:54:00 -05:00
										 |  |  | ;\3: map id: from constants/map_constants.asm | 
					
						
							|  |  |  | ;\4: warp destination: starts at 1 | 
					
						
							|  |  |  | 	db \2, \1, \4 | 
					
						
							| 
									
										
										
										
											2018-02-03 16:58:49 -05:00
										 |  |  | 	map_id \3 | 
					
						
							| 
									
										
										
										
											2020-07-24 09:49:26 -04:00
										 |  |  | _NUM_WARP_EVENTS = _NUM_WARP_EVENTS + 1 | 
					
						
							|  |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def_coord_events: MACRO | 
					
						
							|  |  |  | if DEF(_NUM_COORD_EVENTS) | 
					
						
							|  |  |  | 	PURGE _NUM_COORD_EVENTS | 
					
						
							|  |  |  | endc | 
					
						
							|  |  |  | _NUM_COORD_EVENTS EQUS "_NUM_COORD_EVENTS_\@" | 
					
						
							|  |  |  | 	db _NUM_COORD_EVENTS | 
					
						
							|  |  |  | _NUM_COORD_EVENTS = 0 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:31:16 +01:00
										 |  |  | ENDM | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 13:23:44 +01:00
										 |  |  | coord_event: MACRO | 
					
						
							| 
									
										
										
										
											2017-12-28 14:31:25 -05:00
										 |  |  | ;\1: x: left to right, starts at 0 | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\2: y: top to bottom, starts at 0 | 
					
						
							| 
									
										
										
										
											2018-02-01 15:19:27 -05:00
										 |  |  | ;\3: scene id: a SCENE_* constant; controlled by setscene/setmapscene | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\4: script pointer | 
					
						
							| 
									
										
										
										
											2018-01-13 00:47:38 -05:00
										 |  |  | 	db \3, \2, \1 | 
					
						
							|  |  |  | 	db 0 ; filler | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 	dw \4 | 
					
						
							| 
									
										
										
										
											2019-03-03 14:19:16 -05:00
										 |  |  | 	dw 0 ; filler | 
					
						
							| 
									
										
										
										
											2020-07-24 09:49:26 -04:00
										 |  |  | _NUM_COORD_EVENTS = _NUM_COORD_EVENTS + 1 | 
					
						
							|  |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def_bg_events: MACRO | 
					
						
							|  |  |  | if DEF(_NUM_BG_EVENTS) | 
					
						
							|  |  |  | 	PURGE _NUM_BG_EVENTS | 
					
						
							|  |  |  | endc | 
					
						
							|  |  |  | _NUM_BG_EVENTS EQUS "_NUM_BG_EVENTS_\@" | 
					
						
							|  |  |  | 	db _NUM_BG_EVENTS | 
					
						
							|  |  |  | _NUM_BG_EVENTS = 0 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:31:16 +01:00
										 |  |  | ENDM | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 13:23:44 +01:00
										 |  |  | bg_event: MACRO | 
					
						
							| 
									
										
										
										
											2017-12-28 14:31:25 -05:00
										 |  |  | ;\1: x: left to right, starts at 0 | 
					
						
							|  |  |  | ;\2: y: top to bottom, starts at 0 | 
					
						
							| 
									
										
										
										
											2017-12-24 13:46:34 -05:00
										 |  |  | ;\3: function: a BGEVENT_* constant | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\4: script pointer | 
					
						
							| 
									
										
										
										
											2017-12-28 14:31:25 -05:00
										 |  |  | 	db \2, \1, \3 | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 	dw \4 | 
					
						
							| 
									
										
										
										
											2020-07-24 09:49:26 -04:00
										 |  |  | _NUM_BG_EVENTS = _NUM_BG_EVENTS + 1 | 
					
						
							|  |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def_object_events: MACRO | 
					
						
							|  |  |  | if DEF(_NUM_OBJECT_EVENTS) | 
					
						
							|  |  |  | 	PURGE _NUM_OBJECT_EVENTS | 
					
						
							|  |  |  | endc | 
					
						
							|  |  |  | _NUM_OBJECT_EVENTS EQUS "_NUM_OBJECT_EVENTS_\@" | 
					
						
							|  |  |  | 	db _NUM_OBJECT_EVENTS | 
					
						
							|  |  |  | _NUM_OBJECT_EVENTS = 0 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:31:16 +01:00
										 |  |  | ENDM | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 13:23:44 +01:00
										 |  |  | object_event: MACRO | 
					
						
							| 
									
										
										
										
											2017-12-28 14:31:25 -05:00
										 |  |  | ;\1: x: left to right, starts at 0 | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\2: y: top to bottom, starts at 0 | 
					
						
							| 
									
										
										
										
											2017-12-28 14:31:25 -05:00
										 |  |  | ;\3: sprite: a SPRITE_* constant | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\4: movement function: a SPRITEMOVEDATA_* constant | 
					
						
							| 
									
										
										
										
											2017-12-28 14:31:25 -05:00
										 |  |  | ;\5, \6: movement radius: x, y | 
					
						
							| 
									
										
										
										
											2017-12-24 17:35:33 -05: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 01:19:34 -05:00
										 |  |  | ;    a combo of MORN, DAY, and/or NITE, or -1 to always appear | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\9: color: a PAL_NPC_* constant, or 0 for sprite default | 
					
						
							| 
									
										
										
										
											2017-12-24 13:46:34 -05:00
										 |  |  | ;\10: function: a OBJECTTYPE_* constant | 
					
						
							|  |  |  | ;\11: sight range: applies to OBJECTTYPE_TRAINER | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\12: script pointer | 
					
						
							| 
									
										
										
										
											2017-12-24 17:35:33 -05:00
										 |  |  | ;\13: event flag: an EVENT_* constant, or -1 to always appear | 
					
						
							| 
									
										
										
										
											2017-12-28 14:31:25 -05:00
										 |  |  | 	db \3, \2 + 4, \1 + 4, \4 | 
					
						
							|  |  |  | 	dn \6, \5 | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 	db \7, \8 | 
					
						
							|  |  |  | 	shift | 
					
						
							|  |  |  | 	dn \8, \9 | 
					
						
							|  |  |  | 	shift | 
					
						
							|  |  |  | 	db \9 | 
					
						
							|  |  |  | 	shift | 
					
						
							|  |  |  | 	dw \9 | 
					
						
							|  |  |  | 	shift | 
					
						
							|  |  |  | 	dw \9 | 
					
						
							| 
									
										
										
										
											2020-07-24 09:49:26 -04:00
										 |  |  | _NUM_OBJECT_EVENTS = _NUM_OBJECT_EVENTS + 1 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:31:16 +01:00
										 |  |  | ENDM | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 13:23:44 +01:00
										 |  |  | trainer: MACRO | 
					
						
							| 
									
										
										
										
											2018-01-23 13:08:48 -05:00
										 |  |  | ;\1: trainer group | 
					
						
							|  |  |  | ;\2: trainer id | 
					
						
							|  |  |  | ;\3: flag: an EVENT_BEAT_* constant | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\4: seen text | 
					
						
							|  |  |  | ;\5: win text | 
					
						
							|  |  |  | ;\6: loss text | 
					
						
							|  |  |  | ;\7: after-battle text | 
					
						
							| 
									
										
										
										
											2018-01-23 13:08:48 -05:00
										 |  |  | 	dw \3 | 
					
						
							|  |  |  | 	db \1, \2 | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 	dw \4, \5, \6, \7 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:31:16 +01:00
										 |  |  | ENDM | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 13:23:44 +01:00
										 |  |  | itemball: MACRO | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\1: item: from constants/item_constants.asm | 
					
						
							|  |  |  | ;\2: quantity: default 1 | 
					
						
							| 
									
										
										
										
											2018-02-25 20:12:58 -05:00
										 |  |  | if _NARG == 1 | 
					
						
							|  |  |  | 	itemball \1, 1 | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | else | 
					
						
							| 
									
										
										
										
											2018-02-25 20:12:58 -05:00
										 |  |  | 	db \1, \2 | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | endc | 
					
						
							| 
									
										
										
										
											2017-12-28 22:31:16 +01:00
										 |  |  | ENDM | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-13 00:47:38 -05:00
										 |  |  | hiddenitem: MACRO | 
					
						
							| 
									
										
										
										
											2018-01-23 12:59:21 -05:00
										 |  |  | ;\1: item: from constants/item_constants.asm | 
					
						
							|  |  |  | ;\2: flag: an EVENT_* constant | 
					
						
							|  |  |  | 	dwb \2, \1 | 
					
						
							| 
									
										
										
										
											2018-01-13 00:47:38 -05:00
										 |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 13:23:44 +01:00
										 |  |  | elevfloor: MACRO | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\1: floor: a FLOOR_* constant | 
					
						
							|  |  |  | ;\2: warp destination: starts at 1 | 
					
						
							|  |  |  | ;\3: map id | 
					
						
							|  |  |  | 	db \1, \2 | 
					
						
							| 
									
										
										
										
											2018-02-03 16:58:49 -05:00
										 |  |  | 	map_id \3 | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-13 00:47:38 -05:00
										 |  |  | conditional_event: MACRO | 
					
						
							|  |  |  | ;\1: flag: an EVENT_* constant | 
					
						
							|  |  |  | ;\2: script pointer | 
					
						
							|  |  |  | 	dw \1, \2 | 
					
						
							|  |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cmdqueue: MACRO | 
					
						
							|  |  |  | ;\1: type: a CMDQUEUE_* constant | 
					
						
							|  |  |  | ;\2: data pointer | 
					
						
							|  |  |  | 	dbw \1, \2 | 
					
						
							|  |  |  | 	dw 0 ; filler | 
					
						
							|  |  |  | ENDM | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 13:23:44 +01:00
										 |  |  | stonetable: MACRO | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\1: warp id | 
					
						
							| 
									
										
										
										
											2017-12-24 13:46:34 -05:00
										 |  |  | ;\2: object_event id | 
					
						
							| 
									
										
										
										
											2017-12-14 00:36:24 -05:00
										 |  |  | ;\3: script pointer | 
					
						
							| 
									
										
										
										
											2018-01-13 00:47:38 -05:00
										 |  |  | 	dbbw \1, \2, \3 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:31:16 +01:00
										 |  |  | ENDM |