ref: 323ef81286c554d928520341fbc13ef21dc1ec79
parent: b2970e75f4d1a7a2bc7ac58a656ffd350a80cf0a
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Thu Feb 1 10:19:27 EST 2018
More comments and macros
--- a/constants/map_data_constants.asm
+++ b/constants/map_data_constants.asm
@@ -35,7 +35,7 @@
const PALETTE_MORN
const PALETTE_DARK
-; fish groups
+; FishGroups indexes (see data/wild/fish.asm)
const_def
const FISHGROUP_NONE
const FISHGROUP_SHORE
--- a/data/events/pokedex_ratings.asm
+++ b/data/events/pokedex_ratings.asm
@@ -1,24 +1,29 @@
+rating: MACRO
+; count, sfx, text
+ dbww \1, \2, \3
+ENDM
+
OakRatings: ; 0x2667f
; if you caught at most this many, play this sound, load this text
; (text is defined in engine/events/prof_oaks_pc.asm)
- dbww 9, SFX_DEX_FANFARE_LESS_THAN_20, OakRating01
- dbww 19, SFX_DEX_FANFARE_LESS_THAN_20, OakRating02
- dbww 34, SFX_DEX_FANFARE_20_49, OakRating03
- dbww 49, SFX_DEX_FANFARE_20_49, OakRating04
- dbww 64, SFX_DEX_FANFARE_50_79, OakRating05
- dbww 79, SFX_DEX_FANFARE_50_79, OakRating06
- dbww 94, SFX_DEX_FANFARE_80_109, OakRating07
- dbww 109, SFX_DEX_FANFARE_80_109, OakRating08
- dbww 124, SFX_CAUGHT_MON, OakRating09
- dbww 139, SFX_CAUGHT_MON, OakRating10
- dbww 154, SFX_DEX_FANFARE_140_169, OakRating11
- dbww 169, SFX_DEX_FANFARE_140_169, OakRating12
- dbww 184, SFX_DEX_FANFARE_170_199, OakRating13
- dbww 199, SFX_DEX_FANFARE_170_199, OakRating14
- dbww 214, SFX_DEX_FANFARE_200_229, OakRating15
- dbww 229, SFX_DEX_FANFARE_200_229, OakRating16
- dbww 239, SFX_DEX_FANFARE_230_PLUS, OakRating17
- dbww 248, SFX_DEX_FANFARE_230_PLUS, OakRating18
- dbww 255, SFX_DEX_FANFARE_230_PLUS, OakRating19
+ rating 9, SFX_DEX_FANFARE_LESS_THAN_20, OakRating01
+ rating 19, SFX_DEX_FANFARE_LESS_THAN_20, OakRating02
+ rating 34, SFX_DEX_FANFARE_20_49, OakRating03
+ rating 49, SFX_DEX_FANFARE_20_49, OakRating04
+ rating 64, SFX_DEX_FANFARE_50_79, OakRating05
+ rating 79, SFX_DEX_FANFARE_50_79, OakRating06
+ rating 94, SFX_DEX_FANFARE_80_109, OakRating07
+ rating 109, SFX_DEX_FANFARE_80_109, OakRating08
+ rating 124, SFX_CAUGHT_MON, OakRating09
+ rating 139, SFX_CAUGHT_MON, OakRating10
+ rating 154, SFX_DEX_FANFARE_140_169, OakRating11
+ rating 169, SFX_DEX_FANFARE_140_169, OakRating12
+ rating 184, SFX_DEX_FANFARE_170_199, OakRating13
+ rating 199, SFX_DEX_FANFARE_170_199, OakRating14
+ rating 214, SFX_DEX_FANFARE_200_229, OakRating15
+ rating 229, SFX_DEX_FANFARE_200_229, OakRating16
+ rating 239, SFX_DEX_FANFARE_230_PLUS, OakRating17
+ rating 248, SFX_DEX_FANFARE_230_PLUS, OakRating18
+ rating 255, SFX_DEX_FANFARE_230_PLUS, OakRating19
; 0x266de
\ No newline at end of file
--- a/data/wild/fish.asm
+++ b/data/wild/fish.asm
@@ -1,19 +1,25 @@
time_group EQUS "0," ; use the nth TimeFishGroups entry
+fishgroup: MACRO
+; chance, old rod, good rod, super rod
+ dbwww \1, \2, \3, \4
+ENDM
+
FishGroups: ; 92488
- dbwww 50 percent + 1, .Shore_Old, .Shore_Good, .Shore_Super
- dbwww 50 percent + 1, .Ocean_Old, .Ocean_Good, .Ocean_Super
- dbwww 50 percent + 1, .Lake_Old, .Lake_Good, .Lake_Super
- dbwww 50 percent + 1, .Pond_Old, .Pond_Good, .Pond_Super
- dbwww 50 percent + 1, .Dratini_Old, .Dratini_Good, .Dratini_Super
- dbwww 50 percent + 1, .Qwilfish_Swarm_Old, .Qwilfish_Swarm_Good, .Qwilfish_Swarm_Super
- dbwww 50 percent + 1, .Remoraid_Swarm_Old, .Remoraid_Swarm_Good, .Remoraid_Swarm_Super
- dbwww 50 percent + 1, .Gyarados_Old, .Gyarados_Good, .Gyarados_Super
- dbwww 50 percent + 1, .Dratini_2_Old, .Dratini_2_Good, .Dratini_2_Super
- dbwww 50 percent + 1, .WhirlIslands_Old, .WhirlIslands_Good, .WhirlIslands_Super
- dbwww 50 percent + 1, .Qwilfish_Old, .Qwilfish_Good, .Qwilfish_Super
- dbwww 50 percent + 1, .Remoraid_Old, .Remoraid_Good, .Remoraid_Super
- dbwww 50 percent + 1, .Qwilfish_NoSwarm_Old, .Qwilfish_NoSwarm_Good, .Qwilfish_NoSwarm_Super
+; entries correspond to FISHGROUP_* constants
+ fishgroup 50 percent + 1, .Shore_Old, .Shore_Good, .Shore_Super
+ fishgroup 50 percent + 1, .Ocean_Old, .Ocean_Good, .Ocean_Super
+ fishgroup 50 percent + 1, .Lake_Old, .Lake_Good, .Lake_Super
+ fishgroup 50 percent + 1, .Pond_Old, .Pond_Good, .Pond_Super
+ fishgroup 50 percent + 1, .Dratini_Old, .Dratini_Good, .Dratini_Super
+ fishgroup 50 percent + 1, .Qwilfish_Swarm_Old, .Qwilfish_Swarm_Good, .Qwilfish_Swarm_Super
+ fishgroup 50 percent + 1, .Remoraid_Swarm_Old, .Remoraid_Swarm_Good, .Remoraid_Swarm_Super
+ fishgroup 50 percent + 1, .Gyarados_Old, .Gyarados_Good, .Gyarados_Super
+ fishgroup 50 percent + 1, .Dratini_2_Old, .Dratini_2_Good, .Dratini_2_Super
+ fishgroup 50 percent + 1, .WhirlIslands_Old, .WhirlIslands_Good, .WhirlIslands_Super
+ fishgroup 50 percent + 1, .Qwilfish_Old, .Qwilfish_Good, .Qwilfish_Super
+ fishgroup 50 percent + 1, .Remoraid_Old, .Remoraid_Good, .Remoraid_Super
+ fishgroup 50 percent + 1, .Qwilfish_NoSwarm_Old, .Qwilfish_NoSwarm_Good, .Qwilfish_NoSwarm_Super
.Shore_Old: ; 924e3
db 70 percent + 1, MAGIKARP, 10
@@ -202,26 +208,26 @@
TimeFishGroups: ; 9266f
; day nite
- db CORSOLA, 20, STARYU, 20
- db CORSOLA, 40, STARYU, 40
- db SHELLDER, 20, SHELLDER, 20
- db SHELLDER, 40, SHELLDER, 40
- db GOLDEEN, 20, GOLDEEN, 20
- db GOLDEEN, 40, GOLDEEN, 40
- db POLIWAG, 20, POLIWAG, 20
- db POLIWAG, 40, POLIWAG, 40
- db DRATINI, 20, DRATINI, 20
- db DRATINI, 40, DRATINI, 40
- db QWILFISH, 20, QWILFISH, 20
- db QWILFISH, 40, QWILFISH, 40
- db REMORAID, 20, REMORAID, 20
- db REMORAID, 40, REMORAID, 40
- db GYARADOS, 20, GYARADOS, 20
- db GYARADOS, 40, GYARADOS, 40
- db DRATINI, 10, DRATINI, 10
- db DRATINI, 10, DRATINI, 10
- db HORSEA, 20, HORSEA, 20
- db HORSEA, 40, HORSEA, 40
- db TENTACOOL, 20, TENTACOOL, 20
- db TENTACOOL, 40, TENTACOOL, 40
+ db CORSOLA, 20, STARYU, 20 ; 0
+ db CORSOLA, 40, STARYU, 40 ; 1
+ db SHELLDER, 20, SHELLDER, 20 ; 2
+ db SHELLDER, 40, SHELLDER, 40 ; 3
+ db GOLDEEN, 20, GOLDEEN, 20 ; 4
+ db GOLDEEN, 40, GOLDEEN, 40 ; 5
+ db POLIWAG, 20, POLIWAG, 20 ; 6
+ db POLIWAG, 40, POLIWAG, 40 ; 7
+ db DRATINI, 20, DRATINI, 20 ; 8
+ db DRATINI, 40, DRATINI, 40 ; 9
+ db QWILFISH, 20, QWILFISH, 20 ; 10
+ db QWILFISH, 40, QWILFISH, 40 ; 11
+ db REMORAID, 20, REMORAID, 20 ; 12
+ db REMORAID, 40, REMORAID, 40 ; 13
+ db GYARADOS, 20, GYARADOS, 20 ; 14
+ db GYARADOS, 40, GYARADOS, 40 ; 15
+ db DRATINI, 10, DRATINI, 10 ; 16
+ db DRATINI, 10, DRATINI, 10 ; 17
+ db HORSEA, 20, HORSEA, 20 ; 18
+ db HORSEA, 40, HORSEA, 40 ; 19
+ db TENTACOOL, 20, TENTACOOL, 20 ; 20
+ db TENTACOOL, 40, TENTACOOL, 40 ; 21
; 926c7
--- a/macros/scripts/maps.asm
+++ b/macros/scripts/maps.asm
@@ -6,7 +6,8 @@
scene_script: MACRO
;\1: script pointer
- dw \1, 0
+ dw \1
+ dw 0 ; filler
ENDM
callback: MACRO
@@ -27,7 +28,7 @@
coord_event: MACRO
;\1: x: left to right, starts at 0
;\2: y: top to bottom, starts at 0
-;\3: scene id: controlled by setscene/setmapscene
+;\3: scene id: a SCENE_* constant; controlled by setscene/setmapscene
;\4: script pointer
db \3, \2, \1
db 0 ; filler