From 9e8f33d6059fd499ed2a70dcdee4e5f3ca2ba279 Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 22 Jan 2018 11:30:17 -0500 Subject: [PATCH] Cleaner roammon and treemon data --- constants/pokemon_data_constants.asm | 33 +++++------- constants/script_constants.asm | 76 ++++++++++++++++------------ data/wild/roammon_maps.asm | 40 +++++++-------- data/wild/treemon_maps.asm | 6 +-- data/wild/treemons.asm | 4 +- 5 files changed, 80 insertions(+), 79 deletions(-) diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index cc9e4407b..c95b27d6c 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -188,12 +188,23 @@ MONMENU_MENUOPTION EQU 1 NUM_MONMENU_ITEMS EQU 8 +; wild data + +NUM_GRASSMON EQU 7 ; data/wild/*_grass.asm table size +NUM_WATERMON EQU 3 ; data/wild/*_water.asm table size + +GRASS_WILDDATA_LENGTH EQU (NUM_GRASSMON * 2 + 1) * 3 + 2 +WATER_WILDDATA_LENGTH EQU (NUM_WATERMON * 2 + 1) * 1 + 2 + +NUM_ROAMMON_MAPS EQU 16 ; RoamMaps table size (see data/wild/roammon_maps.asm) + + ; treemon sets ; TreeMons indexes (see data/wild/treemons.asm) const_def const TREEMON_SET_CITY const TREEMON_SET_CANYON - const TREEMON_SET_AZALEA + const TREEMON_SET_TOWN const TREEMON_SET_ROUTE const TREEMON_SET_KANTO const TREEMON_SET_LAKE @@ -208,26 +219,6 @@ NUM_TREEMON_SETS EQU const_value const TREEMON_SCORE_RARE ; 2 -; wild data - -NUM_GRASSMON EQU 7 ; data/wild/*_grass.asm table size -NUM_WATERMON EQU 3 ; data/wild/*_water.asm table size - -GRASS_WILDDATA_LENGTH EQU (NUM_GRASSMON * 2 + 1) * 3 + 2 -WATER_WILDDATA_LENGTH EQU (NUM_WATERMON * 2 + 1) * 1 + 2 - -NUM_ROAMMON_MAPS EQU 16 ; RoamMaps table size (see data/wild/roammon_maps.asm) - - -; swarms - -SWARM_DUNSPARCE EQU 0 -SWARM_YANMA EQU 1 - -FISHSWARM_QWILFISH EQU 1 -FISHSWARM_REMORAID EQU 2 - - ; significant happiness values BASE_HAPPINESS EQU 70 FRIEND_BALL_HAPPINESS EQU 200 diff --git a/constants/script_constants.asm b/constants/script_constants.asm index fd5affce6..952837065 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -115,6 +115,40 @@ NUM_PLAYER_EVENTS EQU const_value const OBJECTTYPE_6 +; command queue members +CMDQUEUE_TYPE EQU 0 +CMDQUEUE_ADDR EQU 1 +CMDQUEUE_03 EQU 3 +CMDQUEUE_04 EQU 4 +CMDQUEUE_05 EQU 5 +CMDQUEUE_ENTRY_SIZE EQU 6 +CMDQUEUE_CAPACITY EQU 4 + +; command queue types +CMDQUEUE_STONETABLE EQU 2 + + +; elevfloor macro values +; ElevatorFloorNames indexes (see data/elevator_floors.asm) + const_def + const FLOOR_B4F + const FLOOR_B3F + const FLOOR_B2F + const FLOOR_B1F + const FLOOR_1F + const FLOOR_2F + const FLOOR_3F + const FLOOR_4F + const FLOOR_5F + const FLOOR_6F + const FLOOR_7F + const FLOOR_8F + const FLOOR_9F + const FLOOR_10F + const FLOOR_11F + const FLOOR_ROOF + + ; showemote arguments ; Emotes indexes (see data/sprites/emotes.asm) const_def @@ -132,7 +166,6 @@ NUM_PLAYER_EVENTS EQU const_value const EMOTE_GRASS_RUSTLE ; 11 EMOTE_MEM EQU -1 - ; fruittree arguments ; FruitTreeItems indexes (see data/items/fruit_trees.asm) const_value set 1 @@ -168,7 +201,6 @@ const_value set 1 const FRUITTREE_FUCHSIA_CITY ; 1e NUM_FRUIT_TREES EQU const_value +- 1 - ; describedecoration arguments ; DescribeDecoration.JumpTable indexes (see engine/decorations.asm) const_def @@ -178,40 +210,18 @@ NUM_FRUIT_TREES EQU const_value +- 1 const DECODESC_BIG_DOLL ; 3 const DECODESC_CONSOLE ; 4 - -; elevfloor macro values -; ElevatorFloorNames indexes (see data/elevator_floors.asm) +; swarm arguments +; StoreSwarmMapIndices arguments const_def - const FLOOR_B4F - const FLOOR_B3F - const FLOOR_B2F - const FLOOR_B1F - const FLOOR_1F - const FLOOR_2F - const FLOOR_3F - const FLOOR_4F - const FLOOR_5F - const FLOOR_6F - const FLOOR_7F - const FLOOR_8F - const FLOOR_9F - const FLOOR_10F - const FLOOR_11F - const FLOOR_ROOF + const SWARM_DUNSPARCE ; 0 + const SWARM_YANMA ; 1 -; command queue members -CMDQUEUE_TYPE EQU 0 -CMDQUEUE_ADDR EQU 1 -CMDQUEUE_03 EQU 3 -CMDQUEUE_04 EQU 4 -CMDQUEUE_05 EQU 5 -CMDQUEUE_ENTRY_SIZE EQU 6 -CMDQUEUE_CAPACITY EQU 4 - -; command queue types -CMDQUEUE_STONETABLE EQU 2 - +; Special_ActivateFishingSwarm writebyte arguments + const_def + const FISHSWARM_NONE ; 0 + const FISHSWARM_QWILFISH ; 1 + const FISHSWARM_REMORAID ; 2 ; SpecialGameboyCheck return values const_def diff --git a/data/wild/roammon_maps.asm b/data/wild/roammon_maps.asm index 07bb7a9d9..c94ebfce0 100644 --- a/data/wild/roammon_maps.asm +++ b/data/wild/roammon_maps.asm @@ -2,11 +2,10 @@ ; Notably missing are Route 40 and Route 41, which are water routes. roam_map: MACRO -; map, # of other maps, other maps map \1 - db \2 -rept \2 - map \3 + db _NARG - 1 +rept _NARG +- 1 + map \2 shift endr db 0 @@ -14,21 +13,22 @@ ENDM RoamMaps: ; 2a40f ; there are NUM_ROAMMON_MAPS entries - roam_map ROUTE_29, 2, ROUTE_30, ROUTE_46 - roam_map ROUTE_30, 2, ROUTE_29, ROUTE_31 - roam_map ROUTE_31, 3, ROUTE_30, ROUTE_32, ROUTE_36 - roam_map ROUTE_32, 3, ROUTE_36, ROUTE_31, ROUTE_33 - roam_map ROUTE_33, 2, ROUTE_32, ROUTE_34 - roam_map ROUTE_34, 2, ROUTE_33, ROUTE_35 - roam_map ROUTE_35, 2, ROUTE_34, ROUTE_36 - roam_map ROUTE_36, 4, ROUTE_35, ROUTE_31, ROUTE_32, ROUTE_37 - roam_map ROUTE_37, 3, ROUTE_36, ROUTE_38, ROUTE_42 - roam_map ROUTE_38, 3, ROUTE_37, ROUTE_39, ROUTE_42 - roam_map ROUTE_39, 1, ROUTE_38 - roam_map ROUTE_42, 4, ROUTE_43, ROUTE_44, ROUTE_37, ROUTE_38 - roam_map ROUTE_43, 2, ROUTE_42, ROUTE_44 - roam_map ROUTE_44, 3, ROUTE_42, ROUTE_43, ROUTE_45 - roam_map ROUTE_45, 2, ROUTE_44, ROUTE_46 - roam_map ROUTE_46, 2, ROUTE_45, ROUTE_29 + ; start map, ...other maps + roam_map ROUTE_29, ROUTE_30, ROUTE_46 + roam_map ROUTE_30, ROUTE_29, ROUTE_31 + roam_map ROUTE_31, ROUTE_30, ROUTE_32, ROUTE_36 + roam_map ROUTE_32, ROUTE_36, ROUTE_31, ROUTE_33 + roam_map ROUTE_33, ROUTE_32, ROUTE_34 + roam_map ROUTE_34, ROUTE_33, ROUTE_35 + roam_map ROUTE_35, ROUTE_34, ROUTE_36 + roam_map ROUTE_36, ROUTE_35, ROUTE_31, ROUTE_32, ROUTE_37 + roam_map ROUTE_37, ROUTE_36, ROUTE_38, ROUTE_42 + roam_map ROUTE_38, ROUTE_37, ROUTE_39, ROUTE_42 + roam_map ROUTE_39, ROUTE_38 + roam_map ROUTE_42, ROUTE_43, ROUTE_44, ROUTE_37, ROUTE_38 + roam_map ROUTE_43, ROUTE_42, ROUTE_44 + roam_map ROUTE_44, ROUTE_42, ROUTE_43, ROUTE_45 + roam_map ROUTE_45, ROUTE_44, ROUTE_46 + roam_map ROUTE_46, ROUTE_45, ROUTE_29 db -1 ; end ; 2a4a0 diff --git a/data/wild/treemon_maps.asm b/data/wild/treemon_maps.asm index 7860110ca..4e30a51a5 100644 --- a/data/wild/treemon_maps.asm +++ b/data/wild/treemon_maps.asm @@ -11,7 +11,7 @@ TreeMonMaps: ; b825e treemon_map ROUTE_30, TREEMON_SET_ROUTE treemon_map ROUTE_31, TREEMON_SET_ROUTE treemon_map ROUTE_32, TREEMON_SET_KANTO - treemon_map ROUTE_33, TREEMON_SET_AZALEA + treemon_map ROUTE_33, TREEMON_SET_TOWN treemon_map ROUTE_34, TREEMON_SET_ROUTE treemon_map ROUTE_35, TREEMON_SET_ROUTE treemon_map ROUTE_36, TREEMON_SET_ROUTE @@ -20,7 +20,7 @@ TreeMonMaps: ; b825e treemon_map ROUTE_39, TREEMON_SET_ROUTE treemon_map ROUTE_40, TREEMON_SET_CITY treemon_map ROUTE_41, TREEMON_SET_CITY - treemon_map ROUTE_42, TREEMON_SET_AZALEA + treemon_map ROUTE_42, TREEMON_SET_TOWN treemon_map ROUTE_43, TREEMON_SET_LAKE treemon_map ROUTE_44, TREEMON_SET_CANYON treemon_map ROUTE_45, TREEMON_SET_CANYON @@ -28,7 +28,7 @@ TreeMonMaps: ; b825e treemon_map NEW_BARK_TOWN, TREEMON_SET_CITY treemon_map CHERRYGROVE_CITY, TREEMON_SET_CITY treemon_map VIOLET_CITY, TREEMON_SET_CITY - treemon_map AZALEA_TOWN, TREEMON_SET_AZALEA + treemon_map AZALEA_TOWN, TREEMON_SET_TOWN treemon_map CIANWOOD_CITY, TREEMON_SET_CITY treemon_map GOLDENROD_CITY, TREEMON_SET_CITY treemon_map OLIVINE_CITY, TREEMON_SET_CITY diff --git a/data/wild/treemons.asm b/data/wild/treemons.asm index 21cef29ec..5a29d675c 100644 --- a/data/wild/treemons.asm +++ b/data/wild/treemons.asm @@ -2,7 +2,7 @@ TreeMons: ; b82e8 ; entries correspond to TREEMON_SET_* constants dw TreeMonSet_City dw TreeMonSet_Canyon - dw TreeMonSet_Azalea + dw TreeMonSet_Town dw TreeMonSet_Route dw TreeMonSet_Kanto dw TreeMonSet_Lake @@ -33,7 +33,7 @@ TreeMonSet_Canyon: ; b82fa db 5, AIPOM, 10 db -1 -TreeMonSet_Azalea: ; b8320 +TreeMonSet_Town: ; b8320 ; common db 50, SPEAROW, 10 db 15, EKANS, 10