More WRAM tidying

This commit is contained in:
PikalaxALT 2016-01-12 12:46:18 -05:00
parent 35f687b536
commit 2ed6c357af
42 changed files with 1309 additions and 1365 deletions

View File

@ -549,7 +549,7 @@ AIUpdateHUD: ; 38387
callba UpdateEnemyHUD callba UpdateEnemyHUD
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
ld hl, wc6e6 ld hl, wEnemyItemState
dec [hl] dec [hl]
scf scf
ret ret

View File

@ -982,7 +982,7 @@ AI_Smart_Whirlwind: ; 38a2a
push hl push hl
callab CheckPlayerMoveTypeMatchups callab CheckPlayerMoveTypeMatchups
ld a, [wc716] ld a, [wEnemyAISwitchScore]
cp 10 ; neutral cp 10 ; neutral
pop hl pop hl
ret c ret c
@ -1909,7 +1909,7 @@ AI_Smart_MeanLook: ; 38dfb
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy. ; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
push hl push hl
callab CheckPlayerMoveTypeMatchups callab CheckPlayerMoveTypeMatchups
ld a, [wc716] ld a, [wEnemyAISwitchScore]
cp $b ; not very effective cp $b ; not very effective
pop hl pop hl
ret nc ret nc
@ -2170,7 +2170,7 @@ AI_Smart_PerishSong: ; 38f4a
push hl push hl
callab CheckPlayerMoveTypeMatchups callab CheckPlayerMoveTypeMatchups
ld a, [wc716] ld a, [wEnemyAISwitchScore]
cp 10 ; 1.0 cp 10 ; 1.0
pop hl pop hl
ret c ret c
@ -2432,7 +2432,7 @@ AI_Smart_BatonPass: ; 39062
push hl push hl
callab CheckPlayerMoveTypeMatchups callab CheckPlayerMoveTypeMatchups
ld a, [wc716] ld a, [wEnemyAISwitchScore]
cp 10 ; neutral cp 10 ; neutral
pop hl pop hl
ret c ret c

View File

@ -6,7 +6,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
push de push de
push bc push bc
ld a, 10 ld a, 10
ld [wc716], a ld [wEnemyAISwitchScore], a
ld hl, PlayerUsedMoves ld hl, PlayerUsedMoves
ld a, [hl] ld a, [hl]
and a and a
@ -167,17 +167,17 @@ endr
.DecreaseScore: ; 34931 .DecreaseScore: ; 34931
ld a, [wc716] ld a, [wEnemyAISwitchScore]
dec a dec a
ld [wc716], a ld [wEnemyAISwitchScore], a
ret ret
; 34939 ; 34939
.IncreaseScore: ; 34939 .IncreaseScore: ; 34939
ld a, [wc716] ld a, [wEnemyAISwitchScore]
inc a inc a
ld [wc716], a ld [wEnemyAISwitchScore], a
ret ret
; 34941 ; 34941
@ -206,7 +206,7 @@ CheckAbleToSwitch: ; 34941
cp 2 cp 2
jr nz, .not_2 jr nz, .not_2
ld a, [wc716] ld a, [wEnemyAISwitchScore]
add $30 add $30
ld [wEnemySwitchMonParam], a ld [wEnemySwitchMonParam], a
ret ret
@ -230,7 +230,7 @@ CheckAbleToSwitch: ; 34941
.no_perish .no_perish
call CheckPlayerMoveTypeMatchups call CheckPlayerMoveTypeMatchups
ld a, [wc716] ld a, [wEnemyAISwitchScore]
cp 11 cp 11
ret nc ret nc
@ -239,13 +239,13 @@ CheckAbleToSwitch: ; 34941
jr z, .no_last_counter_move jr z, .no_last_counter_move
call Function34a2a call Function34a2a
ld a, [wc716] ld a, [wEnemyAISwitchScore]
and a and a
jr z, .no_last_counter_move jr z, .no_last_counter_move
ld c, a ld c, a
call Function34aa7 call Function34aa7
ld a, [wc716] ld a, [wEnemyAISwitchScore]
cp $ff cp $ff
ret z ret z
@ -255,7 +255,7 @@ CheckAbleToSwitch: ; 34941
jr z, .not_2_again jr z, .not_2_again
call CheckPlayerMoveTypeMatchups call CheckPlayerMoveTypeMatchups
ld a, [wc716] ld a, [wEnemyAISwitchScore]
cp 10 cp 10
ret nc ret nc
@ -267,7 +267,7 @@ CheckAbleToSwitch: ; 34941
.not_2_again .not_2_again
ld c, $10 ld c, $10
call CheckPlayerMoveTypeMatchups call CheckPlayerMoveTypeMatchups
ld a, [wc716] ld a, [wEnemyAISwitchScore]
cp 10 cp 10
jr nc, .okay jr nc, .okay
ld c, $20 ld c, $20
@ -280,7 +280,7 @@ CheckAbleToSwitch: ; 34941
.no_last_counter_move .no_last_counter_move
call CheckPlayerMoveTypeMatchups call CheckPlayerMoveTypeMatchups
ld a, [wc716] ld a, [wEnemyAISwitchScore]
cp 10 cp 10
ret nc ret nc
@ -293,7 +293,7 @@ CheckAbleToSwitch: ; 34941
cp $2 cp $2
ret nz ret nz
ld a, [wc716] ld a, [wEnemyAISwitchScore]
add $10 add $10
ld [wEnemySwitchMonParam], a ld [wEnemySwitchMonParam], a
ret ret
@ -359,7 +359,7 @@ Function34a2a: ; 34a2a
ld c, 1 << (PARTY_LENGTH - 1) ld c, 1 << (PARTY_LENGTH - 1)
ld d, 0 ld d, 0
xor a xor a
ld [wc716], a ld [wEnemyAISwitchScore], a
.asm_34a39 .asm_34a39
ld a, [CurOTMon] ld a, [CurOTMon]
@ -395,9 +395,9 @@ Function34a2a: ; 34a2a
and a and a
jr nz, .asm_34a77 jr nz, .asm_34a77
ld a, [wc716] ld a, [wEnemyAISwitchScore]
or c or c
ld [wc716], a ld [wEnemyAISwitchScore], a
.asm_34a77 .asm_34a77
pop hl pop hl
dec b dec b
@ -451,7 +451,7 @@ Function34a85: ; 34a85
Function34aa7: ; 34aa7 Function34aa7: ; 34aa7
ld a, $ff ld a, $ff
ld [wc716], a ld [wEnemyAISwitchScore], a
ld hl, OTPartyMon1Moves ld hl, OTPartyMon1Moves
ld b, 1 << (PARTY_LENGTH - 1) ld b, 1 << (PARTY_LENGTH - 1)
ld d, 0 ld d, 0
@ -540,7 +540,7 @@ Function34aa7: ; 34aa7
jr nc, .loop2 jr nc, .loop2
ld a, c ld a, c
ld [wc716], a ld [wEnemyAISwitchScore], a
pop bc pop bc
ret ret
; 34b20 ; 34b20

View File

@ -748,7 +748,7 @@ endr
jr z, .clear jr z, .clear
cp -3 cp -3
jr z, .skip jr z, .skip
call .FillBox call .PlaceGraphic
.skip .skip
call BattleBGEffects_IncrementJumptable call BattleBGEffects_IncrementJumptable
ld a, $1 ld a, $1
@ -798,7 +798,7 @@ endr
pop bc pop bc
ret ret
.FillBox .PlaceGraphic
; get dims ; get dims
push bc push bc
push hl push hl

View File

@ -3,7 +3,7 @@ BattleCore:
DoBattle: ; 3c000 DoBattle: ; 3c000
xor a xor a
ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsNotFainted], a
ld [wc6fc], a ld [wBattleParticipantsIncludingFainted], a
ld [wPlayerAction], a ld [wPlayerAction], a
ld [BattleEnded], a ld [BattleEnded], a
inc a inc a
@ -2110,8 +2110,8 @@ HandleEnemyMonFaint: ; 3cd55
or [hl] or [hl]
call z, FaintYourPokemon call z, FaintYourPokemon
xor a xor a
ld [wc6f7], a ld [wWhichMonFaintedFirst], a
call Function3ce01 call UpdateBattleStateAndExperienceAfterEnemyFaint
call CheckPlayerPartyForFitPkmn call CheckPlayerPartyForFitPkmn
ld a, d ld a, d
and a and a
@ -2202,7 +2202,7 @@ DoubleSwitch: ; 3cdca
ret ret
; 3ce01 ; 3ce01
Function3ce01: ; 3ce01 UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01
call UpdateBattleMonInParty call UpdateBattleMonInParty
ld a, [wBattleMode] ld a, [wBattleMode]
dec a dec a
@ -2231,14 +2231,14 @@ Function3ce01: ; 3ce01
.wild2 .wild2
call StopDangerSound call StopDangerSound
ld a, $1 ld a, $1
ld [wc6fd], a ld [wDanger], a
.trainer .trainer
ld hl, BattleMonHP ld hl, BattleMonHP
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr nz, .player_mon_did_not_faint jr nz, .player_mon_did_not_faint
ld a, [wc6f7] ld a, [wWhichMonFaintedFirst]
and a and a
jr nz, .player_mon_did_not_faint jr nz, .player_mon_did_not_faint
call PlayerMonFaintHappinessMod call PlayerMonFaintHappinessMod
@ -2256,10 +2256,10 @@ Function3ce01: ; 3ce01
ld a, [wBattleResult] ld a, [wBattleResult]
and $c0 and $c0
ld [wBattleResult], a ld [wBattleResult], a
call DoOthersShareExperience call IsAnyMonHoldingExpShare
jr z, .skip_exp jr z, .skip_exp
ld hl, EnemyMonBaseStats ld hl, EnemyMonBaseStats
ld b, $7 ld b, EnemyMonEnd - EnemyMonBaseStats
.loop .loop
srl [hl] srl [hl]
inc hl inc hl
@ -2268,32 +2268,32 @@ Function3ce01: ; 3ce01
.skip_exp .skip_exp
ld hl, EnemyMonBaseStats ld hl, EnemyMonBaseStats
ld de, wc720 ld de, wBackupEnemyMonBaseStats
ld bc, EnemyMonEnd - EnemyMonBaseStats ld bc, EnemyMonEnd - EnemyMonBaseStats
call CopyBytes call CopyBytes
xor a xor a
ld [wc71f], a ld [wGivingExperienceToExpShareHolders], a
call GiveExperiencePoints call GiveExperiencePoints
call DoOthersShareExperience call IsAnyMonHoldingExpShare
ret z ret z
ld a, [wBattleParticipantsNotFainted] ld a, [wBattleParticipantsNotFainted]
push af push af
ld a, d ld a, d
ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsNotFainted], a
ld hl, wc720 ld hl, wBackupEnemyMonBaseStats
ld de, EnemyMonBaseStats ld de, EnemyMonBaseStats
ld bc, EnemyMonEnd - EnemyMonBaseStats ld bc, EnemyMonEnd - EnemyMonBaseStats
call CopyBytes call CopyBytes
ld a, $1 ld a, $1
ld [wc71f], a ld [wGivingExperienceToExpShareHolders], a
call GiveExperiencePoints call GiveExperiencePoints
pop af pop af
ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsNotFainted], a
ret ret
; 3ceaa ; 3ceaa
DoOthersShareExperience: ; 3ceaa IsAnyMonHoldingExpShare: ; 3ceaa
ld a, [PartyCount] ld a, [PartyCount]
ld b, a ld b, a
ld hl, PartyMon1 ld hl, PartyMon1
@ -2465,7 +2465,7 @@ WinTrainerBattle: ; 3cfa4
; Player won the battle ; Player won the battle
call StopDangerSound call StopDangerSound
ld a, $1 ld a, $1
ld [wc6fd], a ld [wDanger], a
ld [BattleEnded], a ld [BattleEnded], a
ld a, [wLinkMode] ld a, [wLinkMode]
and a and a
@ -2682,7 +2682,7 @@ PlayVictoryMusic: ; 3d0ea
dec a dec a
jr nz, .trainer_victory jr nz, .trainer_victory
push de push de
call DoOthersShareExperience call IsAnyMonHoldingExpShare
pop de pop de
jr nz, .play_music jr nz, .play_music
ld hl, wPayDayMoney ld hl, wPayDayMoney
@ -2771,7 +2771,7 @@ HandlePlayerMonFaint: ; 3d14e
or [hl] or [hl]
call z, FaintEnemyPokemon call z, FaintEnemyPokemon
ld a, $1 ld a, $1
ld [wc6f7], a ld [wWhichMonFaintedFirst], a
call PlayerMonFaintHappinessMod call PlayerMonFaintHappinessMod
call CheckPlayerPartyForFitPkmn call CheckPlayerPartyForFitPkmn
ld a, d ld a, d
@ -2781,7 +2781,7 @@ HandlePlayerMonFaint: ; 3d14e
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr nz, .notfainted jr nz, .notfainted
call Function3ce01 call UpdateBattleStateAndExperienceAfterEnemyFaint
ld a, [wBattleMode] ld a, [wBattleMode]
dec a dec a
jr nz, .trainer jr nz, .trainer
@ -2847,7 +2847,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
and %11000000 and %11000000
add $1 add $1
ld [wBattleResult], a ld [wBattleResult], a
ld a, [wc6f7] ld a, [wWhichMonFaintedFirst]
and a and a
ret z ret z
ret ; ?????????? ret ; ??????????
@ -3338,7 +3338,7 @@ EnemySwitch: ; 3d4e1
; If we're here, then we're switching too ; If we're here, then we're switching too
xor a xor a
ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsNotFainted], a
ld [wc6fc], a ld [wBattleParticipantsIncludingFainted], a
ld [wPlayerAction], a ld [wPlayerAction], a
inc a inc a
ld [wEnemyIsSwitching], a ld [wEnemyIsSwitching], a
@ -3403,7 +3403,7 @@ ResetEnemyBattleVars: ; 3d557
ld [LastEnemyMove], a ld [LastEnemyMove], a
ld [CurEnemyMove], a ld [CurEnemyMove], a
dec a dec a
ld [wc6e6], a ld [wEnemyItemState], a
xor a xor a
ld [wPlayerWrapCount], a ld [wPlayerWrapCount], a
hlcoord 18, 0 hlcoord 18, 0
@ -3416,7 +3416,7 @@ ResetEnemyBattleVars: ; 3d557
ResetBattleParticipants: ; 3d57a ResetBattleParticipants: ; 3d57a
xor a xor a
ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsNotFainted], a
ld [wc6fc], a ld [wBattleParticipantsIncludingFainted], a
AddBattleParticipant: ; 3d581 AddBattleParticipant: ; 3d581
ld a, [CurBattleMon] ld a, [CurBattleMon]
ld c, a ld c, a
@ -3425,7 +3425,7 @@ AddBattleParticipant: ; 3d581
push bc push bc
predef FlagPredef predef FlagPredef
pop bc pop bc
ld hl, wc6fc ld hl, wBattleParticipantsIncludingFainted
predef_jump FlagPredef predef_jump FlagPredef
; 3d599 ; 3d599
@ -4250,7 +4250,7 @@ SendOutPlayerMon: ; 3db5f
ld [hBGMapMode], a ld [hBGMapMode], a
call GetMonBackpic call GetMonBackpic
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
ld [wd0d2], a ld [wd0d2], a
ld [CurMoveNum], a ld [CurMoveNum], a
ld [TypeModifier], a ld [TypeModifier], a
@ -4418,7 +4418,7 @@ PursuitSwitch: ; 3dc5b
ld [CryTracks], a ld [CryTracks], a
ld a, [BattleMonSpecies] ld a, [BattleMonSpecies]
call PlayStereoCry call PlayStereoCry
ld a, [wc71a] ld a, [LastPlayerMon]
ld c, a ld c, a
ld hl, wBattleParticipantsNotFainted ld hl, wBattleParticipantsNotFainted
ld b, RESET_FLAG ld b, RESET_FLAG
@ -4887,7 +4887,7 @@ CheckDanger: ; 3df9e
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr z, .no_danger jr z, .no_danger
ld a, [wc6fd] ld a, [wDanger]
and a and a
jr nz, .done jr nz, .done
ld a, [PlayerHPPal] ld a, [PlayerHPPal]
@ -5771,7 +5771,7 @@ MoveSelectionScreen: ; 3e4bc
dec a dec a
cp c cp c
jr z, .move_disabled jr z, .move_disabled
ld a, [wc6e1] ld a, [wUnusedPlayerLockedMove]
and a and a
jr nz, .skip2 jr nz, .skip2
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -7383,7 +7383,7 @@ GiveExperiencePoints: ; 3ee3b
bit 0, a bit 0, a
ret nz ret nz
call Function3f0d4 call .EvenlyDivideExpAmongParticipants
xor a xor a
ld [CurPartyMon], a ld [CurPartyMon], a
ld bc, PartyMon1Species ld bc, PartyMon1Species
@ -7407,6 +7407,7 @@ GiveExperiencePoints: ; 3ee3b
pop bc pop bc
jp z, .skip_stats jp z, .skip_stats
; give stat exp
ld hl, MON_STAT_EXP + 1 ld hl, MON_STAT_EXP + 1
add hl, bc add hl, bc
ld d, h ld d, h
@ -7472,6 +7473,7 @@ GiveExperiencePoints: ; 3ee3b
ld [hDivisor], a ld [hDivisor], a
ld b, 4 ld b, 4
call Divide call Divide
; Boost Experience for traded Pokemon
pop bc pop bc
ld hl, MON_ID ld hl, MON_ID
add hl, bc add hl, bc
@ -7489,10 +7491,12 @@ GiveExperiencePoints: ; 3ee3b
ld a, $1 ld a, $1
.no_boost .no_boost
; Boost experience for a Trainer Battle
ld [StringBuffer2 + 2], a ld [StringBuffer2 + 2], a
ld a, [wBattleMode] ld a, [wBattleMode]
dec a dec a
call nz, BoostExp call nz, BoostExp
; Boost experience for Lucky Egg
push bc push bc
ld a, MON_ITEM ld a, MON_ITEM
call GetPartyParamLocation call GetPartyParamLocation
@ -7513,7 +7517,7 @@ GiveExperiencePoints: ; 3ee3b
ld a, [StringBuffer2] ld a, [StringBuffer2]
ld [hQuotient + 1], a ld [hQuotient + 1], a
pop bc pop bc
call Function3f136 call AnimateExpBar
push bc push bc
call LoadTileMapToTempTileMap call LoadTileMapToTempTileMap
pop bc pop bc
@ -7748,26 +7752,26 @@ GiveExperiencePoints: ; 3ee3b
jp ResetBattleParticipants jp ResetBattleParticipants
; 3f0d4 ; 3f0d4
Function3f0d4: ; 3f0d4 .EvenlyDivideExpAmongParticipants
; count number of battle participants ; count number of battle participants
ld a, [wBattleParticipantsNotFainted] ld a, [wBattleParticipantsNotFainted]
ld b, a ld b, a
ld c, PARTY_LENGTH ld c, PARTY_LENGTH
ld d, 0 ld d, 0
.loop .count_loop
xor a xor a
srl b srl b
adc d adc d
ld d, a ld d, a
dec c dec c
jr nz, .loop jr nz, .count_loop
cp 2 cp 2
ret c ret c
ld [wd265], a ld [wd265], a
ld hl, EnemyMonBaseStats ld hl, EnemyMonBaseStats
ld c, EnemyMonEnd - EnemyMonBaseStats ld c, EnemyMonEnd - EnemyMonBaseStats
.loop2 .count_loop2
xor a xor a
ld [hDividend + 0], a ld [hDividend + 0], a
ld a, [hl] ld a, [hl]
@ -7779,7 +7783,7 @@ Function3f0d4: ; 3f0d4
ld a, [hQuotient + 2] ld a, [hQuotient + 2]
ld [hli], a ld [hli], a
dec c dec c
jr nz, .loop2 jr nz, .count_loop2
ret ret
; 3f106 ; 3f106
@ -7827,7 +7831,7 @@ TextJump_StringBuffer2ExpPoints: ; 3f131
; 3f136 ; 3f136
Function3f136: ; 3f136 AnimateExpBar: ; 3f136
push bc push bc
ld hl, CurPartyMon ld hl, CurPartyMon
@ -7864,15 +7868,15 @@ Function3f136: ; 3f136
ld a, [wd003] ld a, [wd003]
adc [hl] adc [hl]
ld [hld], a ld [hld], a
jr nc, .asm_3f186 jr nc, .NoOverflow
inc [hl] inc [hl]
jr nz, .asm_3f186 jr nz, .NoOverflow
ld a, $ff ld a, $ff
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
.asm_3f186 .NoOverflow
ld d, MAX_LEVEL ld d, MAX_LEVEL
callab CalcExpAtLevel callab CalcExpAtLevel
ld a, [hProduct + 1] ld a, [hProduct + 1]
@ -7888,7 +7892,7 @@ Function3f136: ; 3f136
sbc c sbc c
ld a, [hl] ld a, [hl]
sbc b sbc b
jr c, .asm_3f1a8 jr c, .AlreadyAtMaxExp
ld a, b ld a, b
ld [hli], a ld [hli], a
ld a, c ld a, c
@ -7896,37 +7900,37 @@ Function3f136: ; 3f136
ld a, d ld a, d
ld [hld], a ld [hld], a
.asm_3f1a8 .AlreadyAtMaxExp
callab CalcLevel callab CalcLevel
ld a, d ld a, d
pop bc pop bc
pop de pop de
ld d, a ld d, a
cp e cp e
jr nc, .asm_3f1b7 jr nc, .LoopLevels
ld a, e ld a, e
ld d, a ld d, a
.asm_3f1b7 .LoopLevels
ld a, e ld a, e
cp MAX_LEVEL cp MAX_LEVEL
jr nc, .asm_3f1ff jr nc, .FinishExpBar
cp d cp d
jr z, .asm_3f1ff jr z, .FinishExpBar
inc a inc a
ld [TempMonLevel], a ld [TempMonLevel], a
ld [CurPartyLevel], a ld [CurPartyLevel], a
ld [BattleMonLevel], a ld [BattleMonLevel], a
push de push de
call Function3f21b call .PlayExpBarSound
ld c, $40 ld c, $40
call Function3f22c call .LoopBarAnimation
call PrintPlayerHUD call PrintPlayerHUD
ld hl, BattleMonNick ld hl, BattleMonNick
ld de, StringBuffer1 ld de, StringBuffer1
ld bc, PKMN_NAME_LENGTH ld bc, PKMN_NAME_LENGTH
call CopyBytes call CopyBytes
call Function3dfe call TerminateExpBarSound
ld de, SFX_HIT_END_OF_EXP_BAR ld de, SFX_HIT_END_OF_EXP_BAR
call PlaySFX call PlaySFX
callba AnimateEndOfExpBar callba AnimateEndOfExpBar
@ -7936,9 +7940,9 @@ Function3f136: ; 3f136
pop de pop de
inc e inc e
ld b, $0 ld b, $0
jr .asm_3f1b7 jr .LoopLevels
.asm_3f1ff .FinishExpBar
push bc push bc
ld b, d ld b, d
ld de, TempMonExp + 2 ld de, TempMonExp + 2
@ -7946,9 +7950,9 @@ Function3f136: ; 3f136
ld a, b ld a, b
pop bc pop bc
ld c, a ld c, a
call Function3f21b call .PlayExpBarSound
call Function3f22c call .LoopBarAnimation
call Function3dfe call TerminateExpBarSound
pop af pop af
ld [hProduct + 2], a ld [hProduct + 2], a
pop af pop af
@ -7957,9 +7961,8 @@ Function3f136: ; 3f136
.finish .finish
pop bc pop bc
ret ret
; 3f21b
Function3f21b: ; 3f21b .PlayExpBarSound
push bc push bc
call WaitSFX call WaitSFX
ld de, SFX_EXP_BAR ld de, SFX_EXP_BAR
@ -7968,12 +7971,11 @@ Function3f21b: ; 3f21b
call DelayFrames call DelayFrames
pop bc pop bc
ret ret
; 3f22c
Function3f22c: ; 3f22c .LoopBarAnimation
ld d, $3 ld d, 3
dec b dec b
.asm_3f22f .anim_loop
inc b inc b
push bc push bc
push de push de
@ -7989,7 +7991,7 @@ Function3f22c: ; 3f22c
pop bc pop bc
ld a, c ld a, c
cp b cp b
jr z, .asm_3f268 jr z, .end_animation
inc b inc b
push bc push bc
push de push de
@ -8003,16 +8005,14 @@ Function3f22c: ; 3f22c
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
dec d dec d
jr nz, .asm_3f263 jr nz, .min_number_of_frames
ld d, $1 ld d, 1
.min_number_of_frames
.asm_3f263
pop bc pop bc
ld a, c ld a, c
cp b cp b
jr nz, .asm_3f22f jr nz, .anim_loop
.end_animation
.asm_3f268
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
ret ret
@ -8575,12 +8575,12 @@ InitEnemyTrainer: ; 3f594
ld de, VTiles2 ld de, VTiles2
callab GetTrainerPic callab GetTrainerPic
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
dec a dec a
ld [wc6e6], a ld [wEnemyItemState], a
hlcoord 12, 0 hlcoord 12, 0
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
ld a, -1 ld a, -1
ld [CurOTMon], a ld [CurOTMon], a
ld a, TRAINER_BATTLE ld a, TRAINER_BATTLE
@ -8640,10 +8640,10 @@ InitEnemyWildmon: ; 3f607
predef FrontpicPredef predef FrontpicPredef
xor a xor a
ld [TrainerClass], a ld [TrainerClass], a
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 12, 0 hlcoord 12, 0
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
ret ret
; 3f662 ; 3f662
@ -9402,10 +9402,10 @@ InitBattleDisplay: ; 3fb6c
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
ld a, $31 ld a, $31
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 2, 6 hlcoord 2, 6
lb bc, 6, 6 lb bc, 6, 6
predef FillBox predef PlaceGraphic
xor a xor a
ld [hWY], a ld [hWY], a
ld [rWY], a ld [rWY], a
@ -9499,10 +9499,10 @@ CopyBackpic: ; 3fc30
ld [rSVBK], a ld [rSVBK], a
call Function3fc5b call Function3fc5b
ld a, $31 ld a, $31
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 2, 6 hlcoord 2, 6
lb bc, 6, 6 lb bc, 6, 6
predef FillBox predef PlaceGraphic
ret ret
; 3fc5b ; 3fc5b

View File

@ -3155,7 +3155,7 @@ BattleCommand_BeatUp: ; 35461
xor a xor a
ld [PlayerRolloutCount], a ld [PlayerRolloutCount], a
ld [wd002], a ld [wd002], a
ld [wc72d], a ld [wBeatUpHitAtLeastOnce], a
jr .got_mon jr .got_mon
.next_mon .next_mon
@ -3188,7 +3188,7 @@ BattleCommand_BeatUp: ; 35461
jp nz, .beatup_fail jp nz, .beatup_fail
ld a, $1 ld a, $1
ld [wc72d], a ld [wBeatUpHitAtLeastOnce], a
ld hl, BeatUpAttackText ld hl, BeatUpAttackText
call StdBattleTextBox call StdBattleTextBox
ld a, [EnemyMonSpecies] ld a, [EnemyMonSpecies]
@ -3223,7 +3223,7 @@ BattleCommand_BeatUp: ; 35461
xor a xor a
ld [EnemyRolloutCount], a ld [EnemyRolloutCount], a
ld [wd002], a ld [wd002], a
ld [wc72d], a ld [wBeatUpHitAtLeastOnce], a
jr .enemy_continue jr .enemy_continue
.not_first_enemy_beatup .not_first_enemy_beatup
@ -3283,7 +3283,7 @@ BattleCommand_BeatUp: ; 35461
jr nz, .beatup_fail jr nz, .beatup_fail
ld a, $1 ld a, $1
ld [wc72d], a ld [wBeatUpHitAtLeastOnce], a
jr .finish_beatup jr .finish_beatup
.wild .wild
@ -3332,7 +3332,7 @@ BattleCommand_BeatUp: ; 35461
BattleCommanda8: ; 355b5 BattleCommanda8: ; 355b5
ld a, [wc72d] ld a, [wBeatUpHitAtLeastOnce]
and a and a
ret nz ret nz

View File

@ -32,8 +32,8 @@ AppearUser: ; fbd77 (3e:7d77)
call GetPlayerBackpicCoords call GetPlayerBackpicCoords
ld a, $31 ld a, $31
.okay .okay
ld [hFillBox], a ld [hGraphicStartTile], a
predef FillBox predef PlaceGraphic
FinishAppearDisappearUser: ; fbd91 (3e:7d91) FinishAppearDisappearUser: ; fbd91 (3e:7d91)
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a

View File

@ -668,36 +668,37 @@ EMOTE_OBJECT EQU 7
; fruit trees ; fruit trees
const_value SET 1 const_value SET 1
const FRUITTREE_ROUTE_29 const FRUITTREE_ROUTE_29 ; 01
const FRUITTREE_ROUTE_30_1 const FRUITTREE_ROUTE_30_1 ; 02
const FRUITTREE_ROUTE_38 const FRUITTREE_ROUTE_38 ; 03
const FRUITTREE_ROUTE_46_1 const FRUITTREE_ROUTE_46_1 ; 04
const FRUITTREE_ROUTE_30_2 const FRUITTREE_ROUTE_30_2 ; 05
const FRUITTREE_ROUTE_33 const FRUITTREE_ROUTE_33 ; 06
const FRUITTREE_ROUTE_31 const FRUITTREE_ROUTE_31 ; 07
const FRUITTREE_ROUTE_43 const FRUITTREE_ROUTE_43 ; 08
const FRUITTREE_VIOLET_CITY const FRUITTREE_VIOLET_CITY ; 09
const FRUITTREE_ROUTE_46_2 const FRUITTREE_ROUTE_46_2 ; 0a
const FRUITTREE_ROUTE_35 const FRUITTREE_ROUTE_35 ; 0b
const FRUITTREE_ROUTE_45 const FRUITTREE_ROUTE_45 ; 0c
const FRUITTREE_ROUTE_36 const FRUITTREE_ROUTE_36 ; 0d
const FRUITTREE_ROUTE_26 const FRUITTREE_ROUTE_26 ; 0e
const FRUITTREE_ROUTE_39 const FRUITTREE_ROUTE_39 ; 0f
const FRUITTREE_ROUTE_44 const FRUITTREE_ROUTE_44 ; 10
const FRUITTREE_ROUTE_37_1 const FRUITTREE_ROUTE_37_1 ; 11
const FRUITTREE_ROUTE_37_2 const FRUITTREE_ROUTE_37_2 ; 12
const FRUITTREE_ROUTE_37_3 const FRUITTREE_ROUTE_37_3 ; 13
const FRUITTREE_AZALEA_TOWN const FRUITTREE_AZALEA_TOWN ; 14
const FRUITTREE_ROUTE_42_1 const FRUITTREE_ROUTE_42_1 ; 15
const FRUITTREE_ROUTE_42_2 const FRUITTREE_ROUTE_42_2 ; 16
const FRUITTREE_ROUTE_42_3 const FRUITTREE_ROUTE_42_3 ; 17
const FRUITTREE_ROUTE_11 const FRUITTREE_ROUTE_11 ; 18
const FRUITTREE_ROUTE_2 const FRUITTREE_ROUTE_2 ; 19
const FRUITTREE_ROUTE_1 const FRUITTREE_ROUTE_1 ; 1a
const FRUITTREE_ROUTE_8 const FRUITTREE_ROUTE_8 ; 1b
const FRUITTREE_PEWTER_CITY_1 const FRUITTREE_PEWTER_CITY_1 ; 1c
const FRUITTREE_PEWTER_CITY_2 const FRUITTREE_PEWTER_CITY_2 ; 1d
const FRUITTREE_FUCHSIA_CITY const FRUITTREE_FUCHSIA_CITY ; 1e
NUM_FRUIT_TREES EQU const_value +- 1
CMDQUEUE_TYPE EQU 0 CMDQUEUE_TYPE EQU 0
CMDQUEUE_ADDR EQU 1 CMDQUEUE_ADDR EQU 1

View File

@ -677,9 +677,9 @@ Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
ld a, b ld a, b
ld [hBGMapAddress + 1], a ld [hBGMapAddress + 1], a
ld a, c ld a, c
ld [hFillBox], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
pop af pop af
call Hatch_LoadFrontpicPal call Hatch_LoadFrontpicPal
call SetPalettes call SetPalettes

View File

@ -401,10 +401,10 @@ Function81adb: ; 81adb
ld de, VTiles2 tile $31 ld de, VTiles2 tile $31
predef GetBackpic predef GetBackpic
ld a, $31 ld a, $31
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 2, 4 hlcoord 2, 4
lb bc, 6, 6 lb bc, 6, 6
predef FillBox predef PlaceGraphic
ld a, [wd003] ld a, [wd003]
and a and a
jr z, .asm_81b66 jr z, .asm_81b66
@ -433,10 +433,10 @@ Function81adb: ; 81adb
callab GetTrainerPic callab GetTrainerPic
xor a xor a
ld [TempEnemyMonSpecies], a ld [TempEnemyMonSpecies], a
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 2, 3 hlcoord 2, 3
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
.asm_81ba9 .asm_81ba9
ld a, $1 ld a, $1

View File

@ -108,7 +108,7 @@ ENDM
engine_flag wMomSavingMoney, 0 ; mom saving money ; $8 engine_flag wMomSavingMoney, 0 ; mom saving money ; $8
engine_flag wMomSavingMoney, 7 ; dst engine_flag wMomSavingMoney, 7 ; dst
engine_flag wdc39, 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 StatusFlags, 0 ; pokedex
engine_flag StatusFlags, 1 ; unown dex engine_flag StatusFlags, 1 ; unown dex

View File

@ -124,8 +124,8 @@ StartMap: ; 96724
call ClearJoypad call ClearJoypad
EnterMap: ; 9673e EnterMap: ; 9673e
xor a xor a
ld [wd453], a ld [wXYComparePointer], a
ld [wd454], a ld [wXYComparePointer + 1], a
call SetUpFiveStepWildEncounterCooldown call SetUpFiveStepWildEncounterCooldown
callba RunMapSetupScript callba RunMapSetupScript
call DisableEvents call DisableEvents

View File

@ -288,7 +288,7 @@ CheckForHiddenItems: ; b8172
add SCREEN_HEIGHT / 4 add SCREEN_HEIGHT / 4
ld [wd1ec], a ld [wd1ec], a
; Get the pointer for the first signpost header in the map... ; Get the pointer for the first signpost header in the map...
ld hl, wdc02 ld hl, wCurrentMapSignpostHeaderPointer
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a

View File

@ -6,7 +6,6 @@ EvolvePokemon: ; 421d8
ld c, a ld c, a
ld b, SET_FLAG ld b, SET_FLAG
call EvoFlagAction call EvoFlagAction
EvolveAfterBattle: ; 421e6 EvolveAfterBattle: ; 421e6
xor a xor a
ld [wMonTriedToEvolve], a ld [wMonTriedToEvolve], a
@ -19,7 +18,7 @@ EvolveAfterBattle: ; 421e6
push hl push hl
CheckForEvolvablePokemon: ; 421f5 EvolveAfterBattle_MasterLoop
ld hl, CurPartyMon ld hl, CurPartyMon
inc [hl] inc [hl]
@ -28,7 +27,7 @@ CheckForEvolvablePokemon: ; 421f5
inc hl inc hl
ld a, [hl] ld a, [hl]
cp $ff cp $ff
jp z, Evolution_ReturnToMap jp z, .ReturnToMap
ld [Buffer1], a ld [Buffer1], a
@ -40,7 +39,7 @@ CheckForEvolvablePokemon: ; 421f5
call EvoFlagAction call EvoFlagAction
ld a, c ld a, c
and a and a
jp z, CheckForEvolvablePokemon jp z, EvolveAfterBattle_MasterLoop
ld a, [Buffer1] ld a, [Buffer1]
dec a dec a
@ -63,7 +62,7 @@ endr
.loop .loop
ld a, [hli] ld a, [hli]
and a and a
jr z, CheckForEvolvablePokemon jr z, EvolveAfterBattle_MasterLoop
ld b, a ld b, a
@ -324,7 +323,7 @@ endr
push hl push hl
ld l, e ld l, e
ld h, d ld h, d
jp CheckForEvolvablePokemon jp EvolveAfterBattle_MasterLoop
; 423f8 ; 423f8
.dont_evolve_1 .dont_evolve_1
@ -334,12 +333,10 @@ endr
.dont_evolve_3 .dont_evolve_3
inc hl inc hl
jp .loop jp .loop
; 423fe
; dummy pop ; XXX
pop hl pop hl
.ReturnToMap
Evolution_ReturnToMap: ; 423ff
pop de pop de
pop bc pop bc
pop hl pop hl
@ -393,7 +390,7 @@ CancelEvolution: ; 42454
call PrintText call PrintText
call ClearTileMap call ClearTileMap
pop hl pop hl
jp CheckForEvolvablePokemon jp EvolveAfterBattle_MasterLoop
; 42461 ; 42461
IsMonHoldingEverstone: ; 42461 IsMonHoldingEverstone: ; 42461

View File

@ -947,10 +947,10 @@ Intro_PrepTrainerPic: ; 619c
ld de, VTiles2 ld de, VTiles2
callba GetTrainerPic callba GetTrainerPic
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 6, 4 hlcoord 6, 4
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
ret ret
; 61b4 ; 61b4
@ -959,10 +959,10 @@ ShrinkFrame: ; 61b4
ld c, $31 ld c, $31
predef DecompressPredef predef DecompressPredef
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 6, 4 hlcoord 6, 4
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
ret ret
; 61cd ; 61cd

View File

@ -430,21 +430,22 @@ GetTradeMonNames: ; fce1b
NPCTrades: ; fce58 NPCTrades: ; fce58
npctrade: MACRO npctrade: MACRO
db \1, \2, \3, \4 db \1, \2, \3, \4 ; dialog set, requested mon, offered mon, nickname
dw \5 db \5, \6 ; dvs
db \6 shift
dw \7 db \6 ; item
db \8, \9, 0 dw \7 ; OT ID
db \8, \9, 0 ; OT name, gender requested
ENDM ENDM
npctrade 0, ABRA, MACHOP, "MUSCLE@@@@@", $6637, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_EITHER_GENDER npctrade 0, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_EITHER_GENDER
npctrade 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $6696, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_EITHER_GENDER npctrade 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_EITHER_GENDER
npctrade 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $8898, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_EITHER_GENDER npctrade 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_EITHER_GENDER
npctrade 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $6677, SMOKE_BALL, 00283, "EMY@@@@@@@@", TRADE_FEMALE_ONLY npctrade 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, 00283, "EMY@@@@@@@@", TRADE_FEMALE_ONLY
npctrade 2, HAUNTER, XATU, "PAUL@@@@@@@", $8696, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_EITHER_GENDER npctrade 2, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_EITHER_GENDER
npctrade 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $6696, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_EITHER_GENDER npctrade 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_EITHER_GENDER
npctrade 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $6696, METAL_COAT, 50082, "FOREST@@@@@", TRADE_EITHER_GENDER npctrade 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, 50082, "FOREST@@@@@", TRADE_EITHER_GENDER
; fcf38 ; fcf38

View File

@ -777,44 +777,44 @@ phone: MACRO
dba \7 ; script 2 dba \7 ; script 2
ENDM ENDM
phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone TRAINER_NONE, PHONECONTACT_MOM, KRISS_HOUSE_1F, 7, MomPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONECONTACT_MOM, KRISS_HOUSE_1F, 7, MomPhoneScript, 0, UnusedPhoneScript
phone TRAINER_NONE, PHONECONTACT_BIKESHOP, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONECONTACT_BIKESHOP, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone TRAINER_NONE, PHONECONTACT_BILL, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2 phone TRAINER_NONE, PHONECONTACT_BILL, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2
phone TRAINER_NONE, PHONECONTACT_ELM, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2 phone TRAINER_NONE, PHONECONTACT_ELM, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2
phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2 phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2
phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2 phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2
phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, HueyPhoneScript1, 7, HueyPhoneScript2 phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, HueyPhoneScript1, 7, HueyPhoneScript2
phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2 phone COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2
phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2 phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2
phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2 phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2
phone COOLTRAINERF, REENA1, ROUTE_27, 7, ReenaPhoneScript1, 7, ReenaPhoneScript2 phone COOLTRAINERF, REENA1, ROUTE_27, 7, ReenaPhoneScript1, 7, ReenaPhoneScript2
phone YOUNGSTER, JOEY1, ROUTE_30, 7, JoeyPhoneScript1, 7, JoeyPhoneScript2 phone YOUNGSTER, JOEY1, ROUTE_30, 7, JoeyPhoneScript1, 7, JoeyPhoneScript2
phone BUG_CATCHER, WADE1, ROUTE_31, 7, WadePhoneScript1, 7, WadePhoneScript2 phone BUG_CATCHER, WADE1, ROUTE_31, 7, WadePhoneScript1, 7, WadePhoneScript2
phone FISHER, RALPH1, ROUTE_32, 7, RalphPhoneScript1, 7, RalphPhoneScript2 phone FISHER, RALPH1, ROUTE_32, 7, RalphPhoneScript1, 7, RalphPhoneScript2
phone PICNICKER, LIZ1, ROUTE_32, 7, LizPhoneScript1, 7, LizPhoneScript2 phone PICNICKER, LIZ1, ROUTE_32, 7, LizPhoneScript1, 7, LizPhoneScript2
phone HIKER, ANTHONY2, ROUTE_33, 7, AnthonyPhoneScript1, 7, AnthonyPhoneScript2 phone HIKER, ANTHONY2, ROUTE_33, 7, AnthonyPhoneScript1, 7, AnthonyPhoneScript2
phone CAMPER, TODD1, ROUTE_34, 7, ToddPhoneScript1, 7, ToddPhoneScript2 phone CAMPER, TODD1, ROUTE_34, 7, ToddPhoneScript1, 7, ToddPhoneScript2
phone PICNICKER, GINA1, ROUTE_34, 7, GinaPhoneScript1, 7, GinaPhoneScript2 phone PICNICKER, GINA1, ROUTE_34, 7, GinaPhoneScript1, 7, GinaPhoneScript2
phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2 phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2
phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2 phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2
phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2 phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2
phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2 phone LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2
phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2 phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2
phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2 phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2
phone FISHER, TULLY1, ROUTE_42, 7, TullyPhoneScript1, 7, TullyPhoneScript2 phone FISHER, TULLY1, ROUTE_42, 7, TullyPhoneScript1, 7, TullyPhoneScript2
phone POKEMANIAC, BRENT1, ROUTE_43, 7, BrentPhoneScript1, 7, BrentPhoneScript2 phone POKEMANIAC, BRENT1, ROUTE_43, 7, BrentPhoneScript1, 7, BrentPhoneScript2
phone PICNICKER, TIFFANY3, ROUTE_43, 7, TiffanyPhoneScript1, 7, TiffanyPhoneScript2 phone PICNICKER, TIFFANY3, ROUTE_43, 7, TiffanyPhoneScript1, 7, TiffanyPhoneScript2
phone BIRD_KEEPER, VANCE1, ROUTE_44, 7, VancePhoneScript1, 7, VancePhoneScript2 phone BIRD_KEEPER, VANCE1, ROUTE_44, 7, VancePhoneScript1, 7, VancePhoneScript2
phone FISHER, WILTON1, ROUTE_44, 7, WiltonPhoneScript1, 7, WiltonPhoneScript2 phone FISHER, WILTON1, ROUTE_44, 7, WiltonPhoneScript1, 7, WiltonPhoneScript2
phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2 phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2
phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2 phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2
phone PICNICKER, ERIN1, ROUTE_46, 7, ErinPhoneScript1, 7, ErinPhoneScript2 phone PICNICKER, ERIN1, ROUTE_46, 7, ErinPhoneScript1, 7, ErinPhoneScript2
phone TRAINER_NONE, PHONECONTACT_BUENA, GOLDENROD_DEPT_STORE_ROOF, 7, BuenaPhoneScript1, 7, BuenaPhoneScript2 phone TRAINER_NONE, PHONECONTACT_BUENA, GOLDENROD_DEPT_STORE_ROOF, 7, BuenaPhoneScript1, 7, BuenaPhoneScript2
; 90627 ; 90627
SpecialPhoneCallList: ; 90627 SpecialPhoneCallList: ; 90627

View File

@ -1051,14 +1051,14 @@ asm_4073f: ; 4073f (10:473f)
scf scf
ret ret
Function40741: ; 40741 Pokedex_FillColumn: ; 40741
push de push de
ld de, $0014 ld de, SCREEN_WIDTH
.asm_40745 .loop
ld [hl], a ld [hl], a
add hl, de add hl, de
dec b dec b
jr nz, .asm_40745 jr nz, .loop
pop de pop de
ret ret
; 4074c ; 4074c
@ -1076,7 +1076,7 @@ Function4074c: ; 4074c (10:474c)
lb bc, 7, 7 lb bc, 7, 7
call Pokedex_PlaceBorder call Pokedex_PlaceBorder
hlcoord 0, 9 hlcoord 0, 9
ld bc, $607 lb bc, 6, 7
call Pokedex_PlaceBorder call Pokedex_PlaceBorder
hlcoord 1, 11 hlcoord 1, 11
ld de, String_SEEN ld de, String_SEEN
@ -1102,13 +1102,13 @@ Function4074c: ; 4074c (10:474c)
ld de, String_SELECT_OPTION ld de, String_SELECT_OPTION
call Pokedex_PlaceString call Pokedex_PlaceString
hlcoord 8, 1 hlcoord 8, 1
ld b, $7 ld b, 7
ld a, $5a ld a, $5a
call Function40741 call Pokedex_FillColumn
hlcoord 8, 10 hlcoord 8, 10
ld b, $6 ld b, 6
ld a, $5a ld a, $5a
call Function40741 call Pokedex_FillColumn
hlcoord 8, 0 hlcoord 8, 0
ld [hl], $59 ld [hl], $59
hlcoord 8, 8 hlcoord 8, 8
@ -1134,22 +1134,22 @@ String_START_SEARCH: ; 407f2
Function407fd: ; 407fd Function407fd: ; 407fd
call Pokedex_FillBackgroundColor2 call Pokedex_FillBackgroundColor2
hlcoord 0, 0 hlcoord 0, 0
ld bc, $0f12 lb bc, 15, 18
call Pokedex_PlaceBorder call Pokedex_PlaceBorder
hlcoord 19, 0 hlcoord 19, 0
ld [hl], $34 ld [hl], $34
hlcoord 19, 1 hlcoord 19, 1
ld a, $7f ld a, " "
ld b, $f ld b, 15
call Function40741 call Pokedex_FillColumn
ld [hl], $39 ld [hl], $39
hlcoord 1, 10 hlcoord 1, 10
ld bc, $0013 ld bc, 19
ld a, $61 ld a, $61
call ByteFill call ByteFill
hlcoord 1, 17 hlcoord 1, 17
ld bc, $0012 ld bc, 18
ld a, $7f ld a, " "
call ByteFill call ByteFill
hlcoord 9, 7 hlcoord 9, 7
ld de, Unknown_40852 ld de, Unknown_40852
@ -1218,38 +1218,38 @@ Function408f0: ; 408f0 (10:48f0)
lb bc, 14, 18 lb bc, 14, 18
call Pokedex_PlaceBorder call Pokedex_PlaceBorder
hlcoord 0, 1 hlcoord 0, 1
ld de, Unknown_4092a ld de, .SEARCH
call Pokedex_PlaceString call Pokedex_PlaceString
hlcoord 8, 4 hlcoord 8, 4
ld de, Unknown_40935 ld de, .BLANK
call Pokedex_PlaceString call Pokedex_PlaceString
hlcoord 8, 6 hlcoord 8, 6
ld de, Unknown_40935 ld de, .BLANK
call Pokedex_PlaceString call Pokedex_PlaceString
hlcoord 3, 4 hlcoord 3, 4
ld de, String_40940 ld de, .Type1Type2
call PlaceString call PlaceString
hlcoord 3, 13 hlcoord 3, 13
ld de, String_4094c ld de, BeginSearch_Cancel
call PlaceString call PlaceString
ret ret
; 4092a (10:492a) ; 4092a (10:492a)
Unknown_4092a: ; 4092a .SEARCH: ; 4092a
db $3b, " SEARCH ", $3c, $ff db $3b, " SEARCH ", $3c, $ff
; 40925 ; 40925
Unknown_40935: ; 40935 .BLANK: ; 40935
db $3d, " ", $3e, $ff db $3d, " ", $3e, $ff
; 40940 ; 40940
String_40940: ; 40940 .Type1Type2: ; 40940
db "TYPE1" db "TYPE1"
next "TYPE2" next "TYPE2"
db "@" db "@"
; 4094c ; 4094c
String_4094c: ; 4094c BeginSearch_Cancel: ; 4094c
db "BEGIN SEARCH!!" db "BEGIN SEARCH!!"
next "CANCEL" next "CANCEL"
db "@" db "@"
@ -1273,9 +1273,9 @@ Function40962: ; 40962 (10:4962)
hlcoord 8, 0 hlcoord 8, 0
ld [hl], $59 ld [hl], $59
hlcoord 8, 1 hlcoord 8, 1
ld b, $7 ld b, 7
ld a, $5a ld a, $5a
call Function40741 call Pokedex_FillColumn
hlcoord 8, 8 hlcoord 8, 8
ld [hl], $53 ld [hl], $53
hlcoord 8, 9 hlcoord 8, 9
@ -1736,7 +1736,7 @@ Function40e5b: ; 40e5b
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
hlcoord 0, 12 hlcoord 0, 12
lb bc, 4, SCREEN_WIDTH - 2 lb bc, 4, 18
call Pokedex_PlaceBorder call Pokedex_PlaceBorder
ld a, [wc7d8] ld a, [wc7d8]
ld hl, Unknown_40e7d ld hl, Unknown_40e7d
@ -1781,7 +1781,7 @@ Function40f08: ; 40f08 (10:4f08)
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
hlcoord 0, 12 hlcoord 0, 12
lb bc, 4, SCREEN_WIDTH - 2 lb bc, 4, 18
call Pokedex_PlaceBorder call Pokedex_PlaceBorder
ld de, String_ChangingModesPleaseWait ld de, String_ChangingModesPleaseWait
hlcoord 1, 14 hlcoord 1, 14
@ -2018,7 +2018,7 @@ Function41107: ; 41107
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
hlcoord 0, 12 hlcoord 0, 12
ld bc, $0412 lb bc, 4, 18
call Pokedex_PlaceBorder call Pokedex_PlaceBorder
ld de, String_41126 ld de, String_41126
hlcoord 1, 14 hlcoord 1, 14

View File

@ -199,14 +199,14 @@ TownMap_InitCursorAndPlayerIconPositions: ; 90d70 (24:4d70)
ld c, a ld c, a
call GetWorldMapLocation call GetWorldMapLocation
.LoadLandmark .LoadLandmark
ld [wTownMapPlayerIconLandmark], a ld [wPokegearMapPlayerIconLandmark], a
ld [wTownMapCursorLandmark], a ld [wPokegearMapCursorLandmark], a
ret ret
.FastShip .FastShip
ld [wTownMapPlayerIconLandmark], a ld [wPokegearMapPlayerIconLandmark], a
ld a, NEW_BARK_TOWN ld a, NEW_BARK_TOWN
ld [wTownMapCursorLandmark], a ld [wPokegearMapCursorLandmark], a
ret ret
Pokegear_InitJumptableIndices: ; 90d9e (24:4d9e) Pokegear_InitJumptableIndices: ; 90d9e (24:4d9e)
@ -307,7 +307,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
; 90e3f ; 90e3f
.Map: ; 90e3f .Map: ; 90e3f
ld a, [wTownMapPlayerIconLandmark] ld a, [wPokegearMapPlayerIconLandmark]
cp FAST_SHIP cp FAST_SHIP
jr z, .johto jr z, .johto
cp KANTO_LANDMARK cp KANTO_LANDMARK
@ -328,7 +328,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
ld [hl], $6 ld [hl], $6
hlcoord 19, 2 hlcoord 19, 2
ld [hl], $17 ld [hl], $17
ld a, [wTownMapCursorLandmark] ld a, [wPokegearMapCursorLandmark]
call PokegearMap_UpdateLandmarkName call PokegearMap_UpdateLandmarkName
ret ret
@ -530,7 +530,7 @@ Pokegear_UpdateClock: ; 90f86 (24:4f86)
; 0x90fb4 ; 0x90fb4
PokegearMap_CheckRegion: ; 90fb4 (24:4fb4) PokegearMap_CheckRegion: ; 90fb4 (24:4fb4)
ld a, [wTownMapPlayerIconLandmark] ld a, [wPokegearMapPlayerIconLandmark]
cp FAST_SHIP cp FAST_SHIP
jr z, .johto jr z, .johto
cp KANTO_LANDMARK cp KANTO_LANDMARK
@ -549,9 +549,9 @@ PokegearMap_CheckRegion: ; 90fb4 (24:4fb4)
PokegearMap_Init: ; 90fcd (24:4fcd) PokegearMap_Init: ; 90fcd (24:4fcd)
call InitPokegearTilemap call InitPokegearTilemap
ld a, [wTownMapPlayerIconLandmark] ld a, [wPokegearMapPlayerIconLandmark]
call PokegearMap_InitPlayerIcon call PokegearMap_InitPlayerIcon
ld a, [wTownMapCursorLandmark] ld a, [wPokegearMapCursorLandmark]
call PokegearMap_InitCursor call PokegearMap_InitCursor
ld a, c ld a, c
ld [wPokegearMapCursorObjectPointer], a ld [wPokegearMapCursorObjectPointer], a
@ -621,7 +621,7 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2)
ret ret
.up .up
ld hl, wTownMapCursorLandmark ld hl, wPokegearMapCursorLandmark
ld a, [hl] ld a, [hl]
cp d cp d
jr c, .wrap_around_up jr c, .wrap_around_up
@ -633,7 +633,7 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2)
jr .done_dpad jr .done_dpad
.down .down
ld hl, wTownMapCursorLandmark ld hl, wPokegearMapCursorLandmark
ld a, [hl] ld a, [hl]
cp e cp e
jr nz, .wrap_around_down jr nz, .wrap_around_down
@ -643,13 +643,13 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2)
.wrap_around_down .wrap_around_down
dec [hl] dec [hl]
.done_dpad .done_dpad
ld a, [wTownMapCursorLandmark] ld a, [wPokegearMapCursorLandmark]
call PokegearMap_UpdateLandmarkName call PokegearMap_UpdateLandmarkName
ld a, [wPokegearMapCursorObjectPointer] ld a, [wPokegearMapCursorObjectPointer]
ld c, a ld c, a
ld a, [wPokegearMapCursorObjectPointer + 1] ld a, [wPokegearMapCursorObjectPointer + 1]
ld b, a ld b, a
ld a, [wTownMapCursorLandmark] ld a, [wPokegearMapCursorLandmark]
call PokegearMap_UpdateCursorPosition call PokegearMap_UpdateCursorPosition
ret ret
@ -1552,7 +1552,7 @@ RadioChannels:
jp LoadStation_BuenasPassword jp LoadStation_BuenasPassword
.RuinsOfAlphRadio .RuinsOfAlphRadio
ld a, [wTownMapPlayerIconLandmark] ld a, [wPokegearMapPlayerIconLandmark]
cp RUINS_OF_ALPH cp RUINS_OF_ALPH
jr nz, .NoSignal jr nz, .NoSignal
jp LoadStation_UnownRadio jp LoadStation_UnownRadio
@ -1586,7 +1586,7 @@ RadioChannels:
ld a, [StatusFlags] ld a, [StatusFlags]
bit 4, a bit 4, a
jr z, .NoSignal jr z, .NoSignal
ld a, [wTownMapPlayerIconLandmark] ld a, [wPokegearMapPlayerIconLandmark]
cp MAHOGANY_TOWN cp MAHOGANY_TOWN
jr z, .ok jr z, .ok
cp ROUTE_43 cp ROUTE_43
@ -1604,7 +1604,7 @@ RadioChannels:
; if in Johto or on the S.S. Aqua, set carry ; if in Johto or on the S.S. Aqua, set carry
; otherwise clear carry ; otherwise clear carry
ld a, [wTownMapPlayerIconLandmark] ld a, [wPokegearMapPlayerIconLandmark]
cp FAST_SHIP cp FAST_SHIP
jr z, .johto jr z, .johto
cp KANTO_LANDMARK cp KANTO_LANDMARK

View File

@ -49,7 +49,7 @@ PredefPointers:: ; 856b
add_predef Predef_LinkTextbox ; $ 10 add_predef Predef_LinkTextbox ; $ 10
add_predef PrintMoveDesc add_predef PrintMoveDesc
add_predef UpdatePlayerHUD add_predef UpdatePlayerHUD
add_predef FillBox add_predef PlaceGraphic
add_predef CheckPlayerPartyForFitPkmn add_predef CheckPlayerPartyForFitPkmn
add_predef UpdateEnemyHUD add_predef UpdateEnemyHUD
add_predef StartBattle add_predef StartBattle
@ -88,7 +88,7 @@ PredefPointers:: ; 856b
add_predef PlayBattleAnim add_predef PlayBattleAnim
add_predef Predef38 ; $38 add_predef Predef38 ; $38
add_predef Predef39 add_predef Predef39
add_predef Functionfd1d0 add_predef Predef3A
add_predef PartyMonItemName add_predef PartyMonItemName
add_predef GetFrontpic add_predef GetFrontpic
add_predef GetBackpic add_predef GetBackpic
@ -103,6 +103,6 @@ PredefPointers:: ; 856b
add_predef LoadMonAnimation add_predef LoadMonAnimation
add_predef AnimateFrontpic add_predef AnimateFrontpic
add_predef Functiond0669 ; $48 add_predef Functiond0669 ; $48
add_predef Functiond066e add_predef HOF_AnimateFrontpic
dbw $ff, Function2d43 ; ???? dbw $ff, Function2d43 ; ????
; 864c ; 864c

View File

@ -2806,9 +2806,9 @@ Script_xycompare: ; 97a01
; pointer (MultiByteParam) ; pointer (MultiByteParam)
call GetScriptByte call GetScriptByte
ld [wd453], a ld [wXYComparePointer], a
call GetScriptByte call GetScriptByte
ld [wd454], a ld [wXYComparePointer + 1], a
ret ret
; 97a0e ; 97a0e

View File

@ -864,9 +864,9 @@ TradeAnim_ShowFrontpic: ; 294c3
call Function297cf call Function297cf
hlcoord 7, 2 hlcoord 7, 2
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
call WaitBGMap call WaitBGMap
ret ret
; 294e7 ; 294e7

View File

@ -245,8 +245,8 @@ TrainerCard_PrintTopHalfOfCard: ; 25299 (9:5299)
hlcoord 14, 1 hlcoord 14, 1
lb bc, 5, 7 lb bc, 5, 7
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
predef FillBox predef PlaceGraphic
ret ret
; 252ec (9:52ec) ; 252ec (9:52ec)

View File

@ -111,7 +111,7 @@ AnimateHallOfFame: ; 864c3
jr .loop jr .loop
.done .done
call Function86810 call HOF_AnimatePlayerPic
ld a, $4 ld a, $4
ld [MusicFade], a ld [MusicFade], a
call RotateThreePalettesRight call RotateThreePalettesRight
@ -128,7 +128,7 @@ AnimateHallOfFame: ; 864c3
call WaitBGMap call WaitBGMap
decoord 6, 5 decoord 6, 5
ld c, $6 ld c, $6
predef Functiond066e predef HOF_AnimateFrontpic
ld c, 60 ld c, 60
call DelayFrames call DelayFrames
and a and a
@ -251,10 +251,10 @@ endr
ld de, VTiles2 tile $31 ld de, VTiles2 tile $31
predef GetBackpic predef GetBackpic
ld a, $31 ld a, $31
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 6, 6 hlcoord 6, 6
lb bc, 6, 6 lb bc, 6, 6
predef FillBox predef PlaceGraphic
ld a, $d0 ld a, $d0
ld [hSCY], a ld [hSCY], a
ld a, $90 ld a, $90
@ -310,21 +310,20 @@ _HallOfFamePC: ; 86650
call LoadFontsBattleExtra call LoadFontsBattleExtra
xor a xor a
ld [wJumptableIndex], a ld [wJumptableIndex], a
.loop .MasterLoop
call LoadHOFTeam call LoadHOFTeam
ret c ret c
call Function86665 call .DisplayTeam
ret c ret c
ld hl, wJumptableIndex ld hl, wJumptableIndex
inc [hl] inc [hl]
jr .loop jr .MasterLoop
; 86665
Function86665: ; 86665 .DisplayTeam
xor a xor a
ld [wcf64], a ld [wcf64], a
.next .next
call Function86692 call .DisplayMonAndStrings
jr c, .start_button jr c, .start_button
.loop .loop
call JoyTextDelay call JoyTextDelay
@ -353,19 +352,18 @@ Function86665: ; 86665
.start_button .start_button
and a and a
ret ret
; 86692
Function86692: ; 86692 .DisplayMonAndStrings
; Print the number of times the player has entered the Hall of Fame. ; Print the number of times the player has entered the Hall of Fame.
; If that number is above 200, print "HOF Master!" instead. ; If that number is above 200, print "HOF Master!" instead.
ld a, [wcf64] ld a, [wcf64]
cp $6 cp PARTY_LENGTH
jr nc, .fail jr nc, .fail
ld hl, wHallOfFameTempMon1 ld hl, wHallOfFameTempMon1
ld bc, wHallOfFameTempMon1End - wHallOfFameTempMon1 ld bc, wHallOfFameTempMon1End - wHallOfFameTempMon1
call AddNTimes call AddNTimes
ld a, [hl] ld a, [hl]
cp $ff cp -1
jr nz, .okay jr nz, .okay
.fail .fail
@ -380,14 +378,14 @@ Function86692: ; 86692
ld a, [wHallOfFameTempWinCount] ld a, [wHallOfFameTempWinCount]
cp 200 + 1 cp 200 + 1
jr c, .print_num_hof jr c, .print_num_hof
ld de, String_866fc ld de, .HOFMaster
hlcoord 1, 2 hlcoord 1, 2
call PlaceString call PlaceString
hlcoord 13, 2 hlcoord 13, 2
jr .finish jr .finish
.print_num_hof .print_num_hof
ld de, String_8670c ld de, .TimeFamer
hlcoord 1, 2 hlcoord 1, 2
call PlaceString call PlaceString
hlcoord 2, 2 hlcoord 2, 2
@ -397,7 +395,7 @@ Function86692: ; 86692
hlcoord 11, 2 hlcoord 11, 2
.finish .finish
ld de, String_866fb ld de, .EmptyString
call PlaceString call PlaceString
call WaitBGMap call WaitBGMap
ld b, SCGB_1A ld b, SCGB_1A
@ -405,24 +403,20 @@ Function86692: ; 86692
call SetPalettes call SetPalettes
decoord 6, 5 decoord 6, 5
ld c, $6 ld c, $6
predef Functiond066e predef HOF_AnimateFrontpic
and a and a
ret ret
; 866fb
String_866fb: .EmptyString:
db "@" db "@"
; 866fc
String_866fc: .HOFMaster:
db " HOF Master!@" db " HOF Master!@"
; 8670c
String_8670c: .TimeFamer:
db " -Time Famer@" db " -Time Famer@"
; 8671c ; 8671c
LoadHOFTeam: ; 8671c LoadHOFTeam: ; 8671c
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
cp NUM_HOF_TEAMS cp NUM_HOF_TEAMS
@ -537,7 +531,7 @@ DisplayHOFMon: ; 86748
ret ret
; 86810 ; 86810
Function86810: ; 86810 HOF_AnimatePlayerPic: ; 86810
call ClearBGPalettes call ClearBGPalettes
ld hl, VTiles2 tile $63 ld hl, VTiles2 tile $63
ld de, FontExtra + 13 tiles ld de, FontExtra + 13 tiles
@ -549,10 +543,10 @@ Function86810: ; 86810
call ByteFill call ByteFill
callba GetPlayerBackpic callba GetPlayerBackpic
ld a, $31 ld a, $31
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 6, 6 hlcoord 6, 6
lb bc, 6, 6 lb bc, 6, 6
predef FillBox predef PlaceGraphic
ld a, $d0 ld a, $d0
ld [hSCY], a ld [hSCY], a
ld a, $90 ld a, $90
@ -571,12 +565,12 @@ Function86810: ; 86810
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " " ld a, " "
call ByteFill call ByteFill
callba Function88840 callba HOF_LoadTrainerFrontpic
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 12, 5 hlcoord 12, 5
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
ld a, $c0 ld a, $c0
ld [hSCX], a ld [hSCX], a
call WaitBGMap call WaitBGMap

View File

@ -275,7 +275,7 @@ _MomText_ItsInRoom: ; 0xfd1ca
db 0 ; XXX db 0 ; XXX
Functionfd1d0: ; fd1d0 Predef3A: ; fd1d0
ret ret
; fd1d1 ; fd1d1

View File

@ -144,9 +144,9 @@ UnownPrinter: ; 16be4
call Function16cff call Function16cff
hlcoord 1, 6 hlcoord 1, 6
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
ld de, VTiles2 tile $31 ld de, VTiles2 tile $31
callba Functione0000 callba Functione0000
ret ret
@ -228,9 +228,9 @@ Function16dac: ; 16dac
call ByteFill call ByteFill
hlcoord 7, 11 hlcoord 7, 11
ld a, $31 ld a, $31
ld [hFillBox], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
ret ret
; 16dc7 ; 16dc7

View File

@ -1115,13 +1115,13 @@ PokeAnim_GetSpeciesOrUnown: ; d065c
ret ret
; d0669 ; d0669
Functiond0669: ; d0669 Functiond0669: ; d0669 Predef 48
ld a, $1 ld a, $1
ld [wBoxAlignment], a ld [wBoxAlignment], a
Functiond066e: ; d066e HOF_AnimateFrontpic: ; d066e Predef 49
call AnimateMon_CheckIfPokemon call AnimateMon_CheckIfPokemon
jr c, .asm_d068c jr c, .fail
ld h, d ld h, d
ld l, e ld l, e
push bc push bc
@ -1137,7 +1137,7 @@ Functiond066e: ; d066e
ld [wBoxAlignment], a ld [wBoxAlignment], a
ret ret
.asm_d068c .fail
xor a xor a
ld [wBoxAlignment], a ld [wBoxAlignment], a
inc a inc a

View File

@ -1665,9 +1665,9 @@ _PrepMonFrontpic:: ; 378b
predef GetFrontpic predef GetFrontpic
pop hl pop hl
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
xor a xor a
ld [wBoxAlignment], a ld [wBoxAlignment], a
ret ret

View File

@ -560,7 +560,7 @@ CheckSFX:: ; 3dde
ret ret
; 3dfe ; 3dfe
Function3dfe:: ; 3dfe TerminateExpBarSound:: ; 3dfe
xor a xor a
ld [Channel5Flags], a ld [Channel5Flags], a
ld [SoundInput], a ld [SoundInput], a

View File

@ -381,7 +381,7 @@ CheckIndoorMap:: ; 22f4
ret ret
; 2300 ; 2300
Function2300:: ; unreferenced ; XXX
cp INDOOR cp INDOOR
ret z ret z
cp GATE cp GATE
@ -549,11 +549,11 @@ ReadWarps:: ; 23da
ld a, l ld a, l
ld [wCurrMapWarpHeaderPointer], a ld [wCurrMapWarpHeaderPointer], a
ld a, h ld a, h
ld [wdbfd], a ld [wCurrMapWarpHeaderPointer + 1], a
ld a, c ld a, c
and a and a
ret z ret z
ld bc, $0005 ld bc, 5
call AddNTimes call AddNTimes
ret ret
; 23f1 ; 23f1
@ -765,25 +765,25 @@ endr
ld d, a ld d, a
ld a, [MapHeight] ld a, [MapHeight]
ld b, a ld b, a
.asm_250c .row
push hl push hl
ld a, [hConnectedMapWidth] ld a, [hConnectedMapWidth]
ld c, a ld c, a
.asm_2510 .col
ld a, [de] ld a, [de]
inc de inc de
ld [hli], a ld [hli], a
dec c dec c
jr nz, .asm_2510 jr nz, .col
pop hl pop hl
ld a, [hConnectionStripLength] ld a, [hConnectionStripLength]
add l add l
ld l, a ld l, a
jr nc, .asm_251e jr nc, .okay
inc h inc h
.asm_251e .okay
dec b dec b
jr nz, .asm_250c jr nz, .row
pop af pop af
rst Bankswitch rst Bankswitch
@ -916,9 +916,9 @@ FillSouthConnectionStrip:: ; 25d3
add 6 add 6
add e add e
ld e, a ld e, a
jr nc, .asm_25f2 jr nc, .okay
inc d inc d
.asm_25f2 .okay
dec c dec c
jr nz, .y jr nz, .y
ret ret
@ -927,7 +927,7 @@ FillSouthConnectionStrip:: ; 25d3
FillWestConnectionStrip:: FillWestConnectionStrip::
FillEastConnectionStrip:: ; 25f6 FillEastConnectionStrip:: ; 25f6
.asm_25f6 .loop
ld a, [MapWidth] ld a, [MapWidth]
add 6 add 6
ld [hConnectedMapWidth], a ld [hConnectedMapWidth], a
@ -955,11 +955,11 @@ FillEastConnectionStrip:: ; 25f6
ld a, [hConnectedMapWidth] ld a, [hConnectedMapWidth]
add e add e
ld e, a ld e, a
jr nc, .asm_2617 jr nc, .okay
inc d inc d
.asm_2617 .okay
dec b dec b
jr nz, .asm_25f6 jr nz, .loop
ret ret
; 261b ; 261b
@ -1452,15 +1452,15 @@ BufferScreen:: ; 2879
ld de, wScreenSave ld de, wScreenSave
ld c, $5 ld c, $5
ld b, $6 ld b, $6
.asm_2886 .row
push bc push bc
push hl push hl
.asm_2888 .col
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de
dec b dec b
jr nz, .asm_2888 jr nz, .col
pop hl pop hl
ld a, [MapWidth] ld a, [MapWidth]
add $6 add $6
@ -1469,7 +1469,7 @@ BufferScreen:: ; 2879
add hl, bc add hl, bc
pop bc pop bc
dec c dec c
jr nz, .asm_2886 jr nz, .row
ret ret
; 289d ; 289d

View File

@ -128,7 +128,7 @@ Timer:: ; 3e93
Function3ed7:: ; 3ed7 Function3ed7:: ; 3ed7
; unreferenced ; unreferenced
ld [wdc02], a ld [$dc02], a
ld a, [hROMBank] ld a, [hROMBank]
push af push af
ld a, BANK(Function114243) ld a, BANK(Function114243)
@ -139,7 +139,7 @@ Function3ed7:: ; 3ed7
ld a, b ld a, b
rst Bankswitch rst Bankswitch
ld a, [wdc02] ld a, [$dc02]
ret ret
; 3eea ; 3eea

View File

@ -34,7 +34,7 @@ hJoyLast EQU $ffa9
hInMenu EQU $ffaa hInMenu EQU $ffaa
hPrinter EQU $ffac hPrinter EQU $ffac
hFillBox EQU $ffad hGraphicStartTile EQU $ffad
hMoveMon EQU $ffae hMoveMon EQU $ffae
hMapObjectIndexBuffer EQU $ffaf hMapObjectIndexBuffer EQU $ffaf
hObjectStructIndexBuffer EQU $ffb0 hObjectStructIndexBuffer EQU $ffb0

View File

@ -1665,7 +1665,7 @@ RevivePokemon: ; f0d6
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld c, a ld c, a
ld d, 0 ld d, 0
ld hl, wc6fc ld hl, wBattleParticipantsIncludingFainted
ld b, CHECK_FLAG ld b, CHECK_FLAG
predef FlagPredef predef FlagPredef
ld a, c ld a, c

View File

@ -5428,9 +5428,9 @@ Pokepic:: ; 244e3
ld c, a ld c, a
call Coord2Tile call Coord2Tile
ld a, $80 ld a, $80
ld [hFillBox], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
call WaitBGMap call WaitBGMap
ret ret
@ -6509,9 +6509,9 @@ endr
ld [hl], VBGMap0 / $100 ld [hl], VBGMap0 / $100
ret ret
FillBox: ; 2ef6e PlaceGraphic: ; 2ef6e
; Fill wBoxAlignment-aligned box width b height c ; Fill wBoxAlignment-aligned box width b height c
; with iterating tile starting from hFillBox at hl. ; with iterating tile starting from hGraphicStartTile at hl.
; Predef $13 ; Predef $13
ld de, SCREEN_WIDTH ld de, SCREEN_WIDTH
@ -6520,7 +6520,7 @@ FillBox: ; 2ef6e
and a and a
jr nz, .right jr nz, .right
ld a, [hFillBox] ld a, [hGraphicStartTile]
.x1 .x1
push bc push bc
push hl push hl
@ -6547,7 +6547,7 @@ FillBox: ; 2ef6e
add hl, bc add hl, bc
pop bc pop bc
ld a, [hFillBox] ld a, [hGraphicStartTile]
.x2 .x2
push bc push bc
push hl push hl
@ -8973,7 +8973,7 @@ CheckBattleScene: ; 4ea44
.asm_4ea72 .asm_4ea72
ld a, $5 ld a, $5
ld hl, wdc00 ld hl, w5_dc00
call GetFarWRAMByte call GetFarWRAMByte
bit 0, a bit 0, a
jr z, .off jr z, .off
@ -10799,7 +10799,7 @@ MovePlayerPic: ; 88266
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
xor a xor a
ld [hBGMapThird], a ld [hBGMapThird], a
call WaitBGMap call WaitBGMap
@ -10951,7 +10951,7 @@ GetChrisBackpic: ; 88830
predef DecompressPredef predef DecompressPredef
ret ret
Function88840: ; 88840 HOF_LoadTrainerFrontpic: ; 88840
call WaitBGMap call WaitBGMap
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
@ -11007,10 +11007,10 @@ DrawIntroPlayerPic: ; 88874
; Draw ; Draw
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 6, 4 hlcoord 6, 4
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
ret ret
ChrisPic: ; 888a9 ChrisPic: ; 888a9

View File

@ -1255,10 +1255,10 @@ Function897d5: ; 897d5
.asm_897f3 .asm_897f3
ld a, $37 ld a, $37
ld [hFillBox], a ld [hGraphicStartTile], a
hlcoord 12, 3 hlcoord 12, 3
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
call Function8963d call Function8963d
pop bc pop bc
ret ret

File diff suppressed because it is too large Load Diff

View File

@ -1242,9 +1242,9 @@ asm_108966
call MobileTradeAnim_ClearTilemap call MobileTradeAnim_ClearTilemap
hlcoord 7, 2 hlcoord 7, 2
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
call WaitBGMap call WaitBGMap
ret ret
; 10898a ; 10898a
@ -1256,9 +1256,9 @@ Function10898a: ; 10898a
call MobileTradeAnim_ClearTilemap call MobileTradeAnim_ClearTilemap
hlcoord 7, 2 hlcoord 7, 2
xor a xor a
ld [hFillBox], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef FillBox predef PlaceGraphic
call WaitBGMap call WaitBGMap
ret ret
; 1089a8 ; 1089a8

File diff suppressed because it is too large Load Diff

View File

@ -1118,7 +1118,7 @@ Function1188c8: ; 1188c8 (46:48c8)
ld a, $1 ld a, $1
ld [wcd65], a ld [wcd65], a
call Function1188e7 call Function1188e7
ld hl, wc708 ld hl, $c708
.asm_1188d3 .asm_1188d3
ld a, [de] ld a, [de]
inc de inc de
@ -1127,7 +1127,7 @@ Function1188c8: ; 1188c8 (46:48c8)
jr nz, .asm_1188d3 jr nz, .asm_1188d3
call Function119eb4 call Function119eb4
call Function119ec2 call Function119ec2
ld hl, wc708 ld hl, $c708
ld a, $6 ld a, $6
jp Function119e2b jp Function119e2b
@ -1908,9 +1908,9 @@ Function118f68:
ld [hli], a ld [hli], a
ld a, [wcd4c] ld a, [wcd4c]
ld [hli], a ld [hli], a
ld a, wc708 % $100 ld a, $c708 % $100
ld [hli], a ld [hli], a
ld a, wc708 / $100 ld a, $c708 / $100
ld [hli], a ld [hli], a
ld a, $60 ld a, $60
ld [hli], a ld [hli], a
@ -2537,9 +2537,9 @@ Function1193a0:
ld [hli], a ld [hli], a
xor a xor a
ld [hli], a ld [hli], a
ld a, wc708 % $100 ld a, $c708 % $100
ld [hli], a ld [hli], a
ld a, wc708 / $100 ld a, $c708 / $100
ld [hli], a ld [hli], a
ld a, $60 ld a, $60
ld [hli], a ld [hli], a
@ -2975,7 +2975,7 @@ Function119694: ; 119694 (46:5694)
ld b, 0 ld b, 0
ld hl, Unknown_1196b8 ld hl, Unknown_1196b8
.asm_119699 .asm_119699
ld de, wc708 ld de, $c708
ld a, [de] ld a, [de]
inc de inc de
cp [hl] cp [hl]
@ -3018,7 +3018,7 @@ SECTION "bank46_2", ROMX, BANK[$46]
; A hack to use ascii above. ; A hack to use ascii above.
Function1196cd: ; 1196cd (46:56cd) Function1196cd: ; 1196cd (46:56cd)
ld de, wc719 ld de, $c719
call Function1196de call Function1196de
ld [wcd4a], a ld [wcd4a], a
inc de inc de
@ -3029,6 +3029,8 @@ Function1196cd: ; 1196cd (46:56cd)
Function1196de: ; 1196de (46:56de) Function1196de: ; 1196de (46:56de)
ld a, [de] ld a, [de]
inc de inc de
; b = ([de] - 48) * 2
; c = ([de] - 48) * 10
sub $30 sub $30
sla a sla a
ld b, a ld b, a
@ -3362,9 +3364,9 @@ Function1198f7:
ld [hli], a ld [hli], a
xor a xor a
ld [hli], a ld [hli], a
ld a, wc708 % $100 ld a, $c708 % $100
ld [hli], a ld [hli], a
ld a, wc708 / $100 ld a, $c708 / $100
ld [hli], a ld [hli], a
ld a, [wcd51] ld a, [wcd51]
ld [hli], a ld [hli], a
@ -7231,7 +7233,7 @@ Function11b483: ; 11b483
jp Function11ad8a jp Function11ad8a
.InitRAM .InitRAM
ld bc, wc626 ld bc, $c626
ld a, [PlayerID] ld a, [PlayerID]
ld [wcd2a], a ld [wcd2a], a
ld [bc], a ld [bc], a
@ -7444,9 +7446,9 @@ Function11b6b4: ; 11b6b4
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld a, [wcd30] ld a, [wcd30]
ld [wc708], a ld [$c708], a
ld a, [wcd31] ld a, [wcd31]
ld [wc709], a ld [$c709], a
ld a, $c708 % $100 ld a, $c708 % $100
ld [wMobileMonSpeciesPointerBuffer], a ld [wMobileMonSpeciesPointerBuffer], a
@ -7735,8 +7737,8 @@ Function11b920: ; 11b920
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld hl, $a81f ld hl, $a81f
ld de, wc626 ld de, $c626
ld bc, $0008 ld bc, 8
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
call Function118000 call Function118000

View File

@ -1,32 +1,32 @@
Function170000: ; 170000 Function170000: ; 170000
ld a, [$c62b] ld a, [$c62b]
ld [$c6d0], a ld [wPlayerTrademonSpecies], a
ld hl, $c62e ld hl, $c62e
ld de, $c6e7 ld de, wPlayerTrademonSenderName
ld bc, $0005 ld bc, $0005
call CopyBytes call CopyBytes
ld a, $50 ld a, $50
ld [de], a ld [de], a
ld hl, $c663 ld hl, $c663
ld de, $c6f2 ld de, wPlayerTrademonOTName
ld bc, $0005 ld bc, $0005
call CopyBytes call CopyBytes
ld a, $50 ld a, $50
ld [de], a ld [de], a
ld hl, $c648 ld hl, $c648
ld a, [hli] ld a, [hli]
ld [$c6fd], a ld [wPlayerTrademonDVs], a
ld a, [hl] ld a, [hl]
ld [$c6fe], a ld [wPlayerTrademonDVs + 1], a
ld hl, $c639 ld hl, $c639
ld a, [hli] ld a, [hli]
ld [$c6ff], a ld [wPlayerTrademonID], a
ld a, [hl] ld a, [hl]
ld [wc700], a ld [wPlayerTrademonID + 1], a
ld bc, $c633 ld bc, $c633
callba GetCaughtGender callba GetCaughtGender
ld a, c ld a, c
ld [wc701], a ld [wPlayerTrademonCaughtData], a
ld a, [wcd81] ld a, [wcd81]
ld [wc74e], a ld [wc74e], a
ld hl, $c608 ld hl, $c608
@ -41,33 +41,33 @@ Function17005a: ; 17005a
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld a, [$a824] ld a, [$a824]
ld [wc702], a ld [wOTTrademonSpecies], a
ld hl, $a827 ld hl, $a827
ld de, wc719 ld de, wOTTrademonSenderName
ld bc, $0005 ld bc, 5 ; Japanese Name Length
call CopyBytes call CopyBytes
ld a, $50 ld a, "@"
ld [de], a ld [de], a
ld hl, $a85c ld hl, $a85c
ld de, wc724 ld de, wOTTrademonOTName
ld bc, $0005 ld bc, 5 ; Japanese Name Length
call CopyBytes call CopyBytes
ld a, $50 ld a, "@"
ld [de], a ld [de], a
ld hl, $a841 ld hl, $a841
ld a, [hli] ld a, [hli]
ld [wEnemyTrappingMove], a ld [wOTTrademonDVs], a
ld a, [hl] ld a, [hl]
ld [wPlayerWrapCount], a ld [wOTTrademonDVs + 1], a
ld hl, $a832 ld hl, $a832
ld a, [hli] ld a, [hli]
ld [wEnemyWrapCount], a ld [wOTTrademonID], a
ld a, [hl] ld a, [hl]
ld [wPlayerCharging], a ld [wOTTrademonID + 1], a
ld bc, $a82c ld bc, $a82c
callba GetCaughtGender callba GetCaughtGender
ld a, c ld a, c
ld [wEnemyCharging], a ld [wOTTrademonCaughtData], a
ld a, [wcd81] ld a, [wcd81]
ld [wc74e], a ld [wc74e], a
call CloseSRAM call CloseSRAM

View File

@ -277,7 +277,7 @@ Function17d0f3: ; 17d0f3
ld [wOTTrademonSpecies], a ld [wOTTrademonSpecies], a
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, [wcd81] ld a, [wcd81]
ld [wc74e], a ld [$c74e], a
ld hl, $c63d ld hl, $c63d
ld de, wOTTrademonOTName ld de, wOTTrademonOTName
ld bc, 5 ld bc, 5
@ -1000,7 +1000,7 @@ Function17d60b: ; 17d60b
call CloseSRAM call CloseSRAM
ld a, $6 ld a, $6
call GetSRAMBank call GetSRAMBank
ld de, wc708 ld de, $c708
ld a, c ld a, c
and a and a
jr z, .asm_17d684 jr z, .asm_17d684
@ -1060,7 +1060,7 @@ Function17d60b: ; 17d60b
call CloseSRAM call CloseSRAM
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld hl, wc708 ld hl, $c708
ld de, $b1b3 ld de, $b1b3
ld a, [$b1b1] ld a, [$b1b1]
ld c, a ld c, a
@ -1477,7 +1477,7 @@ Function17d902: ; 17d902
Function17d93a: ; 17d93a Function17d93a: ; 17d93a
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0005 ld bc, $0005
call CopyBytes call CopyBytes
call Function17e41e call Function17e41e
@ -1486,25 +1486,25 @@ Function17d93a: ; 17d93a
push af push af
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
ld a, [wc70c] ld a, [$c70c]
call Function17e6de call Function17e6de
ld a, [wc70a] ld a, [$c70a]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, [wc70c] ld a, [$c70c]
ld e, a ld e, a
callba Function8bc6 callba Function8bc6
call SetPalettes call SetPalettes
ld a, [wc708] ld a, [$c708]
ld l, a ld l, a
ld a, [wc709] ld a, [$c709]
ld h, a ld h, a
ld a, [wc70b] ld a, [$c70b]
ld c, a ld c, a
decoord 0, 0 decoord 0, 0
add hl, de add hl, de
ld e, l ld e, l
ld d, h ld d, h
callba Functiond066e callba HOF_AnimateFrontpic
pop af pop af
ld [rSVBK], a ld [rSVBK], a
call Function17e349 call Function17e349
@ -1513,7 +1513,7 @@ Function17d93a: ; 17d93a
Function17d98b: ; 17d98b Function17d98b: ; 17d98b
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0004 ld bc, $0004
call CopyBytes call CopyBytes
call Function17e41e call Function17e41e
@ -1522,17 +1522,17 @@ Function17d98b: ; 17d98b
push af push af
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
ld a, [wc70b] ld a, [$c70b]
call Function17e6de call Function17e6de
ld a, [wc70a] ld a, [$c70a]
ld [TrainerClass], a ld [TrainerClass], a
ld a, [wc70b] ld a, [$c70b]
ld e, a ld e, a
callba Function8bbd callba Function8bbd
call SetPalettes call SetPalettes
ld a, [wc708] ld a, [$c708]
ld e, a ld e, a
ld a, [wc709] ld a, [$c709]
ld d, a ld d, a
push de push de
ld de, VTiles2 ld de, VTiles2
@ -1541,7 +1541,7 @@ Function17d98b: ; 17d98b
decoord 0, 0 decoord 0, 0
add hl, de add hl, de
ld bc, $0707 ld bc, $0707
predef FillBox predef PlaceGraphic
pop af pop af
ld [rSVBK], a ld [rSVBK], a
call Function17e349 call Function17e349
@ -1550,34 +1550,34 @@ Function17d98b: ; 17d98b
Function17d9e3: ; 17d9e3 Function17d9e3: ; 17d9e3
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0007 ld bc, $0007
call CopyBytes call CopyBytes
call Function17e41e call Function17e41e
ld a, [wc70b] ld a, [$c70b]
push af push af
cp $c0 cp $c0
jr c, .asm_17da01 jr c, .asm_17da01
ld a, [wc70c] ld a, [$c70c]
ld [rSVBK], a ld [rSVBK], a
jr .asm_17da07 jr .asm_17da07
.asm_17da01 .asm_17da01
ld a, [wc70c] ld a, [$c70c]
call GetSRAMBank call GetSRAMBank
.asm_17da07 .asm_17da07
ld a, [wc708] ld a, [$c708]
ld l, a ld l, a
ld a, [wc709] ld a, [$c709]
ld h, a ld h, a
ld a, [wc70a] ld a, [$c70a]
ld e, a ld e, a
ld a, [wc70b] ld a, [$c70b]
ld d, a ld d, a
ld a, [wc70d] ld a, [$c70d]
ld c, a ld c, a
ld a, [wc70e] ld a, [$c70e]
ld b, a ld b, a
call CopyBytes call CopyBytes
pop af pop af
@ -1596,28 +1596,28 @@ Function17d9e3: ; 17d9e3
Function17da31: ; 17da31 Function17da31: ; 17da31
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0004 ld bc, $0004
call CopyBytes call CopyBytes
call Function17e41e call Function17e41e
ld a, [wc709] ld a, [$c709]
push af push af
cp $c0 cp $c0
jr c, .asm_17da4f jr c, .asm_17da4f
ld a, [wc70a] ld a, [$c70a]
ld [rSVBK], a ld [rSVBK], a
jr .asm_17da55 jr .asm_17da55
.asm_17da4f .asm_17da4f
ld a, [wc70a] ld a, [$c70a]
call GetSRAMBank call GetSRAMBank
.asm_17da55 .asm_17da55
ld a, [wc708] ld a, [$c708]
ld e, a ld e, a
ld a, [wc709] ld a, [$c709]
ld d, a ld d, a
ld a, [wc70b] ld a, [$c70b]
ld c, a ld c, a
bit 7, c bit 7, c
jr nz, .asm_17da70 jr nz, .asm_17da70
@ -1897,22 +1897,22 @@ Function17dc1f: ; 17dc1f
ld [rSVBK], a ld [rSVBK], a
ld hl, $c688 ld hl, $c688
ld a, $40 ld a, $40
ld [wc708], a ld [$c708], a
ld a, [hli] ld a, [hli]
ld [wc70a], a ld [$c70a], a
add $5 add $5
ld [wc70c], a ld [$c70c], a
ld a, [hli] ld a, [hli]
ld [wc709], a ld [$c709], a
add $4 add $4
ld [wc70b], a ld [$c70b], a
ld a, $96 ld a, $96
ld [wc70d], a ld [$c70d], a
ld a, $5c ld a, $5c
ld [wc70e], a ld [$c70e], a
ld a, $1 ld a, $1
ld [wEnemyGoesFirst], a ld [$c70f], a
ld hl, wc708 ld hl, $c708
call LoadMenuDataHeader call LoadMenuDataHeader
call VerticalMenu call VerticalMenu
jr nc, .asm_17dc6e jr nc, .asm_17dc6e
@ -2075,112 +2075,112 @@ Function17dd30: ; 17dd30
Function17dd49: ; 17dd49 Function17dd49: ; 17dd49
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $000a ld bc, $000a
call CopyBytes call CopyBytes
ld a, [wc711] ld a, [$c711]
ld c, a ld c, a
ld b, $0 ld b, $0
call CopyBytes call CopyBytes
ld a, [wc70a] ld a, [$c70a]
cp $c0 cp $c0
jr c, .asm_17dd6c jr c, .sram
ld a, [wc708] ld a, [$c708]
ld [rSVBK], a ld [rSVBK], a
jr .asm_17dd72 jr .got_bank
.asm_17dd6c .sram
ld a, [wc708] ld a, [$c708]
call GetSRAMBank call GetSRAMBank
.asm_17dd72 .got_bank
ld a, [wc709] ld a, [$c709]
ld l, a ld l, a
ld a, [wc70a] ld a, [$c70a]
ld h, a ld h, a
ld de, $c688 ld de, $c688
ld a, [wc711] ld a, [$c711]
ld c, a ld c, a
ld b, $0 ld b, $0
call CopyBytes call CopyBytes
ld a, [wc70a] ld a, [$c70a]
cp $c0 cp $c0
jr c, .asm_17dd93 jr c, .close_sram
ld a, $4 ld a, $4
ld [rSVBK], a ld [rSVBK], a
jr .asm_17dd96 jr .exited_bank
.asm_17dd93 .close_sram
call CloseSRAM call CloseSRAM
.asm_17dd96 .exited_bank
ld a, [wc711] ld a, [$c711]
ld c, a ld c, a
ld hl, wc712 ld hl, $c712
ld de, $c688 ld de, $c688
.asm_17dda0 .loop
ld a, [de] ld a, [de]
inc de inc de
cp [hl] cp [hl]
inc hl inc hl
jr z, .asm_17ddaa jr z, .next
jr c, .asm_17ddc1 jr c, .load
jr .asm_17ddb7 jr .load2
.asm_17ddaa .next
dec c dec c
jr nz, .asm_17dda0 jr nz, .loop
ld a, [wc70d] ld a, [$c70d]
ld l, a ld l, a
ld a, [wc70e] ld a, [$c70e]
ld h, a ld h, a
jr .asm_17ddc9 jr .done
.asm_17ddb7 .load2
ld a, [wEnemyGoesFirst] ld a, [$c70f]
ld l, a ld l, a
ld a, [wc710] ld a, [$c710]
ld h, a ld h, a
jr .asm_17ddc9 jr .done
.asm_17ddc1 .load
ld a, [wc70b] ld a, [$c70b]
ld l, a ld l, a
ld a, [wc70c] ld a, [$c70c]
ld h, a ld h, a
.asm_17ddc9 .done
call Function17e40f call Function17e40f
ret ret
; 17ddcd ; 17ddcd
Function17ddcd: ; 17ddcd Function17ddcd: ; 17ddcd
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0008 ld bc, $0008
call CopyBytes call CopyBytes
ld a, [wc70a] ld a, [$c70a]
cp $c0 cp $c0
jr c, .asm_17dde7 jr c, .asm_17dde7
ld a, [wc708] ld a, [$c708]
ld [rSVBK], a ld [rSVBK], a
jr .asm_17dded jr .asm_17dded
.asm_17dde7 .asm_17dde7
ld a, [wc708] ld a, [$c708]
call GetSRAMBank call GetSRAMBank
.asm_17dded .asm_17dded
ld a, [wc709] ld a, [$c709]
ld e, a ld e, a
ld a, [wc70a] ld a, [$c70a]
ld d, a ld d, a
ld a, [de] ld a, [de]
ld [wc710], a ld [$c710], a
ld a, [wc70b] ld a, [$c70b]
ld c, a ld c, a
ld b, $0 ld b, $0
ld a, [wc70a] ld a, [$c70a]
cp $c0 cp $c0
jr c, .asm_17de0c jr c, .asm_17de0c
ld a, $4 ld a, $4
@ -2195,20 +2195,20 @@ Function17ddcd: ; 17ddcd
ld hl, Unknown_17da8c ld hl, Unknown_17da8c
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
ld hl, wc710 ld hl, $c710
and [hl] and [hl]
pop hl pop hl
jr nz, .asm_17de26 jr nz, .asm_17de26
ld a, [wc70e] ld a, [$c70e]
ld l, a ld l, a
ld a, [wEnemyGoesFirst] ld a, [$c70f]
ld h, a ld h, a
jr .asm_17de2e jr .asm_17de2e
.asm_17de26 .asm_17de26
ld a, [wc70c] ld a, [$c70c]
ld l, a ld l, a
ld a, [wc70d] ld a, [$c70d]
ld h, a ld h, a
.asm_17de2e .asm_17de2e
@ -2218,26 +2218,26 @@ Function17ddcd: ; 17ddcd
Function17de32: ; 17de32 Function17de32: ; 17de32
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0009 ld bc, $0009
call CopyBytes call CopyBytes
ld a, [wc710] ld a, [$c710]
ld c, a ld c, a
ld b, $0 ld b, $0
call CopyBytes call CopyBytes
ld a, $6 ld a, $6
call GetSRAMBank call GetSRAMBank
call Function17f4f6 call Function17f4f6
ld a, [wc708] ld a, [$c708]
ld e, a ld e, a
ld a, [wc709] ld a, [$c709]
ld d, a ld d, a
add hl, de add hl, de
ld e, l ld e, l
ld d, h ld d, h
ld a, [wc710] ld a, [$c710]
ld c, a ld c, a
ld hl, wc711 ld hl, $c711
.asm_17de61 .asm_17de61
ld a, [de] ld a, [de]
inc de inc de
@ -2250,23 +2250,23 @@ Function17de32: ; 17de32
.asm_17de6b .asm_17de6b
dec c dec c
jr nz, .asm_17de61 jr nz, .asm_17de61
ld a, [wc70c] ld a, [$c70c]
ld l, a ld l, a
ld a, [wc70d] ld a, [$c70d]
ld h, a ld h, a
jr .asm_17de8a jr .asm_17de8a
.asm_17de78 .asm_17de78
ld a, [wc70e] ld a, [$c70e]
ld l, a ld l, a
ld a, [wEnemyGoesFirst] ld a, [$c70f]
ld h, a ld h, a
jr .asm_17de8a jr .asm_17de8a
.asm_17de82 .asm_17de82
ld a, [wc70a] ld a, [$c70a]
ld l, a ld l, a
ld a, [wc70b] ld a, [$c70b]
ld h, a ld h, a
.asm_17de8a .asm_17de8a
@ -2277,20 +2277,20 @@ Function17de32: ; 17de32
Function17de91: ; 17de91 Function17de91: ; 17de91
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0007 ld bc, $0007
call CopyBytes call CopyBytes
ld a, $6 ld a, $6
call GetSRAMBank call GetSRAMBank
call Function17f4f6 call Function17f4f6
ld a, [wc708] ld a, [$c708]
ld e, a ld e, a
ld a, [wc709] ld a, [$c709]
ld d, a ld d, a
add hl, de add hl, de
ld e, l ld e, l
ld d, h ld d, h
ld a, [wc70a] ld a, [$c70a]
ld c, a ld c, a
ld b, $0 ld b, $0
ld hl, Unknown_17da8c ld hl, Unknown_17da8c
@ -2300,16 +2300,16 @@ Function17de91: ; 17de91
ld h, d ld h, d
and [hl] and [hl]
jr nz, .asm_17deca jr nz, .asm_17deca
ld a, [wc70d] ld a, [$c70d]
ld l, a ld l, a
ld a, [wc70e] ld a, [$c70e]
ld h, a ld h, a
jr .asm_17ded2 jr .asm_17ded2
.asm_17deca .asm_17deca
ld a, [wc70b] ld a, [$c70b]
ld l, a ld l, a
ld a, [wc70c] ld a, [$c70c]
ld h, a ld h, a
.asm_17ded2 .asm_17ded2
@ -2320,7 +2320,7 @@ Function17de91: ; 17de91
Function17ded9: ; 17ded9 Function17ded9: ; 17ded9
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $001f ld bc, $001f
call CopyBytes call CopyBytes
call Function17e32b call Function17e32b
@ -2328,7 +2328,7 @@ Function17ded9: ; 17ded9
push af push af
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
ld hl, wc708 ld hl, $c708
ld a, [hli] ld a, [hli]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld [TempEnemyMonSpecies], a ld [TempEnemyMonSpecies], a
@ -2661,14 +2661,14 @@ asm_17e0ee
Function17e0fd: ; 17e0fd Function17e0fd: ; 17e0fd
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0006 ld bc, $0006
call CopyBytes call CopyBytes
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
ld hl, wc708 ld hl, $c708
ld a, [hli] ld a, [hli]
ld [CurItem], a ld [CurItem], a
ld a, [hli] ld a, [hli]
@ -2695,14 +2695,14 @@ Function17e0fd: ; 17e0fd
Function17e133: ; 17e133 Function17e133: ; 17e133
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0005 ld bc, $0005
call CopyBytes call CopyBytes
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
ld hl, wc708 ld hl, $c708
ld a, [hli] ld a, [hli]
ld [ScriptVar], a ld [ScriptVar], a
push hl push hl
@ -2726,14 +2726,14 @@ Function17e133: ; 17e133
Function17e165: ; 17e165 Function17e165: ; 17e165
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $0005 ld bc, $0005
call CopyBytes call CopyBytes
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
ld hl, wc708 ld hl, $c708
ld a, [hli] ld a, [hli]
ld [CurItem], a ld [CurItem], a
push hl push hl
@ -2763,31 +2763,31 @@ Function17e165: ; 17e165
Function17e1a1: ; 17e1a1 Function17e1a1: ; 17e1a1
call Function17e415 call Function17e415
ld de, wc708 ld de, $c708
ld bc, $000d ld bc, $000d
call CopyBytes call CopyBytes
ld a, [wc70a] ld a, [$c70a]
cp $c0 cp $c0
jr c, .asm_17e1bb jr c, .asm_17e1bb
ld a, [wc708] ld a, [$c708]
ld [rSVBK], a ld [rSVBK], a
jr .asm_17e1c1 jr .asm_17e1c1
.asm_17e1bb .asm_17e1bb
ld a, [wc708] ld a, [$c708]
call GetSRAMBank call GetSRAMBank
.asm_17e1c1 .asm_17e1c1
ld a, [wc709] ld a, [$c709]
ld l, a ld l, a
ld a, [wc70a] ld a, [$c70a]
ld h, a ld h, a
ld de, $c608 ld de, $c608
ld a, [wc70b] ld a, [$c70b]
ld c, a ld c, a
ld b, $0 ld b, $0
call CopyBytes call CopyBytes
ld a, [wc70a] ld a, [$c70a]
cp $c0 cp $c0
jr c, .asm_17e1e2 jr c, .asm_17e1e2
ld a, $4 ld a, $4
@ -2798,28 +2798,28 @@ Function17e1a1: ; 17e1a1
call CloseSRAM call CloseSRAM
.asm_17e1e5 .asm_17e1e5
ld a, [wc70e] ld a, [$c70e]
cp $c0 cp $c0
jr c, .asm_17e1f3 jr c, .asm_17e1f3
ld a, [wc70c] ld a, [$c70c]
ld [rSVBK], a ld [rSVBK], a
jr .asm_17e1f9 jr .asm_17e1f9
.asm_17e1f3 .asm_17e1f3
ld a, [wc70c] ld a, [$c70c]
call GetSRAMBank call GetSRAMBank
.asm_17e1f9 .asm_17e1f9
ld a, [wc70d] ld a, [$c70d]
ld l, a ld l, a
ld a, [wc70e] ld a, [$c70e]
ld h, a ld h, a
ld de, $c688 ld de, $c688
ld a, [wc70b] ld a, [$c70b]
ld c, a ld c, a
ld b, $0 ld b, $0
call CopyBytes call CopyBytes
ld a, [wc70e] ld a, [$c70e]
cp $c0 cp $c0
jr c, .asm_17e21a jr c, .asm_17e21a
ld a, $4 ld a, $4
@ -2830,7 +2830,7 @@ Function17e1a1: ; 17e1a1
call CloseSRAM call CloseSRAM
.asm_17e21d .asm_17e21d
ld a, [wc70b] ld a, [$c70b]
ld c, a ld c, a
ld hl, $c688 ld hl, $c688
ld de, $c608 ld de, $c608
@ -2846,23 +2846,23 @@ Function17e1a1: ; 17e1a1
.asm_17e231 .asm_17e231
dec c dec c
jr nz, .asm_17e227 jr nz, .asm_17e227
ld a, [wc711] ld a, [$c711]
ld l, a ld l, a
ld a, [wc712] ld a, [$c712]
ld h, a ld h, a
jr .asm_17e250 jr .asm_17e250
.asm_17e23e .asm_17e23e
ld a, [wEnemyGoesFirst] ld a, [$c70f]
ld l, a ld l, a
ld a, [wc710] ld a, [$c710]
ld h, a ld h, a
jr .asm_17e250 jr .asm_17e250
.asm_17e248 .asm_17e248
ld a, [wc712 + 1] ld a, [$c712 + 1]
ld l, a ld l, a
ld a, [wc712 + 2] ld a, [$c712 + 2]
ld h, a ld h, a
.asm_17e250 .asm_17e250
@ -3647,9 +3647,9 @@ Function17e691: ; 17e691
Function17e6de: ; 17e6de Function17e6de: ; 17e6de
push af push af
ld a, [wc708] ld a, [$c708]
ld l, a ld l, a
ld a, [wc709] ld a, [$c709]
ld h, a ld h, a
decoord 0, 0, AttrMap decoord 0, 0, AttrMap
add hl, de add hl, de
@ -4345,14 +4345,14 @@ Function17f382: ; 17f382
Function17f3c9: ; 17f3c9 Function17f3c9: ; 17f3c9
push bc push bc
ld hl, wcd36 ld hl, wcd36
ld de, wc708 ld de, $c708
ld bc, $000c ld bc, $000c
call CopyBytes call CopyBytes
pop de pop de
ld c, $0 ld c, $0
callba Function11c075 callba Function11c075
push hl push hl
ld hl, wc708 ld hl, $c708
ld de, wcd36 ld de, wcd36
ld bc, $000c ld bc, $000c
call CopyBytes call CopyBytes

251
wram.asm
View File

@ -359,23 +359,20 @@ TileMapEnd::
SECTION "Battle", WRAM0 SECTION "Battle", WRAM0
wc608::
wOddEgg:: party_struct OddEgg wOddEgg:: party_struct OddEgg
wOddEggName:: ds PKMN_NAME_LENGTH wOddEggName:: ds PKMN_NAME_LENGTH
wOddEggOTName:: ds PKMN_NAME_LENGTH wOddEggOTName:: ds PKMN_NAME_LENGTH
ds wOddEgg - @ ds wc608 - @
wBT_OTTemp:: battle_tower_struct wBT_OTTemp wBT_OTTemp:: battle_tower_struct wBT_OTTemp
ds wBT_OTTemp - @ ds wc608 - @
hall_of_fame wHallOfFameTemp hall_of_fame wHallOfFameTemp
ds wHallOfFameTemp - @ ds wc608 - @
wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2) wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2)
wBattle:: ds 10
wc608::
ds 7
wc60f::
ds 3
wc612:: wc612::
ds 10 ds 10
wInitHourBuffer:: ; c61c wInitHourBuffer:: ; c61c
@ -383,8 +380,9 @@ wInitHourBuffer:: ; c61c
wc626:: wc626::
ds wc608 - @ ds wc608 - @
wEnemyMoveStruct:: move_struct wEnemyMoveStruct wBattle::
wPlayerMoveStruct:: move_struct wPlayerMoveStruct wEnemyMoveStruct:: move_struct wEnemyMoveStruct ; c608
wPlayerMoveStruct:: move_struct wPlayerMoveStruct ; c60f
EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616 EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616
BattleMonNick:: ds PKMN_NAME_LENGTH ; c621 BattleMonNick:: ds PKMN_NAME_LENGTH ; c621
@ -542,17 +540,17 @@ PlayerDamageTaken:: ; c682
EnemyDamageTaken:: ; c684 EnemyDamageTaken:: ; c684
ds 2 ds 2
wBattleReward:: ds 3 wBattleReward:: ds 3 ; c686
wBattleAnimParam:: wBattleAnimParam::
wKickCounter:: wKickCounter::
wPresentPower:: ds 1 wPresentPower:: ds 1 ; c689
BattleScriptBuffer:: ; c68a BattleScriptBuffer:: ; c68a
ds 40 ds 40
BattleScriptBufferLoc:: ; c6b2 BattleScriptBufferLoc:: ; c6b2
ds 2 ds 2
wTurnEnded:: ds 1 wTurnEnded:: ds 1 ; c6b4
ds 1 ds 1
PlayerStats:: ; c6b6 PlayerStats:: ; c6b6
@ -592,10 +590,8 @@ EnemyDefLevel:: ; c6d5
ds 1 ds 1
EnemySpdLevel:: ; c6d6 EnemySpdLevel:: ; c6d6
ds 1 ds 1
wTownMapCursorLandmark::
EnemySAtkLevel:: ; c6d7 EnemySAtkLevel:: ; c6d7
ds 1 ds 1
wTownMapPlayerIconLandmark::
EnemySDefLevel:: ; c6d8 EnemySDefLevel:: ; c6d8
ds 1 ds 1
EnemyAccLevel:: ; c6d9 EnemyAccLevel:: ; c6d9
@ -616,7 +612,8 @@ PlayerSubstituteHP:: ; c6df
EnemySubstituteHP:: ; c6e0 EnemySubstituteHP:: ; c6e0
ds 1 ds 1
wc6e1:: ds 2 wUnusedPlayerLockedMove:: ds 1 ; c6e1
ds 1
CurPlayerMove:: ; c6e3 CurPlayerMove:: ; c6e3
ds 1 ds 1
CurEnemyMove:: ; c6e4 CurEnemyMove:: ; c6e4
@ -626,16 +623,12 @@ LinkBattleRNCount:: ; c6e5
; how far through the prng stream ; how far through the prng stream
ds 1 ds 1
wc6e6:: ds 1 wEnemyItemState:: ds 1 ; c6e6
wc6e7:: ds 1 ds 2
wc6e8:: ds 1
wc6e9::
CurEnemyMoveNum:: ; c6e9 CurEnemyMoveNum:: ; c6e9
ds 1 ds 1
wEnemyHPAtTimeOfPlayerSwitch:: wEnemyHPAtTimeOfPlayerSwitch:: ds 2 ; c6ea
wc6ea:: ds 1
wc6eb:: ds 1
wPayDayMoney:: ds 3 ; c6ec wPayDayMoney:: ds 3 ; c6ec
wSafariMonAngerCount:: ds 1 wSafariMonAngerCount:: ds 1
@ -649,12 +642,11 @@ DisabledMove:: ; c6f5
ds 1 ds 1
EnemyDisabledMove:: ; c6f6 EnemyDisabledMove:: ; c6f6
ds 1 ds 1
wc6f7:: ds 1 wWhichMonFaintedFirst:: ds 1
; exists so you can't counter on switch ; exists so you can't counter on switch
LastEnemyCounterMove:: ; c6f8 LastEnemyCounterMove:: ; c6f8
ds 1 ds 1
wc6f9::
LastPlayerCounterMove:: ; c6f9 LastPlayerCounterMove:: ; c6f9
ds 1 ds 1
@ -663,11 +655,9 @@ wEnemyMinimized:: ds 1 ; c6fa
AlreadyFailed:: ; c6fb AlreadyFailed:: ; c6fb
ds 1 ds 1
wc6fc:: ds 1 wBattleParticipantsIncludingFainted:: ds 1 ; c6fc
wc6fd:: ds 1 wDanger:: ds 1 ; c6fd
wc6fe::
wPlayerMinimized:: ds 1 ; c6fe wPlayerMinimized:: ds 1 ; c6fe
wc6ff::
PlayerScreens:: ; c6ff PlayerScreens:: ; c6ff
; bit ; bit
; 4 reflect ; 4 reflect
@ -676,34 +666,25 @@ PlayerScreens:: ; c6ff
; 0 spikes ; 0 spikes
ds 1 ds 1
wc700::
EnemyScreens:: ; c700 EnemyScreens:: ; c700
; see PlayerScreens ; see PlayerScreens
ds 1 ds 1
wc701::
PlayerSafeguardCount:: ; c701 PlayerSafeguardCount:: ; c701
ds 1 ds 1
wc702::
PlayerLightScreenCount:: ; c702 PlayerLightScreenCount:: ; c702
ds 1 ds 1
wc703::
PlayerReflectCount:: ; c703 PlayerReflectCount:: ; c703
ds 1 ds 1
wc704:: ds 1 ds 1
wc705::
EnemySafeguardCount:: ; c705 EnemySafeguardCount:: ; c705
ds 1 ds 1
wc706::
EnemyLightScreenCount:: ; c706 EnemyLightScreenCount:: ; c706
ds 1 ds 1
EnemyReflectCount:: ; c707 EnemyReflectCount:: ; c707
ds 1 ds 1
ds 2
wc708:: ds 1
wc709:: ds 1
wc70a::
Weather:: ; c70a Weather:: ; c70a
; 00 normal ; 00 normal
; 01 rain ; 01 rain
@ -714,81 +695,62 @@ Weather:: ; c70a
; 06 sandstorm subsided ; 06 sandstorm subsided
ds 1 ds 1
wc70b::
WeatherCount:: ; c70b WeatherCount:: ; c70b
; # turns remaining ; # turns remaining
ds 1 ds 1
wc70c::
LoweredStat:: ; c70c LoweredStat:: ; c70c
ds 1 ds 1
wc70d::
EffectFailed:: ; c70d EffectFailed:: ; c70d
ds 1 ds 1
wc70e::
FailedMessage:: ; c70e FailedMessage:: ; c70e
ds 1 ds 1
wc70f:: wEnemyGoesFirst:: ; c70f
wEnemyGoesFirst::
ds 1 ds 1
wc710::
wPlayerIsSwitching:: ds 1 ; c710 wPlayerIsSwitching:: ds 1 ; c710
wc711::
wEnemyIsSwitching:: ds 1 ; c711 wEnemyIsSwitching:: ds 1 ; c711
wc712::
PlayerUsedMoves:: ; c712 PlayerUsedMoves:: ; c712
; add a move that has been used once by the player ; add a move that has been used once by the player
; added in order of use ; added in order of use
ds NUM_MOVES ds NUM_MOVES
wc716:: ds 1 wEnemyAISwitchScore:: ds 1 ; c716
wEnemySwitchMonParam:: wEnemySwitchMonParam:: ds 1 ; c717
wc717:: ds 1 wEnemySwitchMonIndex:: ds 1 ; c718
wc718:: wTempLevel:: ds 1 ; c719
wEnemySwitchMonIndex:: ds 1 LastPlayerMon:: ds 1 ; c71a
wTempLevel::
wc719:: ds 1
LastPlayerMon:: ; c71a
wc71a:: ds 1
LastPlayerMove:: ; c71b LastPlayerMove:: ; c71b
ds 1 ds 1
LastEnemyMove:: ; c71c LastEnemyMove:: ; c71c
ds 1 ds 1
wPlayerFutureSightCount:: ds 1 wPlayerFutureSightCount:: ds 1 ; c71d
wEnemyFutureSightCount:: ds 1 wEnemyFutureSightCount:: ds 1 ; c71e
wc71f:: ds 1 wGivingExperienceToExpShareHolders:: ds 1 ; c71f
wc720:: ds 4 ; copy from/to EnemyMonBaseStats, length=7 wBackupEnemyMonBaseStats:: ds 5 ; c720
wc724:: ds 3 wBackupEnemyMonCatchRate:: db ; c725
wPlayerFutureSightDamage:: ds 2 wBackupEnemyMonBaseExp:: db ; c726
wEnemyFutureSightDamage:: ds 2 wPlayerFutureSightDamage:: ds 2 ; c727
wPlayerRageCounter:: ds 1 wEnemyFutureSightDamage:: ds 2 ; c729
wEnemyRageCounter:: ds 1 wPlayerRageCounter:: ds 1 ; c72b
wc72d:: ds 1 ; if 0 then PrintButItFailed wEnemyRageCounter:: ds 1 ; c72c
wc72e:: wBeatUpHitAtLeastOnce:: ds 1 ; c72d
wPlayerTrappingMove:: ds 1 wPlayerTrappingMove:: ds 1 ; c72e
wc72f:: wEnemyTrappingMove:: ds 1 ; c72f
wEnemyTrappingMove:: ds 1 wPlayerWrapCount:: ds 1 ; c730
wc730:: wEnemyWrapCount:: ds 1 ; c731
wPlayerWrapCount:: ds 1 wPlayerCharging:: ds 1 ; c732
wc731:: wEnemyCharging:: ds 1 ; c733
wEnemyWrapCount:: ds 1
wc732::
wPlayerCharging:: ds 1
wEnemyCharging::
wc733:: ds 1
wTradeAnimPointer::
wc734::
BattleEnded:: ; c734 BattleEnded:: ; c734
ds 1 ds 1
wWildMonMoves:: ds NUM_MOVES wWildMonMoves:: ds NUM_MOVES ; c735
wWildMonPP:: ds NUM_MOVES wWildMonPP:: ds NUM_MOVES ; c739
wAmuletCoin:: ds 1 wAmuletCoin:: ds 1 ; c73a
wSomeoneIsRampaging:: ds 1 wSomeoneIsRampaging:: ds 1 ; c73b
wPlayerJustGotFrozen:: ds 1 wPlayerJustGotFrozen:: ds 1 ; c73c
wEnemyJustGotFrozen:: ds 1 wEnemyJustGotFrozen:: ds 1 ; c73d
wBattleEnd:: wBattleEnd::
; Battle RAM ; Battle RAM
@ -798,6 +760,7 @@ wTrademons::
wPlayerTrademon:: trademon wPlayerTrademon wPlayerTrademon:: trademon wPlayerTrademon
wOTTrademon:: trademon wOTTrademon wOTTrademon:: trademon wOTTrademon
wTrademonsEnd:: wTrademonsEnd::
wTradeAnimPointer::
ds 2 ds 2
wLinkPlayer1Name:: ds NAME_LENGTH wLinkPlayer1Name:: ds NAME_LENGTH
wLinkPlayer2Name:: ds NAME_LENGTH wLinkPlayer2Name:: ds NAME_LENGTH
@ -827,7 +790,8 @@ wPokegearPhoneScrollPosition:: ds 1 ; c6d2
wPokegearPhoneSelectedPerson:: ds 1 ; c6d3 wPokegearPhoneSelectedPerson:: ds 1 ; c6d3
wPokegearPhoneSubmenuCursor:: ds 1 ; c6d4 wPokegearPhoneSubmenuCursor:: ds 1 ; c6d4
wPokegearMapCursorObjectPointer:: ds 2 ; c6d5 wPokegearMapCursorObjectPointer:: ds 2 ; c6d5
ds 2 wPokegearMapCursorLandmark:: ds 1 ; c6d7
wPokegearMapPlayerIconLandmark:: ds 1 ; c6d8
wPokegearRadioChannelBank:: ds 1 ; c6d9 wPokegearRadioChannelBank:: ds 1 ; c6d9
wPokegearRadioChannelAddr:: ds 2 ; c6da wPokegearRadioChannelAddr:: ds 2 ; c6da
wPokegearRadioMusicPlaying:: ds 1 ; c6dc wPokegearRadioMusicPlaying:: ds 1 ; c6dc
@ -2226,8 +2190,8 @@ wDudeKeyItems:: ds 18
wDudeKeyItemsEnd:: ds 1 wDudeKeyItemsEnd:: ds 1
wDudeNumBalls:: ds 1 ; d2a6 wDudeNumBalls:: ds 1 ; d2a6
wDudeBalls:: ds 2 * 4 wDudeBalls:: ds 2 * 4 ; d2a7
wDudeBallsEnd:: ds 1 wDudeBallsEnd:: ds 1 ; d2af
wDudeBagEnd:: wDudeBagEnd::
ds wDudeBag - @ ds wDudeBag - @
@ -2286,15 +2250,12 @@ ScriptDelay:: ; d44d
wPriorityScriptBank:: wPriorityScriptBank::
wScriptTextBank:: wScriptTextBank::
wd44e:: ds 1 ds 1 ; d44e
wPriorityScriptAddr:: wPriorityScriptAddr::
wScriptTextAddr:: wScriptTextAddr:: ds 2 ; d44f
wd44f:: ds 1 ds 1
wd450:: ds 1
wd451:: ds 1
wWildEncounterCooldown:: ds 1 wWildEncounterCooldown:: ds 1
wd453:: ds 1 wXYComparePointer:: ds 2
wd454:: ds 1
ds 4 ds 4
wBattleScriptFlags:: ds 2 wBattleScriptFlags:: ds 2
@ -2494,8 +2455,7 @@ CurTimeOfDay:: ; d848
ds 1 ds 1
wSecretID:: ds 1 wSecretID:: ds 2
wd84b:: ds 1
StatusFlags:: ; d84c StatusFlags:: ; d84c
; 0 - pokedex ; 0 - pokedex
; 1 - unown dex ; 1 - unown dex
@ -2581,7 +2541,8 @@ PlayerState:: ; d95d
ds 1 ds 1
wHallOfFameCount:: ds 2 wHallOfFameCount:: ds 2
wTradeFlags:: ds 2 wTradeFlags:: flag_array 6 ; d960
ds 1
MooMooBerries:: ; d962 MooMooBerries:: ; d962
ds 1 ; how many berries fed to MooMoo ds 1 ; how many berries fed to MooMoo
UndergroundSwitchPositions:: ; d963 UndergroundSwitchPositions:: ; d963
@ -2679,8 +2640,8 @@ wMobileBattleRoomTrigger:: ds 1 ; d9c0
;SECTION "Events", WRAMX, BANK [1] ;SECTION "Events", WRAMX, BANK [1]
wJackFightCount:: ds 1 wJackFightCount:: ds 1 ; d9f2
ds 1 wBeverlyFightCount:: ds 1 ; unused
wHueyFightCount:: ds 1 wHueyFightCount:: ds 1
wGavenFightCount:: ds 1 wGavenFightCount:: ds 1
wBethFightCount:: ds 1 wBethFightCount:: ds 1
@ -2693,23 +2654,21 @@ wLizFightCount:: ds 1
wAnthonyFightCount:: ds 1 wAnthonyFightCount:: ds 1
wToddFightCount:: ds 1 wToddFightCount:: ds 1
wGinaFightCount:: ds 1 wGinaFightCount:: ds 1
wIrwinFightCount:: ds 1 ; unused
wda00:: ds 1
wArnieFightCount:: ds 1 wArnieFightCount:: ds 1
wAlanFightCount:: ds 1 wAlanFightCount:: ds 1
wDanaFightCount:: ds 1 wDanaFightCount:: ds 1
wChadFightCount:: ds 1 wChadFightCount:: ds 1
ds 1 wDerekFightCount:: ds 1 ; unused
wTullyFightCount:: ds 1 wTullyFightCount:: ds 1
wBrentFightCount:: ds 1 wBrentFightCount:: ds 1
wTiffanyFightCount:: ds 1 wTiffanyFightCount:: ds 1
wVanceFightCount:: ds 1 wVanceFightCount:: ds 1
wWiltonFightCount:: ds 1 wWiltonFightCount:: ds 1
ds 1 wKenjiFightCount:: ds 1 ; unused
wParryFightCount:: ds 1 wParryFightCount:: ds 1
wErinFightCount:: ds 1 wErinFightCount:: ds 1
; da0e
ds 100 ds 100
EventFlags:: ; da72 EventFlags:: ; da72
@ -2736,32 +2695,22 @@ BikeFlags:: ; dbf5
ds 1 ds 1
ds 1 ds 1
wCurrentMapTriggerPointer:: ; dbf7 wCurrentMapTriggerPointer:: ds 2 ; dbf7
ds 2
wCurrentCaller:: ds 2 wCurrentCaller:: ds 2 ; dbf9
wCurrMapWarpCount:: ds 1 wCurrMapWarpCount:: ds 1 ; dbfb
wCurrMapWarpHeaderPointer:: ds 1 wCurrMapWarpHeaderPointer:: ds 2 ; dbfc
wdbfd:: ds 1 wCurrentMapXYTriggerCount:: ds 1 ; dbfe
wCurrentMapXYTriggerCount:: ds 1 wCurrentMapXYTriggerHeaderPointer:: ds 2 ; dbff
wCurrentMapXYTriggerHeaderPointer:: ds 1 wCurrentMapSignpostCount:: ds 1 ; dc01
wdc00:: ds 1 wCurrentMapSignpostHeaderPointer:: ds 2 ; dc02
wCurrentMapSignpostCount:: ds 1 wCurrentMapPersonEventCount:: ds 1 ; dc04
wCurrentMapSignpostHeaderPointer:: wCurrentMapPersonEventHeaderPointer:: ds 2 ; dc05
wdc02:: ds 1 wCurrMapTriggerCount:: ds 1 ; dc07
wdc03:: ds 1 wCurrMapTriggerHeaderPointer:: ds 2 ; dc08
wCurrentMapPersonEventCount:: wCurrMapCallbackCount:: ds 1 ; dc0a
wdc04:: ds 1 wCurrMapCallbackHeaderPointer:: ds 2 ; dc0b
wCurrentMapPersonEventHeaderPointer:: ds 2
wdc05:: ds 1
wdc06:: ds 1
wCurrMapTriggerCount:: ds 1
wCurrMapTriggerHeaderPointer:: ds 1
wdc09:: ds 1
wCurrMapCallbackCount:: ds 1
wCurrMapCallbackHeaderPointer:: ds 2
wdc0d:: ds 1
wdc0e:: ds 1
; Sprite id of each decoration ; Sprite id of each decoration
Bed:: ; dc0f Bed:: ; dc0f
@ -2782,40 +2731,32 @@ BigDoll:: ; dc16
ds 1 ds 1
; Items bought from Mom ; Items bought from Mom
wWhichMomItem:: wWhichMomItem:: ds 1 ; dc17
wdc17:: ds 1 wWhichMomItemSet:: ds 1 ; dc18
wWhichMomItemSet:: MomItemTriggerBalance:: ds 3 ; dc19
ds 1
MomItemTriggerBalance::
wdc19:: ds 1
wdc1a:: ds 1
wdc1b:: ds 1
wDailyResetTimer:: ds 2 wDailyResetTimer:: ds 2
DailyFlags:: ds 1 DailyFlags:: ds 1
WeeklyFlags:: ds 1 WeeklyFlags:: ds 1
SwarmFlags:: ds 1 SwarmFlags:: ds 1
wdc21:: ds 1 ds 2
wdc22:: ds 1
wStartDay:: ds 1 wStartDay:: ds 1
wdc24:: ds 2 ds 3
wdc26:: ds 1
FruitTreeFlags:: ; dc27 FruitTreeFlags:: flag_array NUM_FRUIT_TREES ; dc27
ds 1
ds 5 ds 2
wLuckyNumberDayBuffer:: ds 2 wLuckyNumberDayBuffer:: ds 2
ds 2 ds 2
wSpecialPhoneCallID:: ds 1 wSpecialPhoneCallID:: ds 1
ds 3 ds 3
wBugContestStartTime:: ds 4 ; day, hour, min, sec wBugContestStartTime:: ds 4 ; day, hour, min, sec
wdc39:: ds 1 wUnusedTwoDayTimerOn:: ds 1 ; dc39
wUnusedTwoDayTimer:: ds 1 wUnusedTwoDayTimer:: ds 1
wUnusedTwoDayTimerStartDate:: ds 1 wUnusedTwoDayTimerStartDate:: ds 1
ds 4 ds 4
wdc40:: ds 1 wMobileOrCable_LastSelection:: ds 1
wdc41:: ds 1 wdc41:: ds 1
wdc42:: ds 8 wdc42:: ds 8
wBuenasPassword:: ds 1 wBuenasPassword:: ds 1
@ -2842,6 +2783,7 @@ wParkBallsRemaining::
wSafariBallsRemaining:: ds 1 ; dc79 wSafariBallsRemaining:: ds 1 ; dc79
wSafariTimeRemaining:: ds 2 ; dc7a wSafariTimeRemaining:: ds 2 ; dc7a
wPhoneList:: ds CONTACT_LIST_SIZE ; dc7c wPhoneList:: ds CONTACT_LIST_SIZE ; dc7c
; dc86
ds 23 ds 23
wLuckyNumberShowFlag:: ds 2 ; dc9d wLuckyNumberShowFlag:: ds 2 ; dc9d
wLuckyIDNumber:: ds 2 ; dc9f wLuckyIDNumber:: ds 2 ; dc9f
@ -2966,11 +2908,7 @@ wEggNick:: ds PKMN_NAME_LENGTH ; df65
wEggOT:: ds NAME_LENGTH ; df70 wEggOT:: ds NAME_LENGTH ; df70
wEggMon:: box_struct wEggMon ; df7b wEggMon:: box_struct wEggMon ; df7b
wdf9b::
wBugContestSecondPartySpecies:: ds 1 wBugContestSecondPartySpecies:: ds 1
wdf9c::
wContestMon:: party_struct wContestMon ; df9c wContestMon:: party_struct wContestMon ; df9c
wDunsparceMapGroup:: ds 1 wDunsparceMapGroup:: ds 1
@ -2997,8 +2935,7 @@ wRoamMons_LastMapGroup:: ds 1
wBestMagikarpLengthFeet:: ds 1 wBestMagikarpLengthFeet:: ds 1
wBestMagikarpLengthInches:: ds 1 wBestMagikarpLengthInches:: ds 1
wMagikarpRecordHoldersName:: ds NAME_LENGTH wMagikarpRecordHoldersName:: ds NAME_LENGTH
wdff5:: ; dff5
wPokemonDataEnd:: wPokemonDataEnd::
wGameDataEnd:: wGameDataEnd::