Merge pull request #443 from xCrystal/master

Misc style cleanup and documentation
This commit is contained in:
yenatch 2017-12-28 19:34:43 -05:00 committed by GitHub
commit 82a05a1752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
156 changed files with 2060 additions and 1926 deletions

View File

@ -57,7 +57,7 @@ const_value = 1
deco: MACRO deco: MACRO
const DECO_\1 const DECO_\1
enum DECOFLAG_\1 enum DECOFLAG_\1
endm ENDM
; decorations: ; decorations:
; - DecorationAttributes (see data/decorations/attributes.asm) ; - DecorationAttributes (see data/decorations/attributes.asm)

View File

@ -16,14 +16,14 @@
const ENGINE_DST const ENGINE_DST
; wUnusedTwoDayTimerOn ; wUnusedTwoDayTimerOn
const ENGINE_0A const ENGINE_0A
; StatusFlags ; wStatusFlags
const ENGINE_POKEDEX const ENGINE_POKEDEX
const ENGINE_UNOWN_DEX const ENGINE_UNOWN_DEX
const ENGINE_POKERUS const ENGINE_POKERUS
const ENGINE_ROCKET_SIGNAL_ON_CH20 const ENGINE_ROCKET_SIGNAL_ON_CH20
const ENGINE_CREDITS_SKIP const ENGINE_CREDITS_SKIP
const ENGINE_BUG_CONTEST_ON ; 10 const ENGINE_BUG_CONTEST_ON ; 10
; StatusFlags2 ; wStatusFlags2
const ENGINE_BUG_CONTEST_TIMER const ENGINE_BUG_CONTEST_TIMER
const ENGINE_SAFARI_ZONE const ENGINE_SAFARI_ZONE
const ENGINE_ROCKETS_IN_RADIO_TOWER const ENGINE_ROCKETS_IN_RADIO_TOWER
@ -31,11 +31,11 @@
const ENGINE_GIVE_POKERUS const ENGINE_GIVE_POKERUS
const ENGINE_FLORIA const ENGINE_FLORIA
const ENGINE_ROCKETS_IN_MAHOGANY const ENGINE_ROCKETS_IN_MAHOGANY
; BikeFlags ; wBikeFlags
const ENGINE_STRENGTH_ACTIVE const ENGINE_STRENGTH_ACTIVE
const ENGINE_ALWAYS_ON_BIKE const ENGINE_ALWAYS_ON_BIKE
const ENGINE_DOWNHILL const ENGINE_DOWNHILL
; JohtoBadges ; wJohtoBadges
const ENGINE_ZEPHYRBADGE const ENGINE_ZEPHYRBADGE
const ENGINE_HIVEBADGE const ENGINE_HIVEBADGE
const ENGINE_PLAINBADGE const ENGINE_PLAINBADGE
@ -44,7 +44,7 @@
const ENGINE_STORMBADGE ; 20 const ENGINE_STORMBADGE ; 20
const ENGINE_GLACIERBADGE const ENGINE_GLACIERBADGE
const ENGINE_RISINGBADGE const ENGINE_RISINGBADGE
; KantoBadges ; wKantoBadges
const ENGINE_BOULDERBADGE const ENGINE_BOULDERBADGE
const ENGINE_CASCADEBADGE const ENGINE_CASCADEBADGE
const ENGINE_THUNDERBADGE const ENGINE_THUNDERBADGE
@ -53,7 +53,7 @@
const ENGINE_MARSHBADGE const ENGINE_MARSHBADGE
const ENGINE_VOLCANOBADGE const ENGINE_VOLCANOBADGE
const ENGINE_EARTHBADGE const ENGINE_EARTHBADGE
; UnlockedUnowns ; wUnlockedUnowns
const ENGINE_UNLOCKED_UNOWNS_1 const ENGINE_UNLOCKED_UNOWNS_1
const ENGINE_UNLOCKED_UNOWNS_2 const ENGINE_UNLOCKED_UNOWNS_2
const ENGINE_UNLOCKED_UNOWNS_3 const ENGINE_UNLOCKED_UNOWNS_3
@ -62,7 +62,7 @@
const ENGINE_UNLOCKED_UNOWNS_6 ; 30 const ENGINE_UNLOCKED_UNOWNS_6 ; 30
const ENGINE_UNLOCKED_UNOWNS_7 const ENGINE_UNLOCKED_UNOWNS_7
const ENGINE_UNLOCKED_UNOWNS_8 const ENGINE_UNLOCKED_UNOWNS_8
; VisitedSpawns ; wVisitedSpawns
const ENGINE_FLYPOINT_KRISS_HOUSE const ENGINE_FLYPOINT_KRISS_HOUSE
const ENGINE_FLYPOINT_VIRIDIAN_POKECENTER const ENGINE_FLYPOINT_VIRIDIAN_POKECENTER
const ENGINE_FLYPOINT_PALLET const ENGINE_FLYPOINT_PALLET
@ -92,9 +92,9 @@
const ENGINE_FLYPOINT_UNUSED const ENGINE_FLYPOINT_UNUSED
; wLuckyNumberShowFlag ; wLuckyNumberShowFlag
const ENGINE_LUCKY_NUMBER_SHOW const ENGINE_LUCKY_NUMBER_SHOW
; StatusFlags2 ; wStatusFlags2
const ENGINE_4F const ENGINE_4F
; DailyFlags ; wDailyFlags
const ENGINE_KURT_MAKING_BALLS ; 50 const ENGINE_KURT_MAKING_BALLS ; 50
const ENGINE_DAILY_BUG_CONTEST const ENGINE_DAILY_BUG_CONTEST
const ENGINE_SPECIAL_WILDDATA const ENGINE_SPECIAL_WILDDATA
@ -103,7 +103,7 @@
const ENGINE_SHUCKLE_GIVEN const ENGINE_SHUCKLE_GIVEN
const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
; WeeklyFlags ; wWeeklyFlags
const ENGINE_MT_MOON_SQUARE_CLEFAIRY const ENGINE_MT_MOON_SQUARE_CLEFAIRY
const ENGINE_UNION_CAVE_LAPRAS const ENGINE_UNION_CAVE_LAPRAS
const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
@ -112,12 +112,12 @@
const ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT const ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
const ENGINE_DAILY_MOVE_TUTOR const ENGINE_DAILY_MOVE_TUTOR
const ENGINE_BUENAS_PASSWORD const ENGINE_BUENAS_PASSWORD
; SwarmFlags ; wSwarmFlags
const ENGINE_BUENAS_PASSWORD_2 ; 60 const ENGINE_BUENAS_PASSWORD_2 ; 60
const ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON const ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
; GameTimerPause ; wGameTimerPause
const ENGINE_62 const ENGINE_62
; PlayerGender ; wPlayerGender
const ENGINE_PLAYER_IS_FEMALE const ENGINE_PLAYER_IS_FEMALE
; wCelebiEvent ; wCelebiEvent
const ENGINE_HAVE_EXAMINED_GS_BALL const ENGINE_HAVE_EXAMINED_GS_BALL
@ -184,7 +184,7 @@
const ENGINE_ERIN_SATURDAY_NIGHT const ENGINE_ERIN_SATURDAY_NIGHT
; wPlayerSpriteSetupFlags ; wPlayerSpriteSetupFlags
const ENGINE_KRIS_IN_CABLE_CLUB const ENGINE_KRIS_IN_CABLE_CLUB
; SwarmFlags ; wSwarmFlags
const ENGINE_DUNSPARCE_SWARM ; a0 const ENGINE_DUNSPARCE_SWARM ; a0
const ENGINE_YANMA_SWARM const ENGINE_YANMA_SWARM
NUM_ENGINE_FLAGS EQU const_value NUM_ENGINE_FLAGS EQU const_value

View File

@ -1,9 +1,9 @@
newgroup: macro newgroup: MACRO
const_value = const_value + 1 const_value = const_value + 1
enum_start 1 enum_start 1
endm ENDM
mapgroup: macro mapgroup: MACRO
;\1: map id ;\1: map id
;\2: height: in blocks ;\2: height: in blocks
;\3: width: in blocks ;\3: width: in blocks
@ -11,7 +11,7 @@ GROUP_\1 EQU const_value
enum MAP_\1 enum MAP_\1
\1_HEIGHT EQU \2 \1_HEIGHT EQU \2
\1_WIDTH EQU \3 \1_WIDTH EQU \3
endm ENDM
; map group ids ; map group ids
; `newgroup` indexes are for: ; `newgroup` indexes are for:

View File

@ -131,7 +131,7 @@ DAY_CARE_DEPOSIT EQU 3
const DEXMODE_ABC const DEXMODE_ABC
const DEXMODE_UNOWN const DEXMODE_UNOWN
; JohtoBadges: ; wJohtoBadges:
const_def const_def
const ZEPHYRBADGE const ZEPHYRBADGE
const HIVEBADGE const HIVEBADGE
@ -143,7 +143,7 @@ DAY_CARE_DEPOSIT EQU 3
const RISINGBADGE const RISINGBADGE
NUM_JOHTO_BADGES EQU const_value NUM_JOHTO_BADGES EQU const_value
; KantoBadges: ; wKantoBadges:
const_def const_def
const BOULDERBADGE const BOULDERBADGE
const CASCADEBADGE const CASCADEBADGE

View File

@ -14,7 +14,7 @@ battleanimobj: MACRO
db \4 ; callback db \4 ; callback
db \5 ; palette db \5 ; palette
db \6 ; tile offset db \6 ; tile offset
endm ENDM
BattleAnimObjects: ; ccb56 BattleAnimObjects: ; ccb56
; entries correspond to ANIM_OBJ_* constants ; entries correspond to ANIM_OBJ_* constants

View File

@ -2,7 +2,7 @@ emote: MACRO
; graphics pointer, length, starting tile ; graphics pointer, length, starting tile
dw \1 dw \1
db \2 tiles, BANK(\1) db \2 tiles, BANK(\1)
dw VTiles1 tile \3 dw vTiles1 tile \3
ENDM ENDM
Emotes: ; 144d Emotes: ; 144d

View File

@ -26,110 +26,110 @@ EngineFlags: ; 80462
engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer
engine_flag StatusFlags, 0 ; pokedex engine_flag wStatusFlags, 0 ; pokedex
engine_flag StatusFlags, 1 ; unown dex engine_flag wStatusFlags, 1 ; unown dex
engine_flag StatusFlags, 3 ; pokerus engine_flag wStatusFlags, 3 ; pokerus
engine_flag StatusFlags, 4 ; rocket signal on ch20 engine_flag wStatusFlags, 4 ; rocket signal on ch20
engine_flag StatusFlags, 6 ; credits skip engine_flag wStatusFlags, 6 ; credits skip
engine_flag StatusFlags, 7 ; bug contest on ; $10 engine_flag wStatusFlags, 7 ; bug contest on ; $10
engine_flag StatusFlags2, 2 ; bug contest timer engine_flag wStatusFlags2, 2 ; bug contest timer
engine_flag StatusFlags2, 1 ; safari zone? engine_flag wStatusFlags2, 1 ; safari zone?
engine_flag StatusFlags2, 0 ; rockets in radio tower engine_flag wStatusFlags2, 0 ; rockets in radio tower
engine_flag StatusFlags2, 4 ; bike shop call enabled (1024 bike steps reqd) engine_flag wStatusFlags2, 4 ; bike shop call enabled (1024 bike steps reqd)
engine_flag StatusFlags2, 5 ; give pokerus engine_flag wStatusFlags2, 5 ; give pokerus
engine_flag StatusFlags2, 6 ; berry -> berry juice when trading? engine_flag wStatusFlags2, 6 ; berry -> berry juice when trading?
engine_flag StatusFlags2, 7 ; rockets in mahogany engine_flag wStatusFlags2, 7 ; rockets in mahogany
engine_flag BikeFlags, 0 ; strength active ; $18 engine_flag wBikeFlags, 0 ; strength active ; $18
engine_flag BikeFlags, 1 ; always on bike (cant surf) engine_flag wBikeFlags, 1 ; always on bike (cant surf)
engine_flag BikeFlags, 2 ; downhill (cycling road) engine_flag wBikeFlags, 2 ; downhill (cycling road)
engine_flag JohtoBadges, 0 ; zephyrbadge engine_flag wJohtoBadges, 0 ; zephyrbadge
engine_flag JohtoBadges, 1 ; hivebadge engine_flag wJohtoBadges, 1 ; hivebadge
engine_flag JohtoBadges, 2 ; plainbadge engine_flag wJohtoBadges, 2 ; plainbadge
engine_flag JohtoBadges, 3 ; fogbadge engine_flag wJohtoBadges, 3 ; fogbadge
engine_flag JohtoBadges, 4 ; mineralbadge engine_flag wJohtoBadges, 4 ; mineralbadge
engine_flag JohtoBadges, 5 ; stormbadge ; $20 engine_flag wJohtoBadges, 5 ; stormbadge ; $20
engine_flag JohtoBadges, 6 ; glacierbadge engine_flag wJohtoBadges, 6 ; glacierbadge
engine_flag JohtoBadges, 7 ; risingbadge engine_flag wJohtoBadges, 7 ; risingbadge
engine_flag KantoBadges, 0 ; boulderbadge engine_flag wKantoBadges, 0 ; boulderbadge
engine_flag KantoBadges, 1 ; cascadebadge engine_flag wKantoBadges, 1 ; cascadebadge
engine_flag KantoBadges, 2 ; thunderbadge engine_flag wKantoBadges, 2 ; thunderbadge
engine_flag KantoBadges, 3 ; rainbowbadge engine_flag wKantoBadges, 3 ; rainbowbadge
engine_flag KantoBadges, 4 ; soulbadge engine_flag wKantoBadges, 4 ; soulbadge
engine_flag KantoBadges, 5 ; marshbadge ; $28 engine_flag wKantoBadges, 5 ; marshbadge ; $28
engine_flag KantoBadges, 6 ; volcanobadge engine_flag wKantoBadges, 6 ; volcanobadge
engine_flag KantoBadges, 7 ; earthbadge engine_flag wKantoBadges, 7 ; earthbadge
; unown sets ; unown sets
engine_flag UnlockedUnowns, 0 ; 1 engine_flag wUnlockedUnowns, 0 ; 1
engine_flag UnlockedUnowns, 1 ; 2 engine_flag wUnlockedUnowns, 1 ; 2
engine_flag UnlockedUnowns, 2 ; 3 engine_flag wUnlockedUnowns, 2 ; 3
engine_flag UnlockedUnowns, 3 ; 4 engine_flag wUnlockedUnowns, 3 ; 4
engine_flag UnlockedUnowns, 4 ; 5 engine_flag wUnlockedUnowns, 4 ; 5
engine_flag UnlockedUnowns, 5 ; 6 ; $30 engine_flag wUnlockedUnowns, 5 ; 6 ; $30
engine_flag UnlockedUnowns, 6 ; 7 engine_flag wUnlockedUnowns, 6 ; 7
engine_flag UnlockedUnowns, 7 ; 8 engine_flag wUnlockedUnowns, 7 ; 8
; fly ; fly
engine_flag VisitedSpawns, 0 ; your house engine_flag wVisitedSpawns, 0 ; your house
engine_flag VisitedSpawns, 1 ; viridian pokecenter engine_flag wVisitedSpawns, 1 ; viridian pokecenter
engine_flag VisitedSpawns, 2 ; pallet engine_flag wVisitedSpawns, 2 ; pallet
engine_flag VisitedSpawns, 3 ; viridian engine_flag wVisitedSpawns, 3 ; viridian
engine_flag VisitedSpawns, 4 ; pewter engine_flag wVisitedSpawns, 4 ; pewter
engine_flag VisitedSpawns, 5 ; cerulean ; $38 engine_flag wVisitedSpawns, 5 ; cerulean ; $38
engine_flag VisitedSpawns, 6 ; rock tunnel engine_flag wVisitedSpawns, 6 ; rock tunnel
engine_flag VisitedSpawns, 7 ; vermilion engine_flag wVisitedSpawns, 7 ; vermilion
engine_flag VisitedSpawns + 1, 0 ; lavender engine_flag wVisitedSpawns + 1, 0 ; lavender
engine_flag VisitedSpawns + 1, 1 ; saffron engine_flag wVisitedSpawns + 1, 1 ; saffron
engine_flag VisitedSpawns + 1, 2 ; celadon engine_flag wVisitedSpawns + 1, 2 ; celadon
engine_flag VisitedSpawns + 1, 3 ; fuchsia engine_flag wVisitedSpawns + 1, 3 ; fuchsia
engine_flag VisitedSpawns + 1, 4 ; cinnabar engine_flag wVisitedSpawns + 1, 4 ; cinnabar
engine_flag VisitedSpawns + 1, 5 ; indigo plateau ; $40 engine_flag wVisitedSpawns + 1, 5 ; indigo plateau ; $40
engine_flag VisitedSpawns + 1, 6 ; new bark engine_flag wVisitedSpawns + 1, 6 ; new bark
engine_flag VisitedSpawns + 1, 7 ; cherrygrove engine_flag wVisitedSpawns + 1, 7 ; cherrygrove
engine_flag VisitedSpawns + 2, 0 ; violet engine_flag wVisitedSpawns + 2, 0 ; violet
; union cave ; union cave
engine_flag VisitedSpawns + 2, 2 ; azalea engine_flag wVisitedSpawns + 2, 2 ; azalea
engine_flag VisitedSpawns + 2, 3 ; cianwood engine_flag wVisitedSpawns + 2, 3 ; cianwood
engine_flag VisitedSpawns + 2, 4 ; goldenrod engine_flag wVisitedSpawns + 2, 4 ; goldenrod
engine_flag VisitedSpawns + 2, 5 ; olivine engine_flag wVisitedSpawns + 2, 5 ; olivine
engine_flag VisitedSpawns + 2, 6 ; ecruteak ; $48 engine_flag wVisitedSpawns + 2, 6 ; ecruteak ; $48
engine_flag VisitedSpawns + 2, 7 ; mahogany engine_flag wVisitedSpawns + 2, 7 ; mahogany
engine_flag VisitedSpawns + 3, 0 ; lake of rage engine_flag wVisitedSpawns + 3, 0 ; lake of rage
engine_flag VisitedSpawns + 3, 1 ; blackthorn engine_flag wVisitedSpawns + 3, 1 ; blackthorn
engine_flag VisitedSpawns + 3, 2 ; silver cave engine_flag wVisitedSpawns + 3, 2 ; silver cave
; fast ship ; fast ship
engine_flag VisitedSpawns + 3, 4 ; unused engine_flag wVisitedSpawns + 3, 4 ; unused
engine_flag wLuckyNumberShowFlag, 0 ; lucky number show engine_flag wLuckyNumberShowFlag, 0 ; lucky number show
engine_flag StatusFlags2, 3 ; ???? engine_flag wStatusFlags2, 3 ; ????
engine_flag DailyFlags, 0 ; kurt making balls ; $50 engine_flag wDailyFlags, 0 ; kurt making balls ; $50
engine_flag DailyFlags, 1 ; ???? engine_flag wDailyFlags, 1 ; ????
engine_flag DailyFlags, 2 ; special wilddata? engine_flag wDailyFlags, 2 ; special wilddata?
engine_flag DailyFlags, 3 ; time capsule (24h wait) engine_flag wDailyFlags, 3 ; time capsule (24h wait)
engine_flag DailyFlags, 4 ; all fruit trees engine_flag wDailyFlags, 4 ; all fruit trees
engine_flag DailyFlags, 5 ; shuckle given engine_flag wDailyFlags, 5 ; shuckle given
engine_flag DailyFlags, 6 ; goldenrod underground merchant closed engine_flag wDailyFlags, 6 ; goldenrod underground merchant closed
engine_flag DailyFlags, 7 ; fought in trainer hall today engine_flag wDailyFlags, 7 ; fought in trainer hall today
engine_flag WeeklyFlags, 0 ; mt moon square clefairy ; $58 engine_flag wWeeklyFlags, 0 ; mt moon square clefairy ; $58
engine_flag WeeklyFlags, 1 ; union cave lapras engine_flag wWeeklyFlags, 1 ; union cave lapras
engine_flag WeeklyFlags, 2 ; goldenrod underground haircut used engine_flag wWeeklyFlags, 2 ; goldenrod underground haircut used
engine_flag WeeklyFlags, 3 ; goldenrod mall happiness event floor05 object07 engine_flag wWeeklyFlags, 3 ; goldenrod mall happiness event floor05 object07
engine_flag WeeklyFlags, 4 ; tea in blues house engine_flag wWeeklyFlags, 4 ; tea in blues house
engine_flag WeeklyFlags, 5 ; indigo plateau rival fight engine_flag wWeeklyFlags, 5 ; indigo plateau rival fight
engine_flag WeeklyFlags, 6 ; move tutor engine_flag wWeeklyFlags, 6 ; move tutor
engine_flag WeeklyFlags, 7 ; buenas password engine_flag wWeeklyFlags, 7 ; buenas password
engine_flag SwarmFlags, 0 ; buenas password 2 engine_flag wSwarmFlags, 0 ; buenas password 2
engine_flag SwarmFlags, 1 ; goldenrod dept store sale is on engine_flag wSwarmFlags, 1 ; goldenrod dept store sale is on
engine_flag GameTimerPause, 7 ; $62 engine_flag wGameTimerPause, 7 ; $62
engine_flag PlayerGender, 0 ; player is female engine_flag wPlayerGender, 0 ; player is female
engine_flag wCelebiEvent, 2 ; have gs ball after kurt examined it engine_flag wCelebiEvent, 2 ; have gs ball after kurt examined it
@ -200,7 +200,7 @@ EngineFlags: ; 80462
engine_flag wPlayerSpriteSetupFlags, 2 ; female player has been transformed into male engine_flag wPlayerSpriteSetupFlags, 2 ; female player has been transformed into male
engine_flag SwarmFlags, 2 ; dunsparce swarm ; $a0 engine_flag wSwarmFlags, 2 ; dunsparce swarm ; $a0
engine_flag SwarmFlags, 3 ; yanma swarm engine_flag wSwarmFlags, 3 ; yanma swarm
; 80648 ; 80648

View File

@ -1,4 +1,4 @@
momitem: macro momitem: MACRO
; money to trigger, cost, kind, item ; money to trigger, cost, kind, item
dt \1 dt \1
dt \2 dt \2

View File

@ -1,7 +1,7 @@
sprite_movement_data: macro sprite_movement_data: MACRO
db \1, \2, \3, \4, \5 db \1, \2, \3, \4, \5
dn \6, 0 dn \6, 0
endm ENDM
SpriteMovementData:: ; 4273 SpriteMovementData:: ; 4273
; entries correspond to SPRITEMOVEDATA_* constants ; entries correspond to SPRITEMOVEDATA_* constants

View File

@ -1,7 +1,7 @@
prob: macro prob: MACRO
prob_total = prob_total + (\1) prob_total = prob_total + (\1)
dw prob_total * $ffff / 100 dw prob_total * $ffff / 100
endm ENDM
OddEggProbabilities: OddEggProbabilities:
prob_total = 0 prob_total = 0

View File

@ -6,13 +6,13 @@
const PAL_TOWNMAP_POI ; 4 const PAL_TOWNMAP_POI ; 4
const PAL_TOWNMAP_POI_MTN ; 5 const PAL_TOWNMAP_POI_MTN ; 5
townmappals: macro townmappals: MACRO
rept _NARG / 2 rept _NARG / 2
dn PAL_TOWNMAP_\2, PAL_TOWNMAP_\1 dn PAL_TOWNMAP_\2, PAL_TOWNMAP_\1
shift shift
shift shift
endr endr
endm ENDM
; gfx/pokegear/town_map.png ; gfx/pokegear/town_map.png
townmappals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN townmappals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN

View File

@ -1,4 +1,4 @@
phone: macro phone: MACRO
; trainer class, trainer id, map, ?, script 1, ?, script 2 ; trainer class, trainer id, map, ?, script 1, ?, script 2
db \1, \2 db \1, \2
map \3 map \3
@ -6,7 +6,7 @@ phone: macro
dba \5 dba \5
db \6 db \6
dba \7 dba \7
endm ENDM
PhoneContacts: ; 9045f PhoneContacts: ; 9045f
; entries correspond to PHONE_* constants ; entries correspond to PHONE_* constants

View File

@ -1,9 +1,9 @@
specialcall: macro specialcall: MACRO
; condition, contact, script ; condition, contact, script
dw \1 dw \1
db \2 db \2
dba \3 dba \3
endm ENDM
SpecialPhoneCallList: ; 90627 SpecialPhoneCallList: ; 90627
; entries correspond to SPECIALCALL_* constants ; entries correspond to SPECIALCALL_* constants

View File

@ -1,11 +1,11 @@
unownword: macro unownword: MACRO
x = 1 x = 1
rept STRLEN(\1) rept STRLEN(\1)
db STRSUB(\1, x, 1) - $40 db STRSUB(\1, x, 1) - $40
x = x + 1 x = x + 1
endr endr
db -1 db -1
endm ENDM
UnownWords: ; fba5a UnownWords: ; fba5a
; entries correspond to Unown forms ; entries correspond to Unown forms

View File

@ -1,7 +1,7 @@
; Maps that roaming monsters can be on, and possible maps they can jump to. ; Maps that roaming monsters can be on, and possible maps they can jump to.
; Notably missing are Route 40 and Route 41, which are water routes. ; Notably missing are Route 40 and Route 41, which are water routes.
roam_map: macro roam_map: MACRO
; map, # of other maps, other maps ; map, # of other maps, other maps
map \1 map \1
db \2 db \2
@ -10,7 +10,7 @@ rept \2
shift shift
endr endr
db 0 db 0
endm ENDM
RoamMaps: ; 2a40f RoamMaps: ; 2a40f
roam_map ROUTE_29, 2, ROUTE_30, ROUTE_46 roam_map ROUTE_29, 2, ROUTE_30, ROUTE_46

View File

@ -1,7 +1,7 @@
treemon_map: macro treemon_map: MACRO
map \1 map \1
db \2 ; treemon set db \2 ; treemon set
endm ENDM
TreeMonMaps: ; b825e TreeMonMaps: ; b825e
treemon_map ROUTE_26, 4 treemon_map ROUTE_26, 4

View File

@ -92,7 +92,7 @@ LoadTrainerBattlePokeballTiles:
; Load the tiles used in the Pokeball Graphic that fills the screen ; Load the tiles used in the Pokeball Graphic that fills the screen
; at the start of every Trainer battle. ; at the start of every Trainer battle.
ld de, TrainerBattlePokeballTiles ld de, TrainerBattlePokeballTiles
ld hl, VTiles1 tile $7e ld hl, vTiles1 tile $7e
ld b, BANK(TrainerBattlePokeballTiles) ld b, BANK(TrainerBattlePokeballTiles)
ld c, 2 ld c, 2
call Request2bpp call Request2bpp
@ -103,7 +103,7 @@ LoadTrainerBattlePokeballTiles:
ld [rVBK], a ld [rVBK], a
ld de, TrainerBattlePokeballTiles ld de, TrainerBattlePokeballTiles
ld hl, VTiles4 tile $7e ld hl, vTiles4 tile $7e
ld b, BANK(TrainerBattlePokeballTiles) ld b, BANK(TrainerBattlePokeballTiles)
ld c, 2 ld c, 2
call Request2bpp call Request2bpp
@ -828,11 +828,11 @@ StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
; 8c792 (23:4792) ; 8c792 (23:4792)
.boxes ; 8c792 .boxes ; 8c792
zoombox: macro zoombox: MACRO
; width, height, start y, start x ; width, height, start y, start x
db \1, \2 db \1, \2
dwcoord \3, \4 dwcoord \3, \4
endm ENDM
zoombox 4, 2, 8, 8 zoombox 4, 2, 8, 8
zoombox 6, 4, 7, 7 zoombox 6, 4, 7, 7
zoombox 8, 6, 6, 6 zoombox 8, 6, 6, 6

View File

@ -5309,13 +5309,13 @@ BattleMenuPKMN_Loop:
Battle_StatsScreen: ; 3e308 Battle_StatsScreen: ; 3e308
call DisableLCD call DisableLCD
ld hl, VTiles2 tile $31 ld hl, vTiles2 tile $31
ld de, VTiles0 ld de, vTiles0
ld bc, $11 tiles ld bc, $11 tiles
call CopyBytes call CopyBytes
ld hl, VTiles2 ld hl, vTiles2
ld de, VTiles0 tile $11 ld de, vTiles0 tile $11
ld bc, $31 tiles ld bc, $31 tiles
call CopyBytes call CopyBytes
@ -5330,13 +5330,13 @@ Battle_StatsScreen: ; 3e308
call DisableLCD call DisableLCD
ld hl, VTiles0 ld hl, vTiles0
ld de, VTiles2 tile $31 ld de, vTiles2 tile $31
ld bc, $11 tiles ld bc, $11 tiles
call CopyBytes call CopyBytes
ld hl, VTiles0 tile $11 ld hl, vTiles0 tile $11
ld de, VTiles2 ld de, vTiles2
ld bc, $31 tiles ld bc, $31 tiles
call CopyBytes call CopyBytes
@ -6371,8 +6371,14 @@ LoadEnemyMon: ; 3e8eb
jr c, .GenerateDVs ; try again jr c, .GenerateDVs ; try again
.Magikarp: .Magikarp:
; Skimming this part recommended ; These filters are untranslated.
; They expect at wMagikarpLength a 2-byte value in mm,
; but the value is in feet and inches (one byte each).
; The first filter is supposed to make very large Magikarp even rarer,
; by targeting those 1600 mm or larger.
; After the conversion to feet, it is unable to target any,
; as the largest possible Magikarp is 5'3'', which reads as 1283.
ld a, [TempEnemyMonSpecies] ld a, [TempEnemyMonSpecies]
cp MAGIKARP cp MAGIKARP
jr nz, .Happiness jr nz, .Happiness
@ -6382,27 +6388,27 @@ LoadEnemyMon: ; 3e8eb
ld bc, PlayerID ld bc, PlayerID
callfar CalcMagikarpLength callfar CalcMagikarpLength
; We're clear if the length is < 1536 ; No reason to keep going if length > 1536 (i.e. if length / 256 != 6)
ld a, [wMagikarpLength] ld a, [wMagikarpLength]
cp HIGH(1536) cp HIGH(1536) ; this compares to 6'0'', should be cp 5
jr nz, .CheckMagikarpArea jr nz, .CheckMagikarpArea
; 5% chance of skipping both size checks ; 5% chance of skipping both size checks
call Random call Random
cp 5 percent cp 5 percent
jr c, .CheckMagikarpArea jr c, .CheckMagikarpArea
; Try again if > 1614 ; Try again if length > 1615
ld a, [wMagikarpLength + 1] ld a, [wMagikarpLength + 1]
cp LOW(1614) + 2 cp LOW(1616) ; this compares to 6'80'', should be cp 3
jr nc, .GenerateDVs jr nc, .GenerateDVs
; 20% chance of skipping this check ; 20% chance of skipping this check
call Random call Random
cp 20 percent - 1 cp 20 percent - 1
jr c, .CheckMagikarpArea jr c, .CheckMagikarpArea
; Try again if > 1598 ; Try again if length > 1599
ld a, [wMagikarpLength + 1] ld a, [wMagikarpLength + 1]
cp LOW(1598) + 2 cp LOW(1600) ; this compares to 6'64'', should be cp 2
jr nc, .GenerateDVs jr nc, .GenerateDVs
.CheckMagikarpArea: .CheckMagikarpArea:
@ -6415,6 +6421,9 @@ LoadEnemyMon: ; 3e8eb
; Intended behavior enforces a minimum size at Lake of Rage ; Intended behavior enforces a minimum size at Lake of Rage
; The real behavior prevents size flooring in the Lake of Rage area ; The real behavior prevents size flooring in the Lake of Rage area
; Moreover, due to the check not being translated to feet, all Magikarp
; smaller than 4'0'' may be caught by the filter, a lot more than intended
ld a, [MapGroup] ld a, [MapGroup]
cp GROUP_LAKE_OF_RAGE cp GROUP_LAKE_OF_RAGE
jr z, .Happiness jr z, .Happiness
@ -6427,7 +6436,7 @@ LoadEnemyMon: ; 3e8eb
jr c, .Happiness jr c, .Happiness
; Floor at length 1024 ; Floor at length 1024
ld a, [wMagikarpLength] ld a, [wMagikarpLength]
cp HIGH(1024) cp HIGH(1024) ; compares to 4'0'', cp 3 would be closer to intended value
jr c, .GenerateDVs ; try again jr c, .GenerateDVs ; try again
; Finally done with DVs ; Finally done with DVs
@ -6695,7 +6704,7 @@ CheckSleepingTreeMon: ; 3eb38
CheckUnownLetter: ; 3eb75 CheckUnownLetter: ; 3eb75
; Return carry if the Unown letter hasn't been unlocked yet ; Return carry if the Unown letter hasn't been unlocked yet
ld a, [UnlockedUnowns] ld a, [wUnlockedUnowns]
ld c, a ld c, a
ld de, 0 ld de, 0
@ -6779,7 +6788,7 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8
call FinishBattleAnim call FinishBattleAnim
ld a, [OtherTrainerClass] ld a, [OtherTrainerClass]
ld [TrainerClass], a ld [TrainerClass], a
ld de, VTiles2 ld de, vTiles2
callfar GetTrainerPic callfar GetTrainerPic
hlcoord 19, 0 hlcoord 19, 0
ld c, 0 ld c, 0
@ -7074,7 +7083,7 @@ BadgeStatBoosts: ; 3ed45
and a and a
ret nz ret nz
ld a, [JohtoBadges] ld a, [wJohtoBadges]
; Swap badges 3 (PlainBadge) and 5 (MineralBadge). ; Swap badges 3 (PlainBadge) and 5 (MineralBadge).
ld d, a ld d, a
@ -7155,15 +7164,15 @@ _LoadHPBar: ; 3eda6
LoadHPExpBarGFX: ; unreferenced LoadHPExpBarGFX: ; unreferenced
ld de, EnemyHPBarBorderGFX ld de, EnemyHPBarBorderGFX
ld hl, VTiles2 tile $6c ld hl, vTiles2 tile $6c
lb bc, BANK(EnemyHPBarBorderGFX), 4 lb bc, BANK(EnemyHPBarBorderGFX), 4
call Get1bpp call Get1bpp
ld de, HPExpBarBorderGFX ld de, HPExpBarBorderGFX
ld hl, VTiles2 tile $73 ld hl, vTiles2 tile $73
lb bc, BANK(HPExpBarBorderGFX), 6 lb bc, BANK(HPExpBarBorderGFX), 6
call Get1bpp call Get1bpp
ld de, ExpBarGFX ld de, ExpBarGFX
ld hl, VTiles2 tile $55 ld hl, vTiles2 tile $55
lb bc, BANK(ExpBarGFX), 8 lb bc, BANK(ExpBarGFX), 8
jp Get2bpp jp Get2bpp
; 3edd1 ; 3edd1
@ -8286,7 +8295,7 @@ DropPlayerSub: ; 3f447
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld hl, BattleMonDVs ld hl, BattleMonDVs
predef GetUnownLetter predef GetUnownLetter
ld de, VTiles2 tile $31 ld de, vTiles2 tile $31
predef GetMonBackpic predef GetMonBackpic
pop af pop af
ld [CurPartySpecies], a ld [CurPartySpecies], a
@ -8325,7 +8334,7 @@ DropEnemySub: ; 3f486
call GetBaseData call GetBaseData
ld hl, EnemyMonDVs ld hl, EnemyMonDVs
predef GetUnownLetter predef GetUnownLetter
ld de, VTiles2 ld de, vTiles2
predef GetAnimatedFrontpicPredef predef GetAnimatedFrontpicPredef
pop af pop af
ld [CurPartySpecies], a ld [CurPartySpecies], a
@ -8382,7 +8391,7 @@ BattleIntro: ; 3f4dd
call DisableSpriteUpdates call DisableSpriteUpdates
farcall ClearBattleRAM farcall ClearBattleRAM
call InitEnemy call InitEnemy
call BackUpVBGMap2 call BackUpBGMap2
ld b, SCGB_BATTLE_GRAYSCALE ld b, SCGB_BATTLE_GRAYSCALE
call GetSGBLayout call GetSGBLayout
ld hl, rLCDC ld hl, rLCDC
@ -8428,13 +8437,13 @@ InitEnemy: ; 3f55e
jp InitEnemyWildmon ; wild jp InitEnemyWildmon ; wild
; 3f568 ; 3f568
BackUpVBGMap2: ; 3f568 BackUpBGMap2: ; 3f568
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $6 ; BANK(wDecompressScratch) ld a, $6 ; BANK(wDecompressScratch)
ld [rSVBK], a ld [rSVBK], a
ld hl, wDecompressScratch ld hl, wDecompressScratch
ld bc, $40 tiles ; VBGMap3 - VBGMap2 ld bc, $40 tiles ; vBGMap3 - vBGMap2
ld a, $2 ld a, $2
call ByteFill call ByteFill
ld a, [rVBK] ld a, [rVBK]
@ -8442,8 +8451,8 @@ BackUpVBGMap2: ; 3f568
ld a, $1 ld a, $1
ld [rVBK], a ld [rVBK], a
ld de, wDecompressScratch ld de, wDecompressScratch
hlbgcoord 0, 0 ; VBGMap2 hlbgcoord 0, 0 ; vBGMap2
lb bc, BANK(BackUpVBGMap2), $40 lb bc, BANK(BackUpBGMap2), $40
call Request2bpp call Request2bpp
pop af pop af
ld [rVBK], a ld [rVBK], a
@ -8467,7 +8476,7 @@ InitEnemyTrainer: ; 3f594
ld [OTPartyMon1Item], a ld [OTPartyMon1Item], a
.ok .ok
ld de, VTiles2 ld de, vTiles2
callfar GetTrainerPic callfar GetTrainerPic
xor a xor a
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
@ -8531,7 +8540,7 @@ InitEnemyWildmon: ; 3f607
ld a, [UnownLetter] ld a, [UnownLetter]
ld [wFirstUnownSeen], a ld [wFirstUnownSeen], a
.skip_unown .skip_unown
ld de, VTiles2 ld de, vTiles2
predef GetAnimatedFrontpicPredef predef GetAnimatedFrontpicPredef
xor a xor a
ld [TrainerClass], a ld [TrainerClass], a
@ -9336,7 +9345,7 @@ InitBattleDisplay: ; 3fb6c
; 3fbff ; 3fbff
GetTrainerBackpic: ; 3fbff GetTrainerBackpic: ; 3fbff
; Load the player character's backpic (6x6) into VRAM starting from VTiles2 tile $31. ; Load the player character's backpic (6x6) into VRAM starting from vTiles2 tile $31.
; Special exception for Dude. ; Special exception for Dude.
ld b, BANK(DudeBackpic) ld b, BANK(DudeBackpic)
@ -9349,7 +9358,7 @@ GetTrainerBackpic: ; 3fbff
ld a, [wPlayerSpriteSetupFlags] ld a, [wPlayerSpriteSetupFlags]
bit 2, a ; transformed to male bit 2, a ; transformed to male
jr nz, .Chris jr nz, .Chris
ld a, [PlayerGender] ld a, [wPlayerGender]
bit 0, a bit 0, a
jr z, .Chris jr z, .Chris
@ -9363,7 +9372,7 @@ GetTrainerBackpic: ; 3fbff
ld hl, ChrisBackpic ld hl, ChrisBackpic
.Decompress: .Decompress:
ld de, VTiles2 tile $31 ld de, vTiles2 tile $31
ld c, $31 ld c, $31
predef DecompressPredef predef DecompressPredef
ret ret
@ -9374,8 +9383,8 @@ CopyBackpic: ; 3fc30
push af push af
ld a, $6 ld a, $6
ld [rSVBK], a ld [rSVBK], a
ld hl, VTiles0 ld hl, vTiles0
ld de, VTiles2 tile $31 ld de, vTiles2 tile $31
ld a, [hROMBank] ld a, [hROMBank]
ld b, a ld b, a
ld c, $31 ld c, $31

View File

@ -726,7 +726,7 @@ BattleCommand_CheckObedience: ; 343db
.obeylevel .obeylevel
; The maximum obedience level is constrained by owned badges: ; The maximum obedience level is constrained by owned badges:
ld hl, JohtoBadges ld hl, wJohtoBadges
; risingbadge ; risingbadge
bit RISINGBADGE, [hl] bit RISINGBADGE, [hl]

View File

@ -176,9 +176,9 @@ DoBadgeTypeBoosts: ; fbe24
ld hl, .BadgeTypes ld hl, .BadgeTypes
ld a, [KantoBadges] ld a, [wKantoBadges]
ld b, a ld b, a
ld a, [JohtoBadges] ld a, [wJohtoBadges]
ld c, a ld c, a
.CheckBadge: .CheckBadge:

Some files were not shown because too many files have changed in this diff Show More