From 2ed6c357af335a1df33932383c00375b799300b2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Jan 2016 12:46:18 -0500 Subject: [PATCH] More WRAM tidying --- battle/ai/items.asm | 2 +- battle/ai/scoring.asm | 8 +- battle/ai/switch.asm | 36 +- battle/bg_effects.asm | 4 +- battle/core.asm | 150 +++---- battle/effect_commands.asm | 10 +- battle/misc.asm | 4 +- constants/map_constants.asm | 61 +-- engine/breeding/egg.asm | 4 +- engine/debug.asm | 8 +- engine/engine_flags.asm | 2 +- engine/events.asm | 4 +- engine/events_3.asm | 2 +- engine/evolve.asm | 19 +- engine/intro_menu.asm | 8 +- engine/npctrade.asm | 25 +- engine/phone.asm | 76 ++-- engine/pokedex.asm | 60 +-- engine/pokegear.asm | 32 +- engine/predef.asm | 6 +- engine/scripting.asm | 4 +- engine/trade/animation.asm | 4 +- engine/trainer_card.asm | 4 +- event/halloffame.asm | 56 ++- event/mom_phone.asm | 2 +- event/photo.asm | 8 +- gfx/pics/animation.asm | 8 +- home.asm | 4 +- home/audio.asm | 2 +- home/map.asm | 38 +- home/mobile.asm | 4 +- hram.asm | 2 +- items/item_effects.asm | 2 +- main.asm | 22 +- misc/mobile_22.asm | 4 +- misc/mobile_40.asm | 789 ++++++++++++++++++------------------ misc/mobile_42.asm | 8 +- misc/mobile_45.asm | 573 +++++++++++++------------- misc/mobile_46.asm | 32 +- misc/mobile_5c.asm | 40 +- misc/mobile_5f.asm | 296 +++++++------- wram.asm | 251 +++++------- 42 files changed, 1309 insertions(+), 1365 deletions(-) diff --git a/battle/ai/items.asm b/battle/ai/items.asm index 2fb479590..f5d22d786 100644 --- a/battle/ai/items.asm +++ b/battle/ai/items.asm @@ -549,7 +549,7 @@ AIUpdateHUD: ; 38387 callba UpdateEnemyHUD ld a, $1 ld [hBGMapMode], a - ld hl, wc6e6 + ld hl, wEnemyItemState dec [hl] scf ret diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm index 5445671ac..e9df9c62a 100644 --- a/battle/ai/scoring.asm +++ b/battle/ai/scoring.asm @@ -982,7 +982,7 @@ AI_Smart_Whirlwind: ; 38a2a push hl callab CheckPlayerMoveTypeMatchups - ld a, [wc716] + ld a, [wEnemyAISwitchScore] cp 10 ; neutral pop hl 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. push hl callab CheckPlayerMoveTypeMatchups - ld a, [wc716] + ld a, [wEnemyAISwitchScore] cp $b ; not very effective pop hl ret nc @@ -2170,7 +2170,7 @@ AI_Smart_PerishSong: ; 38f4a push hl callab CheckPlayerMoveTypeMatchups - ld a, [wc716] + ld a, [wEnemyAISwitchScore] cp 10 ; 1.0 pop hl ret c @@ -2432,7 +2432,7 @@ AI_Smart_BatonPass: ; 39062 push hl callab CheckPlayerMoveTypeMatchups - ld a, [wc716] + ld a, [wEnemyAISwitchScore] cp 10 ; neutral pop hl ret c diff --git a/battle/ai/switch.asm b/battle/ai/switch.asm index 62a6bcd83..8209d8f2a 100755 --- a/battle/ai/switch.asm +++ b/battle/ai/switch.asm @@ -6,7 +6,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e push de push bc ld a, 10 - ld [wc716], a + ld [wEnemyAISwitchScore], a ld hl, PlayerUsedMoves ld a, [hl] and a @@ -167,17 +167,17 @@ endr .DecreaseScore: ; 34931 - ld a, [wc716] + ld a, [wEnemyAISwitchScore] dec a - ld [wc716], a + ld [wEnemyAISwitchScore], a ret ; 34939 .IncreaseScore: ; 34939 - ld a, [wc716] + ld a, [wEnemyAISwitchScore] inc a - ld [wc716], a + ld [wEnemyAISwitchScore], a ret ; 34941 @@ -206,7 +206,7 @@ CheckAbleToSwitch: ; 34941 cp 2 jr nz, .not_2 - ld a, [wc716] + ld a, [wEnemyAISwitchScore] add $30 ld [wEnemySwitchMonParam], a ret @@ -230,7 +230,7 @@ CheckAbleToSwitch: ; 34941 .no_perish call CheckPlayerMoveTypeMatchups - ld a, [wc716] + ld a, [wEnemyAISwitchScore] cp 11 ret nc @@ -239,13 +239,13 @@ CheckAbleToSwitch: ; 34941 jr z, .no_last_counter_move call Function34a2a - ld a, [wc716] + ld a, [wEnemyAISwitchScore] and a jr z, .no_last_counter_move ld c, a call Function34aa7 - ld a, [wc716] + ld a, [wEnemyAISwitchScore] cp $ff ret z @@ -255,7 +255,7 @@ CheckAbleToSwitch: ; 34941 jr z, .not_2_again call CheckPlayerMoveTypeMatchups - ld a, [wc716] + ld a, [wEnemyAISwitchScore] cp 10 ret nc @@ -267,7 +267,7 @@ CheckAbleToSwitch: ; 34941 .not_2_again ld c, $10 call CheckPlayerMoveTypeMatchups - ld a, [wc716] + ld a, [wEnemyAISwitchScore] cp 10 jr nc, .okay ld c, $20 @@ -280,7 +280,7 @@ CheckAbleToSwitch: ; 34941 .no_last_counter_move call CheckPlayerMoveTypeMatchups - ld a, [wc716] + ld a, [wEnemyAISwitchScore] cp 10 ret nc @@ -293,7 +293,7 @@ CheckAbleToSwitch: ; 34941 cp $2 ret nz - ld a, [wc716] + ld a, [wEnemyAISwitchScore] add $10 ld [wEnemySwitchMonParam], a ret @@ -359,7 +359,7 @@ Function34a2a: ; 34a2a ld c, 1 << (PARTY_LENGTH - 1) ld d, 0 xor a - ld [wc716], a + ld [wEnemyAISwitchScore], a .asm_34a39 ld a, [CurOTMon] @@ -395,9 +395,9 @@ Function34a2a: ; 34a2a and a jr nz, .asm_34a77 - ld a, [wc716] + ld a, [wEnemyAISwitchScore] or c - ld [wc716], a + ld [wEnemyAISwitchScore], a .asm_34a77 pop hl dec b @@ -451,7 +451,7 @@ Function34a85: ; 34a85 Function34aa7: ; 34aa7 ld a, $ff - ld [wc716], a + ld [wEnemyAISwitchScore], a ld hl, OTPartyMon1Moves ld b, 1 << (PARTY_LENGTH - 1) ld d, 0 @@ -540,7 +540,7 @@ Function34aa7: ; 34aa7 jr nc, .loop2 ld a, c - ld [wc716], a + ld [wEnemyAISwitchScore], a pop bc ret ; 34b20 diff --git a/battle/bg_effects.asm b/battle/bg_effects.asm index 188a3e43d..b03e3aea5 100644 --- a/battle/bg_effects.asm +++ b/battle/bg_effects.asm @@ -748,7 +748,7 @@ endr jr z, .clear cp -3 jr z, .skip - call .FillBox + call .PlaceGraphic .skip call BattleBGEffects_IncrementJumptable ld a, $1 @@ -798,7 +798,7 @@ endr pop bc ret -.FillBox +.PlaceGraphic ; get dims push bc push hl diff --git a/battle/core.asm b/battle/core.asm index 5355df23a..f8f6340a8 100644 --- a/battle/core.asm +++ b/battle/core.asm @@ -3,7 +3,7 @@ BattleCore: DoBattle: ; 3c000 xor a ld [wBattleParticipantsNotFainted], a - ld [wc6fc], a + ld [wBattleParticipantsIncludingFainted], a ld [wPlayerAction], a ld [BattleEnded], a inc a @@ -2110,8 +2110,8 @@ HandleEnemyMonFaint: ; 3cd55 or [hl] call z, FaintYourPokemon xor a - ld [wc6f7], a - call Function3ce01 + ld [wWhichMonFaintedFirst], a + call UpdateBattleStateAndExperienceAfterEnemyFaint call CheckPlayerPartyForFitPkmn ld a, d and a @@ -2202,7 +2202,7 @@ DoubleSwitch: ; 3cdca ret ; 3ce01 -Function3ce01: ; 3ce01 +UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01 call UpdateBattleMonInParty ld a, [wBattleMode] dec a @@ -2231,14 +2231,14 @@ Function3ce01: ; 3ce01 .wild2 call StopDangerSound ld a, $1 - ld [wc6fd], a + ld [wDanger], a .trainer ld hl, BattleMonHP ld a, [hli] or [hl] jr nz, .player_mon_did_not_faint - ld a, [wc6f7] + ld a, [wWhichMonFaintedFirst] and a jr nz, .player_mon_did_not_faint call PlayerMonFaintHappinessMod @@ -2256,10 +2256,10 @@ Function3ce01: ; 3ce01 ld a, [wBattleResult] and $c0 ld [wBattleResult], a - call DoOthersShareExperience + call IsAnyMonHoldingExpShare jr z, .skip_exp ld hl, EnemyMonBaseStats - ld b, $7 + ld b, EnemyMonEnd - EnemyMonBaseStats .loop srl [hl] inc hl @@ -2268,32 +2268,32 @@ Function3ce01: ; 3ce01 .skip_exp ld hl, EnemyMonBaseStats - ld de, wc720 + ld de, wBackupEnemyMonBaseStats ld bc, EnemyMonEnd - EnemyMonBaseStats call CopyBytes xor a - ld [wc71f], a + ld [wGivingExperienceToExpShareHolders], a call GiveExperiencePoints - call DoOthersShareExperience + call IsAnyMonHoldingExpShare ret z ld a, [wBattleParticipantsNotFainted] push af ld a, d ld [wBattleParticipantsNotFainted], a - ld hl, wc720 + ld hl, wBackupEnemyMonBaseStats ld de, EnemyMonBaseStats ld bc, EnemyMonEnd - EnemyMonBaseStats call CopyBytes ld a, $1 - ld [wc71f], a + ld [wGivingExperienceToExpShareHolders], a call GiveExperiencePoints pop af ld [wBattleParticipantsNotFainted], a ret ; 3ceaa -DoOthersShareExperience: ; 3ceaa +IsAnyMonHoldingExpShare: ; 3ceaa ld a, [PartyCount] ld b, a ld hl, PartyMon1 @@ -2465,7 +2465,7 @@ WinTrainerBattle: ; 3cfa4 ; Player won the battle call StopDangerSound ld a, $1 - ld [wc6fd], a + ld [wDanger], a ld [BattleEnded], a ld a, [wLinkMode] and a @@ -2682,7 +2682,7 @@ PlayVictoryMusic: ; 3d0ea dec a jr nz, .trainer_victory push de - call DoOthersShareExperience + call IsAnyMonHoldingExpShare pop de jr nz, .play_music ld hl, wPayDayMoney @@ -2771,7 +2771,7 @@ HandlePlayerMonFaint: ; 3d14e or [hl] call z, FaintEnemyPokemon ld a, $1 - ld [wc6f7], a + ld [wWhichMonFaintedFirst], a call PlayerMonFaintHappinessMod call CheckPlayerPartyForFitPkmn ld a, d @@ -2781,7 +2781,7 @@ HandlePlayerMonFaint: ; 3d14e ld a, [hli] or [hl] jr nz, .notfainted - call Function3ce01 + call UpdateBattleStateAndExperienceAfterEnemyFaint ld a, [wBattleMode] dec a jr nz, .trainer @@ -2847,7 +2847,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa and %11000000 add $1 ld [wBattleResult], a - ld a, [wc6f7] + ld a, [wWhichMonFaintedFirst] and a ret z ret ; ?????????? @@ -3338,7 +3338,7 @@ EnemySwitch: ; 3d4e1 ; If we're here, then we're switching too xor a ld [wBattleParticipantsNotFainted], a - ld [wc6fc], a + ld [wBattleParticipantsIncludingFainted], a ld [wPlayerAction], a inc a ld [wEnemyIsSwitching], a @@ -3403,7 +3403,7 @@ ResetEnemyBattleVars: ; 3d557 ld [LastEnemyMove], a ld [CurEnemyMove], a dec a - ld [wc6e6], a + ld [wEnemyItemState], a xor a ld [wPlayerWrapCount], a hlcoord 18, 0 @@ -3416,7 +3416,7 @@ ResetEnemyBattleVars: ; 3d557 ResetBattleParticipants: ; 3d57a xor a ld [wBattleParticipantsNotFainted], a - ld [wc6fc], a + ld [wBattleParticipantsIncludingFainted], a AddBattleParticipant: ; 3d581 ld a, [CurBattleMon] ld c, a @@ -3425,7 +3425,7 @@ AddBattleParticipant: ; 3d581 push bc predef FlagPredef pop bc - ld hl, wc6fc + ld hl, wBattleParticipantsIncludingFainted predef_jump FlagPredef ; 3d599 @@ -4250,7 +4250,7 @@ SendOutPlayerMon: ; 3db5f ld [hBGMapMode], a call GetMonBackpic xor a - ld [hFillBox], a + ld [hGraphicStartTile], a ld [wd0d2], a ld [CurMoveNum], a ld [TypeModifier], a @@ -4418,7 +4418,7 @@ PursuitSwitch: ; 3dc5b ld [CryTracks], a ld a, [BattleMonSpecies] call PlayStereoCry - ld a, [wc71a] + ld a, [LastPlayerMon] ld c, a ld hl, wBattleParticipantsNotFainted ld b, RESET_FLAG @@ -4887,7 +4887,7 @@ CheckDanger: ; 3df9e ld a, [hli] or [hl] jr z, .no_danger - ld a, [wc6fd] + ld a, [wDanger] and a jr nz, .done ld a, [PlayerHPPal] @@ -5771,7 +5771,7 @@ MoveSelectionScreen: ; 3e4bc dec a cp c jr z, .move_disabled - ld a, [wc6e1] + ld a, [wUnusedPlayerLockedMove] and a jr nz, .skip2 ld a, [wMenuCursorY] @@ -7383,7 +7383,7 @@ GiveExperiencePoints: ; 3ee3b bit 0, a ret nz - call Function3f0d4 + call .EvenlyDivideExpAmongParticipants xor a ld [CurPartyMon], a ld bc, PartyMon1Species @@ -7407,6 +7407,7 @@ GiveExperiencePoints: ; 3ee3b pop bc jp z, .skip_stats +; give stat exp ld hl, MON_STAT_EXP + 1 add hl, bc ld d, h @@ -7472,6 +7473,7 @@ GiveExperiencePoints: ; 3ee3b ld [hDivisor], a ld b, 4 call Divide +; Boost Experience for traded Pokemon pop bc ld hl, MON_ID add hl, bc @@ -7489,10 +7491,12 @@ GiveExperiencePoints: ; 3ee3b ld a, $1 .no_boost +; Boost experience for a Trainer Battle ld [StringBuffer2 + 2], a ld a, [wBattleMode] dec a call nz, BoostExp +; Boost experience for Lucky Egg push bc ld a, MON_ITEM call GetPartyParamLocation @@ -7513,7 +7517,7 @@ GiveExperiencePoints: ; 3ee3b ld a, [StringBuffer2] ld [hQuotient + 1], a pop bc - call Function3f136 + call AnimateExpBar push bc call LoadTileMapToTempTileMap pop bc @@ -7748,26 +7752,26 @@ GiveExperiencePoints: ; 3ee3b jp ResetBattleParticipants ; 3f0d4 -Function3f0d4: ; 3f0d4 +.EvenlyDivideExpAmongParticipants ; count number of battle participants ld a, [wBattleParticipantsNotFainted] ld b, a ld c, PARTY_LENGTH ld d, 0 -.loop +.count_loop xor a srl b adc d ld d, a dec c - jr nz, .loop + jr nz, .count_loop cp 2 ret c ld [wd265], a ld hl, EnemyMonBaseStats ld c, EnemyMonEnd - EnemyMonBaseStats -.loop2 +.count_loop2 xor a ld [hDividend + 0], a ld a, [hl] @@ -7779,7 +7783,7 @@ Function3f0d4: ; 3f0d4 ld a, [hQuotient + 2] ld [hli], a dec c - jr nz, .loop2 + jr nz, .count_loop2 ret ; 3f106 @@ -7827,7 +7831,7 @@ TextJump_StringBuffer2ExpPoints: ; 3f131 ; 3f136 -Function3f136: ; 3f136 +AnimateExpBar: ; 3f136 push bc ld hl, CurPartyMon @@ -7864,15 +7868,15 @@ Function3f136: ; 3f136 ld a, [wd003] adc [hl] ld [hld], a - jr nc, .asm_3f186 + jr nc, .NoOverflow inc [hl] - jr nz, .asm_3f186 + jr nz, .NoOverflow ld a, $ff ld [hli], a ld [hli], a ld [hl], a -.asm_3f186 +.NoOverflow ld d, MAX_LEVEL callab CalcExpAtLevel ld a, [hProduct + 1] @@ -7888,7 +7892,7 @@ Function3f136: ; 3f136 sbc c ld a, [hl] sbc b - jr c, .asm_3f1a8 + jr c, .AlreadyAtMaxExp ld a, b ld [hli], a ld a, c @@ -7896,37 +7900,37 @@ Function3f136: ; 3f136 ld a, d ld [hld], a -.asm_3f1a8 +.AlreadyAtMaxExp callab CalcLevel ld a, d pop bc pop de ld d, a cp e - jr nc, .asm_3f1b7 + jr nc, .LoopLevels ld a, e ld d, a -.asm_3f1b7 +.LoopLevels ld a, e cp MAX_LEVEL - jr nc, .asm_3f1ff + jr nc, .FinishExpBar cp d - jr z, .asm_3f1ff + jr z, .FinishExpBar inc a ld [TempMonLevel], a ld [CurPartyLevel], a ld [BattleMonLevel], a push de - call Function3f21b + call .PlayExpBarSound ld c, $40 - call Function3f22c + call .LoopBarAnimation call PrintPlayerHUD ld hl, BattleMonNick ld de, StringBuffer1 ld bc, PKMN_NAME_LENGTH call CopyBytes - call Function3dfe + call TerminateExpBarSound ld de, SFX_HIT_END_OF_EXP_BAR call PlaySFX callba AnimateEndOfExpBar @@ -7936,9 +7940,9 @@ Function3f136: ; 3f136 pop de inc e ld b, $0 - jr .asm_3f1b7 + jr .LoopLevels -.asm_3f1ff +.FinishExpBar push bc ld b, d ld de, TempMonExp + 2 @@ -7946,9 +7950,9 @@ Function3f136: ; 3f136 ld a, b pop bc ld c, a - call Function3f21b - call Function3f22c - call Function3dfe + call .PlayExpBarSound + call .LoopBarAnimation + call TerminateExpBarSound pop af ld [hProduct + 2], a pop af @@ -7957,9 +7961,8 @@ Function3f136: ; 3f136 .finish pop bc ret -; 3f21b -Function3f21b: ; 3f21b +.PlayExpBarSound push bc call WaitSFX ld de, SFX_EXP_BAR @@ -7968,12 +7971,11 @@ Function3f21b: ; 3f21b call DelayFrames pop bc ret -; 3f22c -Function3f22c: ; 3f22c - ld d, $3 +.LoopBarAnimation + ld d, 3 dec b -.asm_3f22f +.anim_loop inc b push bc push de @@ -7989,7 +7991,7 @@ Function3f22c: ; 3f22c pop bc ld a, c cp b - jr z, .asm_3f268 + jr z, .end_animation inc b push bc push de @@ -8003,16 +8005,14 @@ Function3f22c: ; 3f22c xor a ld [hBGMapMode], a dec d - jr nz, .asm_3f263 - ld d, $1 - -.asm_3f263 + jr nz, .min_number_of_frames + ld d, 1 +.min_number_of_frames pop bc ld a, c cp b - jr nz, .asm_3f22f - -.asm_3f268 + jr nz, .anim_loop +.end_animation ld a, $1 ld [hBGMapMode], a ret @@ -8575,12 +8575,12 @@ InitEnemyTrainer: ; 3f594 ld de, VTiles2 callab GetTrainerPic xor a - ld [hFillBox], a + ld [hGraphicStartTile], a dec a - ld [wc6e6], a + ld [wEnemyItemState], a hlcoord 12, 0 lb bc, 7, 7 - predef FillBox + predef PlaceGraphic ld a, -1 ld [CurOTMon], a ld a, TRAINER_BATTLE @@ -8640,10 +8640,10 @@ InitEnemyWildmon: ; 3f607 predef FrontpicPredef xor a ld [TrainerClass], a - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 12, 0 lb bc, 7, 7 - predef FillBox + predef PlaceGraphic ret ; 3f662 @@ -9402,10 +9402,10 @@ InitBattleDisplay: ; 3fb6c ld a, $1 ld [hBGMapMode], a ld a, $31 - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 2, 6 lb bc, 6, 6 - predef FillBox + predef PlaceGraphic xor a ld [hWY], a ld [rWY], a @@ -9499,10 +9499,10 @@ CopyBackpic: ; 3fc30 ld [rSVBK], a call Function3fc5b ld a, $31 - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 2, 6 lb bc, 6, 6 - predef FillBox + predef PlaceGraphic ret ; 3fc5b diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm index b2712937f..856a1da7f 100644 --- a/battle/effect_commands.asm +++ b/battle/effect_commands.asm @@ -3155,7 +3155,7 @@ BattleCommand_BeatUp: ; 35461 xor a ld [PlayerRolloutCount], a ld [wd002], a - ld [wc72d], a + ld [wBeatUpHitAtLeastOnce], a jr .got_mon .next_mon @@ -3188,7 +3188,7 @@ BattleCommand_BeatUp: ; 35461 jp nz, .beatup_fail ld a, $1 - ld [wc72d], a + ld [wBeatUpHitAtLeastOnce], a ld hl, BeatUpAttackText call StdBattleTextBox ld a, [EnemyMonSpecies] @@ -3223,7 +3223,7 @@ BattleCommand_BeatUp: ; 35461 xor a ld [EnemyRolloutCount], a ld [wd002], a - ld [wc72d], a + ld [wBeatUpHitAtLeastOnce], a jr .enemy_continue .not_first_enemy_beatup @@ -3283,7 +3283,7 @@ BattleCommand_BeatUp: ; 35461 jr nz, .beatup_fail ld a, $1 - ld [wc72d], a + ld [wBeatUpHitAtLeastOnce], a jr .finish_beatup .wild @@ -3332,7 +3332,7 @@ BattleCommand_BeatUp: ; 35461 BattleCommanda8: ; 355b5 - ld a, [wc72d] + ld a, [wBeatUpHitAtLeastOnce] and a ret nz diff --git a/battle/misc.asm b/battle/misc.asm index d47573df9..beb9ce333 100644 --- a/battle/misc.asm +++ b/battle/misc.asm @@ -32,8 +32,8 @@ AppearUser: ; fbd77 (3e:7d77) call GetPlayerBackpicCoords ld a, $31 .okay - ld [hFillBox], a - predef FillBox + ld [hGraphicStartTile], a + predef PlaceGraphic FinishAppearDisappearUser: ; fbd91 (3e:7d91) ld a, $1 ld [hBGMapMode], a diff --git a/constants/map_constants.asm b/constants/map_constants.asm index ede44c546..bedcf29dd 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -668,36 +668,37 @@ EMOTE_OBJECT EQU 7 ; fruit trees const_value SET 1 - const FRUITTREE_ROUTE_29 - const FRUITTREE_ROUTE_30_1 - const FRUITTREE_ROUTE_38 - const FRUITTREE_ROUTE_46_1 - const FRUITTREE_ROUTE_30_2 - const FRUITTREE_ROUTE_33 - const FRUITTREE_ROUTE_31 - const FRUITTREE_ROUTE_43 - const FRUITTREE_VIOLET_CITY - const FRUITTREE_ROUTE_46_2 - const FRUITTREE_ROUTE_35 - const FRUITTREE_ROUTE_45 - const FRUITTREE_ROUTE_36 - const FRUITTREE_ROUTE_26 - const FRUITTREE_ROUTE_39 - const FRUITTREE_ROUTE_44 - const FRUITTREE_ROUTE_37_1 - const FRUITTREE_ROUTE_37_2 - const FRUITTREE_ROUTE_37_3 - const FRUITTREE_AZALEA_TOWN - const FRUITTREE_ROUTE_42_1 - const FRUITTREE_ROUTE_42_2 - const FRUITTREE_ROUTE_42_3 - const FRUITTREE_ROUTE_11 - const FRUITTREE_ROUTE_2 - const FRUITTREE_ROUTE_1 - const FRUITTREE_ROUTE_8 - const FRUITTREE_PEWTER_CITY_1 - const FRUITTREE_PEWTER_CITY_2 - const FRUITTREE_FUCHSIA_CITY + const FRUITTREE_ROUTE_29 ; 01 + const FRUITTREE_ROUTE_30_1 ; 02 + const FRUITTREE_ROUTE_38 ; 03 + const FRUITTREE_ROUTE_46_1 ; 04 + const FRUITTREE_ROUTE_30_2 ; 05 + const FRUITTREE_ROUTE_33 ; 06 + const FRUITTREE_ROUTE_31 ; 07 + const FRUITTREE_ROUTE_43 ; 08 + const FRUITTREE_VIOLET_CITY ; 09 + const FRUITTREE_ROUTE_46_2 ; 0a + const FRUITTREE_ROUTE_35 ; 0b + const FRUITTREE_ROUTE_45 ; 0c + const FRUITTREE_ROUTE_36 ; 0d + const FRUITTREE_ROUTE_26 ; 0e + const FRUITTREE_ROUTE_39 ; 0f + const FRUITTREE_ROUTE_44 ; 10 + const FRUITTREE_ROUTE_37_1 ; 11 + const FRUITTREE_ROUTE_37_2 ; 12 + const FRUITTREE_ROUTE_37_3 ; 13 + const FRUITTREE_AZALEA_TOWN ; 14 + const FRUITTREE_ROUTE_42_1 ; 15 + const FRUITTREE_ROUTE_42_2 ; 16 + const FRUITTREE_ROUTE_42_3 ; 17 + const FRUITTREE_ROUTE_11 ; 18 + const FRUITTREE_ROUTE_2 ; 19 + const FRUITTREE_ROUTE_1 ; 1a + const FRUITTREE_ROUTE_8 ; 1b + const FRUITTREE_PEWTER_CITY_1 ; 1c + const FRUITTREE_PEWTER_CITY_2 ; 1d + const FRUITTREE_FUCHSIA_CITY ; 1e +NUM_FRUIT_TREES EQU const_value +- 1 CMDQUEUE_TYPE EQU 0 CMDQUEUE_ADDR EQU 1 diff --git a/engine/breeding/egg.asm b/engine/breeding/egg.asm index 0573e2ecd..cfe4d9a1c 100755 --- a/engine/breeding/egg.asm +++ b/engine/breeding/egg.asm @@ -677,9 +677,9 @@ Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) ld a, b ld [hBGMapAddress + 1], a ld a, c - ld [hFillBox], a + ld [hGraphicStartTile], a lb bc, 7, 7 - predef FillBox + predef PlaceGraphic pop af call Hatch_LoadFrontpicPal call SetPalettes diff --git a/engine/debug.asm b/engine/debug.asm index df5dbee56..d69cd254b 100755 --- a/engine/debug.asm +++ b/engine/debug.asm @@ -401,10 +401,10 @@ Function81adb: ; 81adb ld de, VTiles2 tile $31 predef GetBackpic ld a, $31 - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 2, 4 lb bc, 6, 6 - predef FillBox + predef PlaceGraphic ld a, [wd003] and a jr z, .asm_81b66 @@ -433,10 +433,10 @@ Function81adb: ; 81adb callab GetTrainerPic xor a ld [TempEnemyMonSpecies], a - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 2, 3 lb bc, 7, 7 - predef FillBox + predef PlaceGraphic .asm_81ba9 ld a, $1 diff --git a/engine/engine_flags.asm b/engine/engine_flags.asm index d8be9c494..2b441bab4 100644 --- a/engine/engine_flags.asm +++ b/engine/engine_flags.asm @@ -108,7 +108,7 @@ ENDM engine_flag wMomSavingMoney, 0 ; mom saving money ; $8 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, 1 ; unown dex diff --git a/engine/events.asm b/engine/events.asm index 5e6e359cd..9b701be8a 100644 --- a/engine/events.asm +++ b/engine/events.asm @@ -124,8 +124,8 @@ StartMap: ; 96724 call ClearJoypad EnterMap: ; 9673e xor a - ld [wd453], a - ld [wd454], a + ld [wXYComparePointer], a + ld [wXYComparePointer + 1], a call SetUpFiveStepWildEncounterCooldown callba RunMapSetupScript call DisableEvents diff --git a/engine/events_3.asm b/engine/events_3.asm index 57554d3f1..55dc59a1a 100755 --- a/engine/events_3.asm +++ b/engine/events_3.asm @@ -288,7 +288,7 @@ CheckForHiddenItems: ; b8172 add SCREEN_HEIGHT / 4 ld [wd1ec], a ; Get the pointer for the first signpost header in the map... - ld hl, wdc02 + ld hl, wCurrentMapSignpostHeaderPointer ld a, [hli] ld h, [hl] ld l, a diff --git a/engine/evolve.asm b/engine/evolve.asm index 4a959529a..b04a245e0 100755 --- a/engine/evolve.asm +++ b/engine/evolve.asm @@ -6,7 +6,6 @@ EvolvePokemon: ; 421d8 ld c, a ld b, SET_FLAG call EvoFlagAction - EvolveAfterBattle: ; 421e6 xor a ld [wMonTriedToEvolve], a @@ -19,7 +18,7 @@ EvolveAfterBattle: ; 421e6 push hl -CheckForEvolvablePokemon: ; 421f5 +EvolveAfterBattle_MasterLoop ld hl, CurPartyMon inc [hl] @@ -28,7 +27,7 @@ CheckForEvolvablePokemon: ; 421f5 inc hl ld a, [hl] cp $ff - jp z, Evolution_ReturnToMap + jp z, .ReturnToMap ld [Buffer1], a @@ -40,7 +39,7 @@ CheckForEvolvablePokemon: ; 421f5 call EvoFlagAction ld a, c and a - jp z, CheckForEvolvablePokemon + jp z, EvolveAfterBattle_MasterLoop ld a, [Buffer1] dec a @@ -63,7 +62,7 @@ endr .loop ld a, [hli] and a - jr z, CheckForEvolvablePokemon + jr z, EvolveAfterBattle_MasterLoop ld b, a @@ -324,7 +323,7 @@ endr push hl ld l, e ld h, d - jp CheckForEvolvablePokemon + jp EvolveAfterBattle_MasterLoop ; 423f8 .dont_evolve_1 @@ -334,12 +333,10 @@ endr .dont_evolve_3 inc hl jp .loop -; 423fe -; dummy pop +; XXX pop hl - -Evolution_ReturnToMap: ; 423ff +.ReturnToMap pop de pop bc pop hl @@ -393,7 +390,7 @@ CancelEvolution: ; 42454 call PrintText call ClearTileMap pop hl - jp CheckForEvolvablePokemon + jp EvolveAfterBattle_MasterLoop ; 42461 IsMonHoldingEverstone: ; 42461 diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm index 42a8943ed..6ece8e384 100755 --- a/engine/intro_menu.asm +++ b/engine/intro_menu.asm @@ -947,10 +947,10 @@ Intro_PrepTrainerPic: ; 619c ld de, VTiles2 callba GetTrainerPic xor a - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 6, 4 lb bc, 7, 7 - predef FillBox + predef PlaceGraphic ret ; 61b4 @@ -959,10 +959,10 @@ ShrinkFrame: ; 61b4 ld c, $31 predef DecompressPredef xor a - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 6, 4 lb bc, 7, 7 - predef FillBox + predef PlaceGraphic ret ; 61cd diff --git a/engine/npctrade.asm b/engine/npctrade.asm index 7342f8a6c..a8d3b71aa 100755 --- a/engine/npctrade.asm +++ b/engine/npctrade.asm @@ -430,21 +430,22 @@ GetTradeMonNames: ; fce1b NPCTrades: ; fce58 npctrade: MACRO - db \1, \2, \3, \4 - dw \5 - db \6 - dw \7 - db \8, \9, 0 + db \1, \2, \3, \4 ; dialog set, requested mon, offered mon, nickname + db \5, \6 ; dvs + shift + db \6 ; item + dw \7 ; OT ID + db \8, \9, 0 ; OT name, gender requested ENDM - npctrade 0, ABRA, MACHOP, "MUSCLE@@@@@", $6637, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_EITHER_GENDER - npctrade 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $6696, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_EITHER_GENDER - npctrade 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $8898, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_EITHER_GENDER - npctrade 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $6677, SMOKE_BALL, 00283, "EMY@@@@@@@@", TRADE_FEMALE_ONLY - npctrade 2, HAUNTER, XATU, "PAUL@@@@@@@", $8696, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_EITHER_GENDER - npctrade 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $6696, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_EITHER_GENDER - npctrade 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $6696, METAL_COAT, 50082, "FOREST@@@@@", TRADE_EITHER_GENDER + npctrade 0, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_EITHER_GENDER + npctrade 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_EITHER_GENDER + npctrade 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_EITHER_GENDER + npctrade 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, 00283, "EMY@@@@@@@@", TRADE_FEMALE_ONLY + npctrade 2, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_EITHER_GENDER + npctrade 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_EITHER_GENDER + npctrade 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, 50082, "FOREST@@@@@", TRADE_EITHER_GENDER ; fcf38 diff --git a/engine/phone.asm b/engine/phone.asm index 4b856568e..1a3023bf1 100644 --- a/engine/phone.asm +++ b/engine/phone.asm @@ -777,44 +777,44 @@ phone: MACRO dba \7 ; script 2 ENDM - 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_BIKESHOP, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript - phone TRAINER_NONE, PHONECONTACT_BILL, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2 - phone TRAINER_NONE, PHONECONTACT_ELM, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2 - phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2 - phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2 - 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 COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2 - phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2 - phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2 - phone COOLTRAINERF, REENA1, ROUTE_27, 7, ReenaPhoneScript1, 7, ReenaPhoneScript2 - phone YOUNGSTER, JOEY1, ROUTE_30, 7, JoeyPhoneScript1, 7, JoeyPhoneScript2 - phone BUG_CATCHER, WADE1, ROUTE_31, 7, WadePhoneScript1, 7, WadePhoneScript2 - phone FISHER, RALPH1, ROUTE_32, 7, RalphPhoneScript1, 7, RalphPhoneScript2 - phone PICNICKER, LIZ1, ROUTE_32, 7, LizPhoneScript1, 7, LizPhoneScript2 - phone HIKER, ANTHONY2, ROUTE_33, 7, AnthonyPhoneScript1, 7, AnthonyPhoneScript2 - phone CAMPER, TODD1, ROUTE_34, 7, ToddPhoneScript1, 7, ToddPhoneScript2 - phone PICNICKER, GINA1, ROUTE_34, 7, GinaPhoneScript1, 7, GinaPhoneScript2 - phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2 - phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2 - phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2 - phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript - phone LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2 - phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2 - phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2 - phone FISHER, TULLY1, ROUTE_42, 7, TullyPhoneScript1, 7, TullyPhoneScript2 - phone POKEMANIAC, BRENT1, ROUTE_43, 7, BrentPhoneScript1, 7, BrentPhoneScript2 - phone PICNICKER, TIFFANY3, ROUTE_43, 7, TiffanyPhoneScript1, 7, TiffanyPhoneScript2 - phone BIRD_KEEPER, VANCE1, ROUTE_44, 7, VancePhoneScript1, 7, VancePhoneScript2 - phone FISHER, WILTON1, ROUTE_44, 7, WiltonPhoneScript1, 7, WiltonPhoneScript2 - phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2 - phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2 - 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, PHONE_00, N_A, 0, UnusedPhoneScript, 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_BILL, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2 + phone TRAINER_NONE, PHONECONTACT_ELM, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2 + phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2 + phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2 + 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 COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2 + phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2 + phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2 + phone COOLTRAINERF, REENA1, ROUTE_27, 7, ReenaPhoneScript1, 7, ReenaPhoneScript2 + phone YOUNGSTER, JOEY1, ROUTE_30, 7, JoeyPhoneScript1, 7, JoeyPhoneScript2 + phone BUG_CATCHER, WADE1, ROUTE_31, 7, WadePhoneScript1, 7, WadePhoneScript2 + phone FISHER, RALPH1, ROUTE_32, 7, RalphPhoneScript1, 7, RalphPhoneScript2 + phone PICNICKER, LIZ1, ROUTE_32, 7, LizPhoneScript1, 7, LizPhoneScript2 + phone HIKER, ANTHONY2, ROUTE_33, 7, AnthonyPhoneScript1, 7, AnthonyPhoneScript2 + phone CAMPER, TODD1, ROUTE_34, 7, ToddPhoneScript1, 7, ToddPhoneScript2 + phone PICNICKER, GINA1, ROUTE_34, 7, GinaPhoneScript1, 7, GinaPhoneScript2 + phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2 + phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2 + phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2 + phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript + phone LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2 + phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2 + phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2 + phone FISHER, TULLY1, ROUTE_42, 7, TullyPhoneScript1, 7, TullyPhoneScript2 + phone POKEMANIAC, BRENT1, ROUTE_43, 7, BrentPhoneScript1, 7, BrentPhoneScript2 + phone PICNICKER, TIFFANY3, ROUTE_43, 7, TiffanyPhoneScript1, 7, TiffanyPhoneScript2 + phone BIRD_KEEPER, VANCE1, ROUTE_44, 7, VancePhoneScript1, 7, VancePhoneScript2 + phone FISHER, WILTON1, ROUTE_44, 7, WiltonPhoneScript1, 7, WiltonPhoneScript2 + phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2 + phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2 + phone PICNICKER, ERIN1, ROUTE_46, 7, ErinPhoneScript1, 7, ErinPhoneScript2 + phone TRAINER_NONE, PHONECONTACT_BUENA, GOLDENROD_DEPT_STORE_ROOF, 7, BuenaPhoneScript1, 7, BuenaPhoneScript2 ; 90627 SpecialPhoneCallList: ; 90627 diff --git a/engine/pokedex.asm b/engine/pokedex.asm index d1e2d7edf..00c600a9d 100644 --- a/engine/pokedex.asm +++ b/engine/pokedex.asm @@ -1051,14 +1051,14 @@ asm_4073f: ; 4073f (10:473f) scf ret -Function40741: ; 40741 +Pokedex_FillColumn: ; 40741 push de - ld de, $0014 -.asm_40745 + ld de, SCREEN_WIDTH +.loop ld [hl], a add hl, de dec b - jr nz, .asm_40745 + jr nz, .loop pop de ret ; 4074c @@ -1076,7 +1076,7 @@ Function4074c: ; 4074c (10:474c) lb bc, 7, 7 call Pokedex_PlaceBorder hlcoord 0, 9 - ld bc, $607 + lb bc, 6, 7 call Pokedex_PlaceBorder hlcoord 1, 11 ld de, String_SEEN @@ -1102,13 +1102,13 @@ Function4074c: ; 4074c (10:474c) ld de, String_SELECT_OPTION call Pokedex_PlaceString hlcoord 8, 1 - ld b, $7 + ld b, 7 ld a, $5a - call Function40741 + call Pokedex_FillColumn hlcoord 8, 10 - ld b, $6 + ld b, 6 ld a, $5a - call Function40741 + call Pokedex_FillColumn hlcoord 8, 0 ld [hl], $59 hlcoord 8, 8 @@ -1134,22 +1134,22 @@ String_START_SEARCH: ; 407f2 Function407fd: ; 407fd call Pokedex_FillBackgroundColor2 hlcoord 0, 0 - ld bc, $0f12 + lb bc, 15, 18 call Pokedex_PlaceBorder hlcoord 19, 0 ld [hl], $34 hlcoord 19, 1 - ld a, $7f - ld b, $f - call Function40741 + ld a, " " + ld b, 15 + call Pokedex_FillColumn ld [hl], $39 hlcoord 1, 10 - ld bc, $0013 + ld bc, 19 ld a, $61 call ByteFill hlcoord 1, 17 - ld bc, $0012 - ld a, $7f + ld bc, 18 + ld a, " " call ByteFill hlcoord 9, 7 ld de, Unknown_40852 @@ -1218,38 +1218,38 @@ Function408f0: ; 408f0 (10:48f0) lb bc, 14, 18 call Pokedex_PlaceBorder hlcoord 0, 1 - ld de, Unknown_4092a + ld de, .SEARCH call Pokedex_PlaceString hlcoord 8, 4 - ld de, Unknown_40935 + ld de, .BLANK call Pokedex_PlaceString hlcoord 8, 6 - ld de, Unknown_40935 + ld de, .BLANK call Pokedex_PlaceString hlcoord 3, 4 - ld de, String_40940 + ld de, .Type1Type2 call PlaceString hlcoord 3, 13 - ld de, String_4094c + ld de, BeginSearch_Cancel call PlaceString ret ; 4092a (10:492a) -Unknown_4092a: ; 4092a +.SEARCH: ; 4092a db $3b, " SEARCH ", $3c, $ff ; 40925 -Unknown_40935: ; 40935 +.BLANK: ; 40935 db $3d, " ", $3e, $ff ; 40940 -String_40940: ; 40940 +.Type1Type2: ; 40940 db "TYPE1" next "TYPE2" db "@" ; 4094c -String_4094c: ; 4094c +BeginSearch_Cancel: ; 4094c db "BEGIN SEARCH!!" next "CANCEL" db "@" @@ -1273,9 +1273,9 @@ Function40962: ; 40962 (10:4962) hlcoord 8, 0 ld [hl], $59 hlcoord 8, 1 - ld b, $7 + ld b, 7 ld a, $5a - call Function40741 + call Pokedex_FillColumn hlcoord 8, 8 ld [hl], $53 hlcoord 8, 9 @@ -1736,7 +1736,7 @@ Function40e5b: ; 40e5b xor a ld [hBGMapMode], a hlcoord 0, 12 - lb bc, 4, SCREEN_WIDTH - 2 + lb bc, 4, 18 call Pokedex_PlaceBorder ld a, [wc7d8] ld hl, Unknown_40e7d @@ -1781,7 +1781,7 @@ Function40f08: ; 40f08 (10:4f08) xor a ld [hBGMapMode], a hlcoord 0, 12 - lb bc, 4, SCREEN_WIDTH - 2 + lb bc, 4, 18 call Pokedex_PlaceBorder ld de, String_ChangingModesPleaseWait hlcoord 1, 14 @@ -2018,7 +2018,7 @@ Function41107: ; 41107 xor a ld [hBGMapMode], a hlcoord 0, 12 - ld bc, $0412 + lb bc, 4, 18 call Pokedex_PlaceBorder ld de, String_41126 hlcoord 1, 14 diff --git a/engine/pokegear.asm b/engine/pokegear.asm index 939507429..5379734e6 100755 --- a/engine/pokegear.asm +++ b/engine/pokegear.asm @@ -199,14 +199,14 @@ TownMap_InitCursorAndPlayerIconPositions: ; 90d70 (24:4d70) ld c, a call GetWorldMapLocation .LoadLandmark - ld [wTownMapPlayerIconLandmark], a - ld [wTownMapCursorLandmark], a + ld [wPokegearMapPlayerIconLandmark], a + ld [wPokegearMapCursorLandmark], a ret .FastShip - ld [wTownMapPlayerIconLandmark], a + ld [wPokegearMapPlayerIconLandmark], a ld a, NEW_BARK_TOWN - ld [wTownMapCursorLandmark], a + ld [wPokegearMapCursorLandmark], a ret Pokegear_InitJumptableIndices: ; 90d9e (24:4d9e) @@ -307,7 +307,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8) ; 90e3f .Map: ; 90e3f - ld a, [wTownMapPlayerIconLandmark] + ld a, [wPokegearMapPlayerIconLandmark] cp FAST_SHIP jr z, .johto cp KANTO_LANDMARK @@ -328,7 +328,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8) ld [hl], $6 hlcoord 19, 2 ld [hl], $17 - ld a, [wTownMapCursorLandmark] + ld a, [wPokegearMapCursorLandmark] call PokegearMap_UpdateLandmarkName ret @@ -530,7 +530,7 @@ Pokegear_UpdateClock: ; 90f86 (24:4f86) ; 0x90fb4 PokegearMap_CheckRegion: ; 90fb4 (24:4fb4) - ld a, [wTownMapPlayerIconLandmark] + ld a, [wPokegearMapPlayerIconLandmark] cp FAST_SHIP jr z, .johto cp KANTO_LANDMARK @@ -549,9 +549,9 @@ PokegearMap_CheckRegion: ; 90fb4 (24:4fb4) PokegearMap_Init: ; 90fcd (24:4fcd) call InitPokegearTilemap - ld a, [wTownMapPlayerIconLandmark] + ld a, [wPokegearMapPlayerIconLandmark] call PokegearMap_InitPlayerIcon - ld a, [wTownMapCursorLandmark] + ld a, [wPokegearMapCursorLandmark] call PokegearMap_InitCursor ld a, c ld [wPokegearMapCursorObjectPointer], a @@ -621,7 +621,7 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2) ret .up - ld hl, wTownMapCursorLandmark + ld hl, wPokegearMapCursorLandmark ld a, [hl] cp d jr c, .wrap_around_up @@ -633,7 +633,7 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2) jr .done_dpad .down - ld hl, wTownMapCursorLandmark + ld hl, wPokegearMapCursorLandmark ld a, [hl] cp e jr nz, .wrap_around_down @@ -643,13 +643,13 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2) .wrap_around_down dec [hl] .done_dpad - ld a, [wTownMapCursorLandmark] + ld a, [wPokegearMapCursorLandmark] call PokegearMap_UpdateLandmarkName ld a, [wPokegearMapCursorObjectPointer] ld c, a ld a, [wPokegearMapCursorObjectPointer + 1] ld b, a - ld a, [wTownMapCursorLandmark] + ld a, [wPokegearMapCursorLandmark] call PokegearMap_UpdateCursorPosition ret @@ -1552,7 +1552,7 @@ RadioChannels: jp LoadStation_BuenasPassword .RuinsOfAlphRadio - ld a, [wTownMapPlayerIconLandmark] + ld a, [wPokegearMapPlayerIconLandmark] cp RUINS_OF_ALPH jr nz, .NoSignal jp LoadStation_UnownRadio @@ -1586,7 +1586,7 @@ RadioChannels: ld a, [StatusFlags] bit 4, a jr z, .NoSignal - ld a, [wTownMapPlayerIconLandmark] + ld a, [wPokegearMapPlayerIconLandmark] cp MAHOGANY_TOWN jr z, .ok cp ROUTE_43 @@ -1604,7 +1604,7 @@ RadioChannels: ; if in Johto or on the S.S. Aqua, set carry ; otherwise clear carry - ld a, [wTownMapPlayerIconLandmark] + ld a, [wPokegearMapPlayerIconLandmark] cp FAST_SHIP jr z, .johto cp KANTO_LANDMARK diff --git a/engine/predef.asm b/engine/predef.asm index f459747bb..f52127311 100644 --- a/engine/predef.asm +++ b/engine/predef.asm @@ -49,7 +49,7 @@ PredefPointers:: ; 856b add_predef Predef_LinkTextbox ; $ 10 add_predef PrintMoveDesc add_predef UpdatePlayerHUD - add_predef FillBox + add_predef PlaceGraphic add_predef CheckPlayerPartyForFitPkmn add_predef UpdateEnemyHUD add_predef StartBattle @@ -88,7 +88,7 @@ PredefPointers:: ; 856b add_predef PlayBattleAnim add_predef Predef38 ; $38 add_predef Predef39 - add_predef Functionfd1d0 + add_predef Predef3A add_predef PartyMonItemName add_predef GetFrontpic add_predef GetBackpic @@ -103,6 +103,6 @@ PredefPointers:: ; 856b add_predef LoadMonAnimation add_predef AnimateFrontpic add_predef Functiond0669 ; $48 - add_predef Functiond066e + add_predef HOF_AnimateFrontpic dbw $ff, Function2d43 ; ???? ; 864c diff --git a/engine/scripting.asm b/engine/scripting.asm index 0a68243d3..42d060e9b 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -2806,9 +2806,9 @@ Script_xycompare: ; 97a01 ; pointer (MultiByteParam) call GetScriptByte - ld [wd453], a + ld [wXYComparePointer], a call GetScriptByte - ld [wd454], a + ld [wXYComparePointer + 1], a ret ; 97a0e diff --git a/engine/trade/animation.asm b/engine/trade/animation.asm index 31e46b2c7..719a230ff 100755 --- a/engine/trade/animation.asm +++ b/engine/trade/animation.asm @@ -864,9 +864,9 @@ TradeAnim_ShowFrontpic: ; 294c3 call Function297cf hlcoord 7, 2 xor a - ld [hFillBox], a + ld [hGraphicStartTile], a lb bc, 7, 7 - predef FillBox + predef PlaceGraphic call WaitBGMap ret ; 294e7 diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm index ae8ad2aa5..4898d657a 100755 --- a/engine/trainer_card.asm +++ b/engine/trainer_card.asm @@ -245,8 +245,8 @@ TrainerCard_PrintTopHalfOfCard: ; 25299 (9:5299) hlcoord 14, 1 lb bc, 5, 7 xor a - ld [hFillBox], a - predef FillBox + ld [hGraphicStartTile], a + predef PlaceGraphic ret ; 252ec (9:52ec) diff --git a/event/halloffame.asm b/event/halloffame.asm index 95554a870..00716e20c 100755 --- a/event/halloffame.asm +++ b/event/halloffame.asm @@ -111,7 +111,7 @@ AnimateHallOfFame: ; 864c3 jr .loop .done - call Function86810 + call HOF_AnimatePlayerPic ld a, $4 ld [MusicFade], a call RotateThreePalettesRight @@ -128,7 +128,7 @@ AnimateHallOfFame: ; 864c3 call WaitBGMap decoord 6, 5 ld c, $6 - predef Functiond066e + predef HOF_AnimateFrontpic ld c, 60 call DelayFrames and a @@ -251,10 +251,10 @@ endr ld de, VTiles2 tile $31 predef GetBackpic ld a, $31 - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 6, 6 lb bc, 6, 6 - predef FillBox + predef PlaceGraphic ld a, $d0 ld [hSCY], a ld a, $90 @@ -310,21 +310,20 @@ _HallOfFamePC: ; 86650 call LoadFontsBattleExtra xor a ld [wJumptableIndex], a -.loop +.MasterLoop call LoadHOFTeam ret c - call Function86665 + call .DisplayTeam ret c ld hl, wJumptableIndex inc [hl] - jr .loop -; 86665 + jr .MasterLoop -Function86665: ; 86665 +.DisplayTeam xor a ld [wcf64], a .next - call Function86692 + call .DisplayMonAndStrings jr c, .start_button .loop call JoyTextDelay @@ -353,19 +352,18 @@ Function86665: ; 86665 .start_button and a ret -; 86692 -Function86692: ; 86692 +.DisplayMonAndStrings ; Print the number of times the player has entered the Hall of Fame. ; If that number is above 200, print "HOF Master!" instead. ld a, [wcf64] - cp $6 + cp PARTY_LENGTH jr nc, .fail ld hl, wHallOfFameTempMon1 ld bc, wHallOfFameTempMon1End - wHallOfFameTempMon1 call AddNTimes ld a, [hl] - cp $ff + cp -1 jr nz, .okay .fail @@ -380,14 +378,14 @@ Function86692: ; 86692 ld a, [wHallOfFameTempWinCount] cp 200 + 1 jr c, .print_num_hof - ld de, String_866fc + ld de, .HOFMaster hlcoord 1, 2 call PlaceString hlcoord 13, 2 jr .finish .print_num_hof - ld de, String_8670c + ld de, .TimeFamer hlcoord 1, 2 call PlaceString hlcoord 2, 2 @@ -397,7 +395,7 @@ Function86692: ; 86692 hlcoord 11, 2 .finish - ld de, String_866fb + ld de, .EmptyString call PlaceString call WaitBGMap ld b, SCGB_1A @@ -405,24 +403,20 @@ Function86692: ; 86692 call SetPalettes decoord 6, 5 ld c, $6 - predef Functiond066e + predef HOF_AnimateFrontpic and a ret -; 866fb -String_866fb: +.EmptyString: db "@" -; 866fc -String_866fc: +.HOFMaster: db " HOF Master!@" -; 8670c -String_8670c: +.TimeFamer: db " -Time Famer@" ; 8671c - LoadHOFTeam: ; 8671c ld a, [wJumptableIndex] cp NUM_HOF_TEAMS @@ -537,7 +531,7 @@ DisplayHOFMon: ; 86748 ret ; 86810 -Function86810: ; 86810 +HOF_AnimatePlayerPic: ; 86810 call ClearBGPalettes ld hl, VTiles2 tile $63 ld de, FontExtra + 13 tiles @@ -549,10 +543,10 @@ Function86810: ; 86810 call ByteFill callba GetPlayerBackpic ld a, $31 - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 6, 6 lb bc, 6, 6 - predef FillBox + predef PlaceGraphic ld a, $d0 ld [hSCY], a ld a, $90 @@ -571,12 +565,12 @@ Function86810: ; 86810 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, " " call ByteFill - callba Function88840 + callba HOF_LoadTrainerFrontpic xor a - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 12, 5 lb bc, 7, 7 - predef FillBox + predef PlaceGraphic ld a, $c0 ld [hSCX], a call WaitBGMap diff --git a/event/mom_phone.asm b/event/mom_phone.asm index e7d2a1493..a750b7475 100755 --- a/event/mom_phone.asm +++ b/event/mom_phone.asm @@ -275,7 +275,7 @@ _MomText_ItsInRoom: ; 0xfd1ca db 0 ; XXX -Functionfd1d0: ; fd1d0 +Predef3A: ; fd1d0 ret ; fd1d1 diff --git a/event/photo.asm b/event/photo.asm index 75915716a..7f6ec9e66 100755 --- a/event/photo.asm +++ b/event/photo.asm @@ -144,9 +144,9 @@ UnownPrinter: ; 16be4 call Function16cff hlcoord 1, 6 xor a - ld [hFillBox], a + ld [hGraphicStartTile], a lb bc, 7, 7 - predef FillBox + predef PlaceGraphic ld de, VTiles2 tile $31 callba Functione0000 ret @@ -228,9 +228,9 @@ Function16dac: ; 16dac call ByteFill hlcoord 7, 11 ld a, $31 - ld [hFillBox], a + ld [hGraphicStartTile], a lb bc, 7, 7 - predef FillBox + predef PlaceGraphic ret ; 16dc7 diff --git a/gfx/pics/animation.asm b/gfx/pics/animation.asm index ae207a790..3284a271b 100644 --- a/gfx/pics/animation.asm +++ b/gfx/pics/animation.asm @@ -1115,13 +1115,13 @@ PokeAnim_GetSpeciesOrUnown: ; d065c ret ; d0669 -Functiond0669: ; d0669 +Functiond0669: ; d0669 Predef 48 ld a, $1 ld [wBoxAlignment], a -Functiond066e: ; d066e +HOF_AnimateFrontpic: ; d066e Predef 49 call AnimateMon_CheckIfPokemon - jr c, .asm_d068c + jr c, .fail ld h, d ld l, e push bc @@ -1137,7 +1137,7 @@ Functiond066e: ; d066e ld [wBoxAlignment], a ret -.asm_d068c +.fail xor a ld [wBoxAlignment], a inc a diff --git a/home.asm b/home.asm index d549357da..42feefde4 100644 --- a/home.asm +++ b/home.asm @@ -1665,9 +1665,9 @@ _PrepMonFrontpic:: ; 378b predef GetFrontpic pop hl xor a - ld [hFillBox], a + ld [hGraphicStartTile], a lb bc, 7, 7 - predef FillBox + predef PlaceGraphic xor a ld [wBoxAlignment], a ret diff --git a/home/audio.asm b/home/audio.asm index 63489cf68..1e02f91eb 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -560,7 +560,7 @@ CheckSFX:: ; 3dde ret ; 3dfe -Function3dfe:: ; 3dfe +TerminateExpBarSound:: ; 3dfe xor a ld [Channel5Flags], a ld [SoundInput], a diff --git a/home/map.asm b/home/map.asm index 680fc8944..c51f9c48a 100644 --- a/home/map.asm +++ b/home/map.asm @@ -381,7 +381,7 @@ CheckIndoorMap:: ; 22f4 ret ; 2300 -Function2300:: ; unreferenced +; XXX cp INDOOR ret z cp GATE @@ -549,11 +549,11 @@ ReadWarps:: ; 23da ld a, l ld [wCurrMapWarpHeaderPointer], a ld a, h - ld [wdbfd], a + ld [wCurrMapWarpHeaderPointer + 1], a ld a, c and a ret z - ld bc, $0005 + ld bc, 5 call AddNTimes ret ; 23f1 @@ -765,25 +765,25 @@ endr ld d, a ld a, [MapHeight] ld b, a -.asm_250c +.row push hl ld a, [hConnectedMapWidth] ld c, a -.asm_2510 +.col ld a, [de] inc de ld [hli], a dec c - jr nz, .asm_2510 + jr nz, .col pop hl ld a, [hConnectionStripLength] add l ld l, a - jr nc, .asm_251e + jr nc, .okay inc h -.asm_251e +.okay dec b - jr nz, .asm_250c + jr nz, .row pop af rst Bankswitch @@ -916,9 +916,9 @@ FillSouthConnectionStrip:: ; 25d3 add 6 add e ld e, a - jr nc, .asm_25f2 + jr nc, .okay inc d -.asm_25f2 +.okay dec c jr nz, .y ret @@ -927,7 +927,7 @@ FillSouthConnectionStrip:: ; 25d3 FillWestConnectionStrip:: FillEastConnectionStrip:: ; 25f6 -.asm_25f6 +.loop ld a, [MapWidth] add 6 ld [hConnectedMapWidth], a @@ -955,11 +955,11 @@ FillEastConnectionStrip:: ; 25f6 ld a, [hConnectedMapWidth] add e ld e, a - jr nc, .asm_2617 + jr nc, .okay inc d -.asm_2617 +.okay dec b - jr nz, .asm_25f6 + jr nz, .loop ret ; 261b @@ -1452,15 +1452,15 @@ BufferScreen:: ; 2879 ld de, wScreenSave ld c, $5 ld b, $6 -.asm_2886 +.row push bc push hl -.asm_2888 +.col ld a, [hli] ld [de], a inc de dec b - jr nz, .asm_2888 + jr nz, .col pop hl ld a, [MapWidth] add $6 @@ -1469,7 +1469,7 @@ BufferScreen:: ; 2879 add hl, bc pop bc dec c - jr nz, .asm_2886 + jr nz, .row ret ; 289d diff --git a/home/mobile.asm b/home/mobile.asm index 6faecfbff..32692f6a9 100644 --- a/home/mobile.asm +++ b/home/mobile.asm @@ -128,7 +128,7 @@ Timer:: ; 3e93 Function3ed7:: ; 3ed7 ; unreferenced - ld [wdc02], a + ld [$dc02], a ld a, [hROMBank] push af ld a, BANK(Function114243) @@ -139,7 +139,7 @@ Function3ed7:: ; 3ed7 ld a, b rst Bankswitch - ld a, [wdc02] + ld a, [$dc02] ret ; 3eea diff --git a/hram.asm b/hram.asm index 2032a74cc..3e921f78e 100644 --- a/hram.asm +++ b/hram.asm @@ -34,7 +34,7 @@ hJoyLast EQU $ffa9 hInMenu EQU $ffaa hPrinter EQU $ffac -hFillBox EQU $ffad +hGraphicStartTile EQU $ffad hMoveMon EQU $ffae hMapObjectIndexBuffer EQU $ffaf hObjectStructIndexBuffer EQU $ffb0 diff --git a/items/item_effects.asm b/items/item_effects.asm index 2831c9407..5ba74eb8c 100644 --- a/items/item_effects.asm +++ b/items/item_effects.asm @@ -1665,7 +1665,7 @@ RevivePokemon: ; f0d6 ld a, [CurPartyMon] ld c, a ld d, 0 - ld hl, wc6fc + ld hl, wBattleParticipantsIncludingFainted ld b, CHECK_FLAG predef FlagPredef ld a, c diff --git a/main.asm b/main.asm index 4839245aa..cc61c518f 100644 --- a/main.asm +++ b/main.asm @@ -5428,9 +5428,9 @@ Pokepic:: ; 244e3 ld c, a call Coord2Tile ld a, $80 - ld [hFillBox], a + ld [hGraphicStartTile], a lb bc, 7, 7 - predef FillBox + predef PlaceGraphic call WaitBGMap ret @@ -6509,9 +6509,9 @@ endr ld [hl], VBGMap0 / $100 ret -FillBox: ; 2ef6e +PlaceGraphic: ; 2ef6e ; 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 ld de, SCREEN_WIDTH @@ -6520,7 +6520,7 @@ FillBox: ; 2ef6e and a jr nz, .right - ld a, [hFillBox] + ld a, [hGraphicStartTile] .x1 push bc push hl @@ -6547,7 +6547,7 @@ FillBox: ; 2ef6e add hl, bc pop bc - ld a, [hFillBox] + ld a, [hGraphicStartTile] .x2 push bc push hl @@ -8973,7 +8973,7 @@ CheckBattleScene: ; 4ea44 .asm_4ea72 ld a, $5 - ld hl, wdc00 + ld hl, w5_dc00 call GetFarWRAMByte bit 0, a jr z, .off @@ -10799,7 +10799,7 @@ MovePlayerPic: ; 88266 xor a ld [hBGMapMode], a lb bc, 7, 7 - predef FillBox + predef PlaceGraphic xor a ld [hBGMapThird], a call WaitBGMap @@ -10951,7 +10951,7 @@ GetChrisBackpic: ; 88830 predef DecompressPredef ret -Function88840: ; 88840 +HOF_LoadTrainerFrontpic: ; 88840 call WaitBGMap xor a ld [hBGMapMode], a @@ -11007,10 +11007,10 @@ DrawIntroPlayerPic: ; 88874 ; Draw xor a - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 6, 4 lb bc, 7, 7 - predef FillBox + predef PlaceGraphic ret ChrisPic: ; 888a9 diff --git a/misc/mobile_22.asm b/misc/mobile_22.asm index 64cb84dc3..b849b8405 100644 --- a/misc/mobile_22.asm +++ b/misc/mobile_22.asm @@ -1255,10 +1255,10 @@ Function897d5: ; 897d5 .asm_897f3 ld a, $37 - ld [hFillBox], a + ld [hGraphicStartTile], a hlcoord 12, 3 lb bc, 7, 7 - predef FillBox + predef PlaceGraphic call Function8963d pop bc ret diff --git a/misc/mobile_40.asm b/misc/mobile_40.asm index ae77da940..2660f3e31 100644 --- a/misc/mobile_40.asm +++ b/misc/mobile_40.asm @@ -4,7 +4,7 @@ Function100000: ; 100000 ; bc: addr ld a, [rSVBK] push af - ld a, $1 + ld a, $01 ld [rSVBK], a call Function100022 @@ -85,7 +85,7 @@ Function100082: ; 100082 xor a ld [hMapAnims], a ld [hFFC6], a - ld a, $1 + ld a, $01 ld [hMobileReceive], a ld [hMobile], a ei @@ -177,7 +177,7 @@ Function1000fa: ; 1000fa push af xor a ld [wLinkMode], a - ld a, $4 + ld a, $04 ld [wc314 + 5], a callba Function11619d ld hl, wcd29 @@ -217,9 +217,9 @@ Function100163: ; 100163 Function10016f: ; 10016f ld a, [wcd2b] - cp $1 + cp $01 ret z - cp $2 + cp $02 ret z cp $ff jp z, .asm_1001f5 @@ -321,7 +321,7 @@ Function10020b: ; 10020b ld a, [rSVBK] push af - ld a, $1 + ld a, $01 ld [rSVBK], a callba Function17f555 @@ -355,9 +355,9 @@ String10025e: ; 10025e Function100276: ; 100276 ld a, [wcd2b] - cp $1 + cp $01 jr z, .asm_10029f - cp $2 + cp $02 jr z, .asm_100296 cp $f5 jr z, .asm_1002a5 @@ -370,12 +370,12 @@ Function100276: ; 100276 jr .asm_1002c0 .asm_100293 - ld c, $2 + ld c, $02 ret .asm_100296 callba Script_reloadmappart - ld c, $4 + ld c, $04 ret .asm_10029f @@ -386,7 +386,7 @@ Function100276: ; 100276 .asm_1002a5 callba Script_reloadmappart call Function1002ed - ld c, $3 + ld c, $03 ret .asm_1002b1 @@ -394,13 +394,13 @@ Function100276: ; 100276 call Function1002dc ld de, String10024d call Function100232 - ld c, $2 + ld c, $02 ret .asm_1002c0 call Function1002c9 call Function1002dc - ld c, $1 + ld c, $01 ret ; 1002c9 @@ -426,7 +426,7 @@ Function1002dc: ; 1002dc Function1002ed: ; 1002ed callba LoadOW_BGPal7 callba ApplyPals - ld a, $1 + ld a, $01 ld [hCGBPalUpdate], a call DelayFrame ret @@ -491,7 +491,7 @@ Function10034d: ; 10034d jr nz, .asm_100366 bit 0, a jr nz, .asm_100364 - ld a, $1 + ld a, $01 and a ret @@ -500,7 +500,7 @@ Function10034d: ; 10034d ret .asm_100366 - ld a, $2 + ld a, $02 and a ret @@ -547,7 +547,7 @@ Function10039c: ; 10039c ld hl, wcc60 ld de, w3_d000 ld bc, $54 - ld a, $3 + ld a, $03 call FarCopyWRAM ret ; 1003ab @@ -556,7 +556,7 @@ Function1003ab: ; 1003ab ld hl, w3_d000 ld de, wcc60 ld bc, $54 - ld a, $3 + ld a, $03 call FarCopyWRAM ret ; 1003ba @@ -565,7 +565,7 @@ Function1003ba: ; 1003ba ld hl, wccb4 ld de, w3_d080 ld bc, $54 - ld a, $3 + ld a, $03 call FarCopyWRAM ret ; 1003c9 @@ -574,7 +574,7 @@ Function1003c9: ; 1003c9 ld hl, w3_d080 ld de, wccb4 ld bc, $54 - ld a, $3 + ld a, $03 call FarCopyWRAM ret ; 1003d8 @@ -596,24 +596,24 @@ Function1003d8: ; 1003d8 inc hl ld [hl], d ld a, c - add $2 + add $02 ld [wccb4], a ret ; 1003f5 Function1003f5: ; 1003f5 ld a, [wcc60] - sub $3 + sub $03 ld [wcc60], a ld a, [wccb4] - sub $3 + sub $03 ld [wccb4], a ret ; 100406 Function100406: ; 100406 ld a, [wcc60] - sub $2 + sub $02 ld c, a ld b, 0 ld hl, wcc61 @@ -702,17 +702,17 @@ Function10047c: ; 10047c call Function100337 ret c ret z - cp $2 + cp $02 jr z, .asm_100487 jr .asm_10048d .asm_100487 - ld a, $8 + ld a, $08 ld [wcd27], a ret .asm_10048d - ld a, $2 + ld a, $02 ld [wcd27], a ret ; 100493 @@ -758,7 +758,7 @@ Function1004ba: ; 1004ba ret .asm_1004c8 - ld a, $8 + ld a, $08 ld [wcd27], a ret ; 1004ce @@ -767,7 +767,7 @@ Function1004ce: ; 1004ce call Function100337 ret c ret z - cp $2 + cp $02 ret nz ld a, [wcd27] inc a @@ -986,8 +986,8 @@ MenuData2_100604: ; 100604 Function10060d: ; 10060d hlcoord 3, 10 - ld b, $1 - ld c, $b + ld b, $01 + ld c, $0b call Function3eea ld de, String_100621 hlcoord 4, 11 @@ -1162,7 +1162,7 @@ Function1006dc: ; 1006dc ; 1006fd Function1006fd: ; 1006fd - ld a, $4 + ld a, $04 ld hl, $a800 call GetSRAMBank xor a @@ -1174,12 +1174,12 @@ endr ; 10070d Function10070d: ; 10070d - ld a, $4 + ld a, $04 ld hl, $a800 call GetSRAMBank xor a ld [hli], a - ld a, $a + ld a, $0a ld [hli], a xor a ld [hli], a @@ -1197,7 +1197,7 @@ Function100720: ; 100720 ld [wcd73], a ld a, [hSeconds] ld [wcd74], a - ld a, $4 + ld a, $04 ld hl, $a800 call GetSRAMBank ld a, [hli] @@ -1265,7 +1265,7 @@ Function100772: ; 100772 Function10079c: ; 10079c ld a, [wcd21] - cp $1 + cp $01 jr nz, .asm_1007f4 ld hl, wcd2a bit 5, [hl] @@ -1293,7 +1293,7 @@ Function10079c: ; 10079c and a jr nz, .asm_1007e5 ld a, b - cp $a + cp $0a jr nc, .asm_1007e5 ld a, d and a @@ -1326,7 +1326,7 @@ Function1007f6: ; 1007f6 ld hl, wcd74 ld de, wcd71 call Function1006dc - ld a, $4 + ld a, $04 call GetSRAMBank ld hl, $a802 call Function100826 @@ -1384,7 +1384,7 @@ Function100846: ; 100846 ld [StringBuffer2 + 2], a ld a, [wcd6d] ld c, a - ld a, $a + ld a, $0a sbc c ld [StringBuffer2 + 1], a xor a @@ -1418,7 +1418,7 @@ String_10089f: ; 10089f ; 1008a6 Function1008a6: ; 1008a6 - ld a, $4 + ld a, $04 ld hl, $a800 call GetSRAMBank ld a, [hli] @@ -1439,7 +1439,7 @@ Function1008a6: ; 1008a6 ld b, a ld a, [StringBuffer2 + 1] ld c, a - ld a, $a + ld a, $0a sbc c ld c, a jr c, .asm_1008da @@ -1463,7 +1463,7 @@ Function1008e0: ; 1008e0 push bc xor a ld [hBGMapMode], a - ld a, $3 + ld a, $03 ld [hVBlank], a call Function100970 call Function100902 @@ -1479,12 +1479,12 @@ Function1008e0: ; 1008e0 Function100902: ; 100902 hlcoord 3, 10 - ld b, $1 - ld c, $b + ld b, $01 + ld c, $0b call TextBox ld a, [wcd6d] ld c, a - ld a, $a + ld a, $0a sub c ld [StringBuffer2], a jr z, .asm_10093f @@ -1547,7 +1547,7 @@ Function100989: ; 100989 Function1009a5: ; 1009a5 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT - ld a, $3 + ld a, $03 call FarCopyWRAM ret ; 1009ae @@ -1555,7 +1555,7 @@ Function1009a5: ; 1009a5 Function1009ae: ; 1009ae ld a, [rSVBK] push af - ld a, $3 + ld a, $03 ld [rSVBK], a ld hl, w3_d800 @@ -1584,17 +1584,17 @@ Function1009ae: ; 1009ae Function1009d2: ; 1009d2 ld a, [rSVBK] push af - ld a, $3 + ld a, $03 ld [rSVBK], a ld a, [rVBK] push af - ld a, $1 + ld a, $01 ld [rVBK], a ld hl, w3_d800 debgcoord 0, 0 - lb bc, $3, $24 + lb bc, $03, $24 call Get2bpp pop af @@ -1665,7 +1665,7 @@ _LinkBattleSendReceiveAction: ; 100a09 ld a, b .use_move - and $f + and $0f ret ; 100a53 @@ -1709,13 +1709,13 @@ _LinkBattleSendReceiveAction: ; 100a09 call DelayFrame call GetJoypad callba Function100382 - ld c, $1 - ld b, $3 + ld c, $01 + ld b, $03 push bc call Function10062d pop bc jr c, .asm_100ac7 - ld b, $1 + ld b, $01 call Function10079c jr c, .asm_100ac7 call Function1009f3 @@ -1730,7 +1730,7 @@ _LinkBattleSendReceiveAction: ; 100a09 jr .asm_100ace .asm_100ac7 - ld a, $f + ld a, $0f ld [wd430], a jr .asm_100ace @@ -1743,7 +1743,7 @@ Function100acf: ; 100acf ld hl, wccb5 ld a, [wd431] ld [hli], a - ld c, $1 + ld c, $01 .asm_100adb ld a, [de] inc de @@ -1775,7 +1775,7 @@ Function100ae7: ; 100ae7 ret .asm_100aff - ld a, $f + ld a, $0f ld [wd430], a ld a, $f1 ld [wcd2b], a @@ -1915,7 +1915,7 @@ MobileMoveSelectionScreen: ; 100b9f inc a cp b jp nz, .master_loop - ld a, $1 + ld a, $01 ld [wMenuCursorY], a jp .master_loop @@ -1923,7 +1923,7 @@ MobileMoveSelectionScreen: ; 100b9f ld a, [wMenuCursorY] dec a ld [CurMoveNum], a - ld a, $1 + ld a, $01 and a ret @@ -1942,7 +1942,7 @@ MobileMoveSelectionScreen: ; 100b9f jr z, .no_pp_left ld a, [PlayerDisableCount] swap a - and $f + and $0f dec a cp c jr z, .move_disabled @@ -2176,12 +2176,12 @@ Mobile_SetOverworldDelay: ; 100dd2 ; 100dd8 Function100dd8: ; 100dd8 - ld c, $1 - ld b, $3 + ld c, $01 + ld b, $03 callba Function10062d jr c, .asm_100dfb ld c, $3c - ld b, $1 + ld b, $01 call Function10079c jr c, .asm_100dfb callba Function10032e @@ -2256,7 +2256,7 @@ Function100e2d: ; 100e2d Function100e63: ; 100e63 ld a, e - cp $2 + cp $02 ret nz call Function100db0 ret nc @@ -2270,7 +2270,7 @@ Function100e72: ; 100e72 ld hl, wcd29 bit 0, [hl] jr z, .asm_100e7c - ld a, $a + ld a, $0a .asm_100e7c ld [wcd67], a @@ -2322,7 +2322,7 @@ asm_100eb8 ld hl, wcd68 inc [hl] ld a, [hl] - cp $2 + cp $02 ret c ld [hl], 0 jr Function100ec5 @@ -2344,7 +2344,7 @@ Function100eca: ; 100eca Function100ed4: ; 100ed4 callba ApplyPals - ld a, $1 + ld a, $01 ld [hCGBPalUpdate], a ret ; 100edf @@ -2426,11 +2426,11 @@ asm_100f02: Function100f3d: ; 100f3d ; parameter ld a, [StringBuffer2] - cp $2 + cp $02 jr z, .two - cp $1 + cp $01 jr z, .one - cp $3 + cp $03 jr z, .three ret @@ -2501,11 +2501,11 @@ Function100f8d: ; 100f8d res 7, a jr z, .sram and a - jr nz, .wram + jr nz, .far_wram call CopyBytes ret -.wram +.far_wram and $7f call FarCopyWRAM ret @@ -2531,7 +2531,7 @@ Unknown_100fc0: ; 100fc0 db -1 Unknown_100feb: ; 100feb - dbwww $0, sPartyMail, MAIL_STRUCT_LENGTH * PARTY_LENGTH, NULL + dbwww $00, sPartyMail, MAIL_STRUCT_LENGTH * PARTY_LENGTH, NULL db -1 Unknown_100ff3: ; 100ff3 @@ -2541,12 +2541,12 @@ Unknown_100ff3: ; 100ff3 dbwww $80, PlayerID, 2, NULL dbwww $80, wSecretID, 2, NULL dbwww $80, PlayerGender, 1, NULL - dbwww $4, $a603, 8, NULL - dbwww $4, $a007, PARTYMON_STRUCT_LENGTH, NULL + dbwww $04, $a603, 8, NULL + dbwww $04, $a007, PARTYMON_STRUCT_LENGTH, NULL db -1 Unknown_10102c: ; 10102c - dbwww $80, OTPlayerName, 11, NULL + dbwww $80, OTPlayerName, NAME_LENGTH, NULL dbwww $80, OTPlayerID, 2, NULL dbwww $80, OTPartyMonNicknames, PKMN_NAME_LENGTH * PARTY_LENGTH, NULL dbwww $80, OTPartyMonOT, NAME_LENGTH * PARTY_LENGTH, NULL @@ -2566,7 +2566,7 @@ endr ld [hl], e inc hl ld [hl], d - ld a, $7 + ld a, $07 call GetSRAMBank ld hl, wc608 ld de, $a001 @@ -2684,10 +2684,10 @@ Function101145: ; 101145 inc bc pop af inc a - cp $3 + cp $03 jr nz, .asm_10114a pop de - ld a, $3 + ld a, $03 ld [de], a inc de ld hl, StringBuffer2 + 6 @@ -2739,7 +2739,7 @@ asm_101184: ld [StringBuffer2 + 4], a ld a, d ld [StringBuffer2 + 5], a - ld a, $3 + ld a, $03 .asm_1011a0 push af ld a, [hli] @@ -2793,7 +2793,7 @@ Function1011e8: ; 1011e8 ; 1011f1 Function1011f1: ; 1011f1 - ld a, $4 + ld a, $04 call GetSRAMBank ld a, [$a60c] ld [wdc41], a @@ -2890,10 +2890,10 @@ Function10127e: ; 10127e ld a, [wdc5f] and a jr z, .asm_101290 - cp $1 + cp $01 ld c, $27 jr z, .asm_101292 - cp $2 + cp $02 ld c, $37 jr z, .asm_101292 @@ -3047,7 +3047,7 @@ Function10138b: ; 10138b .asm_10139f sla c ld a, [wcd21] - cp $1 + cp $01 jr z, .asm_1013a9 inc c @@ -3165,7 +3165,7 @@ Function101418: ; 101418 ; 10142c Function10142c: ; 10142c - ld a, $1 + ld a, $01 ld [wc305], a callba Function115e18 ret @@ -3253,7 +3253,7 @@ Function1014a6: ; 1014a6 Function1014b7: ; 1014b7 call GetJoypad ld a, [hJoyPressed] - and $3 + and $03 jr nz, .asm_1014c5 ld hl, wcd42 dec [hl] @@ -3300,7 +3300,7 @@ Function101507: ; 101507 ld de, wcd30 ld hl, $40 ld bc, $40 - ld a, $2 + ld a, $02 call Function3e32 ld a, [wcd25] inc a @@ -3327,7 +3327,7 @@ Function10152a: ; 10152a ; 101537 Function101537: ; 101537 - ld a, $a + ld a, $0a call Function3e32 ld a, [wcd25] inc a @@ -3348,7 +3348,7 @@ Function101544: ; 101544 Function101557: ; 101557 callba Function100641 ld hl, wcd53 - ld a, $8 + ld a, $08 call Function3e32 ld a, [wcd25] inc a @@ -3365,7 +3365,7 @@ Function101571: ; 101571 ret c ret z ld a, e - cp $1 + cp $01 jr z, .asm_101582 ld [wcd2b], a ret @@ -3380,7 +3380,7 @@ Function101571: ; 101571 Function10158a: ; 10158a callba Function10064c ld a, [wcd44] - cp $a + cp $0a jr c, Function10156d ld a, $fb ld [wcd2b], a @@ -3391,7 +3391,7 @@ Function10159d: ; 10159d ld de, wc608 callba Function100edf ld de, wc608 - ld a, $5 + ld a, $05 ld hl, w5_d800 call Function10174c ld a, 0 @@ -3406,7 +3406,7 @@ Function1015be: ; 1015be ld de, wc608 callba Function100eed ld de, wc608 - ld a, $5 + ld a, $05 ld hl, w5_d800 call Function10174c ld a, 0 @@ -3421,7 +3421,7 @@ Function1015df: ; 1015df ld de, wc608 callba Function100ef4 ld de, wc608 - ld a, $5 + ld a, $05 ld hl, w5_d800 call Function10174c ld a, 0 @@ -3436,7 +3436,7 @@ Function101600: ; 101600 ld hl, w5_d800 ld de, wc608 ld bc, $1e0 - ld a, $5 + ld a, $05 call FarCopyWRAM ld de, wc608 callba Function100ee6 @@ -3477,34 +3477,34 @@ Function10163f: ; 10163f ; 101649 Function101649: ; 101649 - ld a, $5 + ld a, $05 ld hl, w5_d800 call Function101635 - ld a, $5 + ld a, $05 ld de, w5_da00 call Function10163f ret ; 10165a Function10165a: ; 10165a - ld a, $5 + ld a, $05 ld hl, w5_da00 call Function101635 ret ; 101663 Function101663: ; 101663 - ld a, $5 + ld a, $05 ld hl, w5_d800 call Function101635 - ld a, $5 + ld a, $05 ld de, w5_dc00 call Function10163f ret ; 101674 Function101674: ; 101674 ; unreferenced - ld a, $5 + ld a, $05 ld hl, w5_dc00 call Function101635 ret @@ -3525,11 +3525,11 @@ Function10168a: ; 10168a Function10168e: ; 10168e ld b, 0 - ld c, $1 + ld c, $01 callba Function10079c ret c - ld c, $1 - ld b, $3 + ld c, $01 + ld b, $03 callba Function10062d ret c ld a, [wcd26] @@ -3758,11 +3758,11 @@ Function1017f1: ; 1017f1 Function1017f5: ; 1017f5 ld b, 0 - ld c, $1 + ld c, $01 callba Function10079c ret c - ld c, $1 - ld b, $3 + ld c, $01 + ld b, $03 callba Function10062d ret c callba Function100382 @@ -3782,9 +3782,9 @@ Function1017f5: ; 1017f5 Function101826: ; 101826 ld a, [wcd21] - cp $2 + cp $02 jr z, .asm_101833 - cp $1 + cp $01 jr z, .asm_101844 jr .asm_101869 @@ -3801,10 +3801,10 @@ Function101826: ; 101826 callba Function103654 ld a, c ld hl, Unknown_101882 - cp $1 + cp $01 jr z, .asm_10185b ld hl, Unknown_101895 - cp $2 + cp $02 jr z, .asm_10185b jr .asm_101869 @@ -3829,17 +3829,17 @@ SECTION "ascii 10186f", ROMX, BANK[$40] Unknown_10186f: db .end - @ - db $19, $73, $9, $13, "trade_crystal" + db $19, $73, $09, $13, "trade_crystal" .end db 0 Unknown_101882: db .end - @ - db $19, $67, $10, $1, "free__crystal" + db $19, $67, $10, $01, "free__crystal" .end db 0 Unknown_101895: db .end - @ - db $19, $67, $10, $1, "limit_crystal" + db $19, $67, $10, $01, "limit_crystal" .end db 0 ; 1018a8 @@ -3849,12 +3849,12 @@ SECTION "bank40_3", ROMX, BANK[$40] Function1018a8: ; 1018a8 ld hl, wccb5 ld de, wcc61 - ld a, $4 + ld a, $04 call Function101406 jr c, .asm_1018d0 ld hl, wccb9 ld de, wcc65 - ld a, $6 + ld a, $06 call Function101406 jr c, .asm_1018ca ld a, [wcd25] @@ -3890,7 +3890,7 @@ Function1018e1: ; 1018e1 ; 1018ec Function1018ec: ; 1018ec - ld a, $a + ld a, $0a ld hl, wccb4 ld [hli], a ld c, a @@ -3933,9 +3933,9 @@ Function101913: ; 101913 ld a, $90 ld [hWY], a ld a, [wcd21] - cp $1 + cp $01 jr z, .asm_10193f - cp $2 + cp $02 jr z, .asm_101945 ld a, $71 ld [wcd25], a @@ -3977,7 +3977,7 @@ Function10196d: ; 10196d set 5, [hl] ld hl, wcd2a set 6, [hl] - ld a, $6 + ld a, $06 ld [wccb4], a ld hl, wdc5c ld de, wccb5 @@ -4026,7 +4026,7 @@ Function1019ab: ; 1019ab Function1019ee: ; 1019ee ld a, [rSVBK] push af - ld a, $5 + ld a, $05 ld [rSVBK], a ld bc, w5_dc0d @@ -4044,9 +4044,9 @@ Function1019ee: ; 1019ee call CopyBytes ld a, [wcd2f] and a - ld a, $2 + ld a, $02 jr z, .asm_101a1e - ld a, $1 + ld a, $01 .asm_101a1e ld [hLinkPlayerNumber], a @@ -4058,9 +4058,9 @@ Function101a21: ; 101a21 ld a, [hl] push af and $20 - or $1 + or $01 ld [hl], a - ld a, $1 + ld a, $01 ld [wc2d7], a callba BattleIntro callba DoBattle @@ -4075,7 +4075,7 @@ Function101a21: ; 101a21 ; 101a4f Function101a4f: ; 101a4f - ld a, $1 + ld a, $01 ld [wc2d7], a callba DetermineMobileBattleResult xor a @@ -4105,7 +4105,7 @@ Function101a97: ; 101a97 callba Function115d99 ld hl, wcd29 set 7, [hl] - ld c, $2 + ld c, $02 call Function10142c ld hl, wcd29 set 6, [hl] @@ -4116,7 +4116,7 @@ Function101a97: ; 101a97 ; 101ab4 Function101ab4: ; 101ab4 - ld e, $1 + ld e, $01 call Function101ee4 ld hl, wcd29 set 5, [hl] @@ -4130,7 +4130,7 @@ Function101ac6: ; 101ac6 callba Function115d99 ld hl, wcd29 set 7, [hl] - ld c, $2 + ld c, $02 call Function10142c ld hl, wcd29 set 6, [hl] @@ -4148,11 +4148,11 @@ Function101aed: ; 101aed callba Function115d99 ld hl, wcd29 set 7, [hl] - ld c, $2 + ld c, $02 call Function10142c ld hl, wcd29 set 6, [hl] - ld a, $1 + ld a, $01 ld [wcd2f], a ld a, [wcd25] inc a @@ -4163,7 +4163,7 @@ Function101aed: ; 101aed Function101b0f: ; 101b0f ld c, 0 call Function10142c - ld e, $3 + ld e, $03 call Function101ee4 ld hl, wcd29 set 5, [hl] @@ -4186,9 +4186,9 @@ Function101b2b: ; 101b2b ld a, 0 ld [wcd26], a ld a, [wMenuCursorY] - cp $1 + cp $01 jr z, .asm_101b51 - ld a, $2 + ld a, $02 ld [wcd2b], a ret @@ -4200,9 +4200,9 @@ Function101b2b: ; 101b2b ; 101b59 Function101b59: ; 101b59 - ld c, $2 + ld c, $02 call Function10142c - ld e, $2 + ld e, $02 call Function101ee4 ld hl, wcd29 set 5, [hl] @@ -4213,9 +4213,9 @@ Function101b59: ; 101b59 ; 101b70 Function101b70: ; 101b70 - ld c, $2 + ld c, $02 call Function10142c - ld e, $4 + ld e, $04 call Function101ee4 ld hl, wcd29 set 5, [hl] @@ -4239,9 +4239,9 @@ Function101b8f: ; 101b8f ld a, 0 ld [wcd26], a ld a, [wMenuCursorY] - cp $1 + cp $01 jr z, .asm_101bbc - ld a, $1 + ld a, $01 ld [wcd2f], a ld a, [wcd25] inc a @@ -4258,9 +4258,9 @@ Function101b8f: ; 101b8f ; 101bc8 Function101bc8: ; 101bc8 - ld c, $2 + ld c, $02 call Function10142c - ld e, $8 + ld e, $08 call Function101ee4 call Function102048 call Function1013dd @@ -4283,22 +4283,22 @@ Function101be5: ; 101be5 ld a, 0 ld [wcd26], a ld a, [wMenuCursorY] - cp $1 + cp $01 jr nz, .asm_101c0b ld a, $2a ld [wcd25], a ret .asm_101c0b - ld a, $2 + ld a, $02 ld [wcd2b], a ret ; 101c11 Function101c11: ; 101c11 - ld a, $1 + ld a, $01 ld [wdc5f], a - ld e, $9 + ld e, $09 call Function101ee4 call Function102048 ld hl, wcd29 @@ -4310,9 +4310,9 @@ Function101c11: ; 101c11 ; 101c2b Function101c2b: ; 101c2b - ld a, $2 + ld a, $02 ld [wdc5f], a - ld e, $7 + ld e, $07 call Function101ee4 ld hl, wcd29 set 5, [hl] @@ -4332,7 +4332,7 @@ Function101c42: ; 101c42 ; 101c50 Function101c50: ; 101c50 - ld e, $a + ld e, $0a call Function101ee4 ld hl, wcd29 set 2, [hl] @@ -4346,13 +4346,13 @@ Function101c62: ; 101c62 callba Function115d99 ld hl, wcd29 set 7, [hl] - ld c, $1 + ld c, $01 call Function10142c xor a ld [wc30d], a ld hl, wcd29 res 4, [hl] - ld e, $b + ld e, $0b call Function101ee4 ld hl, wcd29 set 5, [hl] @@ -4373,9 +4373,9 @@ Function101c92: ; 101c92 ; 101ca0 Function101ca0: ; 101ca0 - ld c, $2 + ld c, $02 call Function10142c - ld e, $c + ld e, $0c call Function101ee4 ld hl, wcd29 set 5, [hl] @@ -4388,21 +4388,21 @@ Function101ca0: ; 101ca0 ; 101cbc Function101cbc: ; 101cbc - ld a, $1 + ld a, $01 ld [wcd2b], a ret ; 101cc2 Function101cc2: ; 101cc2 ; unreferenced - ld a, $2 + ld a, $02 ld [wcd2b], a ret ; 101cc8 Function101cc8: ; 101cc8 - ld a, $1 + ld a, $01 ld [wc314], a - ld a, $1 + ld a, $01 ld [wc30d], a ld hl, wcd29 set 4, [hl] @@ -4413,9 +4413,9 @@ Function101cc8: ; 101cc8 ; 101cdf Function101cdf: ; 101cdf - ld a, $6 + ld a, $06 ld [wc314], a - ld a, $1 + ld a, $01 ld [wc30d], a ld hl, wcd29 set 4, [hl] @@ -4426,7 +4426,7 @@ Function101cdf: ; 101cdf ; 101cf6 Function101cf6: ; 101cf6 - ld a, $b + ld a, $0b ld [wc314 + 1], a ld a, [wcd25] inc a @@ -4435,7 +4435,7 @@ Function101cf6: ; 101cf6 ; 101d03 Function101d03: ; 101d03 - ld a, $e + ld a, $0e ld [wc314 + 1], a ld a, [wcd25] inc a @@ -4444,7 +4444,7 @@ Function101d03: ; 101d03 ; 101d10 Function101d10: ; 101d10 - ld c, $1 + ld c, $01 call Function10142c ld a, [wcd25] inc a @@ -4452,7 +4452,7 @@ Function101d10: ; 101d10 jr Function101d2a Function101d1e: ; 101d1e - ld c, $3 + ld c, $03 call Function10142c ld a, [wcd25] inc a @@ -4522,13 +4522,13 @@ Function101d7b: ; 101d7b ; 101d8d Unknown_101d8d: ; 101d8d - db $15, $15, $1f, $1f, $c, $12, $3a, $3a + db $15, $15, $1f, $1f, $0c, $12, $3a, $3a ; 101d95 Function101d95: ; 101d95 call Function101ee2 call LoadStandardMenuDataHeader - ld e, $e + ld e, $0e call Function101ee4 ld hl, wcd29 set 5, [hl] @@ -4552,7 +4552,7 @@ Function101db2: ; 101db2 ret .asm_101dca - ld a, $2 + ld a, $02 ld [wcd2b], a ret ; 101dd0 @@ -4590,7 +4590,7 @@ Function101de3: ; 101de3 .asm_101e00 call Function101ed3 - ld a, $2 + ld a, $02 ld [wcd2b], a ret ; 101e09 @@ -4616,7 +4616,7 @@ Function101e09: ; 101e09 ret .asm_101e2b - ld a, $2 + ld a, $02 ld [wcd2b], a ret ; 101e31 @@ -4638,13 +4638,13 @@ Function101e39: ; 101e39 ret .asm_101e49 - ld a, $2 + ld a, $02 ld [wcd2b], a ret ; 101e4f Function101e4f: ; 101e4f - ld e, $6 + ld e, $06 call Function101ee4 call Function1013d6 ld a, [wcd25] @@ -4669,7 +4669,7 @@ Function101e64: ; 101e64 .asm_101e77 ld hl, wcd29 set 5, [hl] - ld a, $2 + ld a, $02 ld [wcd2b], a ret ; 101e82 @@ -4829,9 +4829,9 @@ Function10202c: ; 10202c callba Function115d99 ld hl, wcd29 set 7, [hl] - ld c, $2 + ld c, $02 call Function10142c - ld e, $d + ld e, $0d call Function101ee4 hlcoord 4, 4 call Function100681 @@ -4854,7 +4854,7 @@ Function10204c: ; 10204c jr z, .asm_102067 sub $30 jr c, .asm_102067 - cp $a + cp $0a jr nc, .asm_102067 add $f6 ld [hli], a @@ -4867,7 +4867,7 @@ Function10204c: ; 10204c Function102068: ; 102068 ld hl, wcd53 - ld c, $8 + ld c, $08 .asm_10206d ld a, [de] call Function102080 @@ -4885,8 +4885,8 @@ Function102068: ; 102068 ; 102080 Function102080: ; 102080 - and $f - cp $f + and $0f + cp $0f jr z, .asm_10208a add $30 ld [hli], a @@ -4919,7 +4919,7 @@ Function10209c: ; 10209c Function1020a8: ; 1020a8 call Function10209c - ld c, $1 + ld c, $01 ld de, wdc42 callba Function17a68f ret c @@ -4941,7 +4941,7 @@ Function1020bf: ; 1020bf call AddNTimes ld d, h ld e, l - ld a, $4 + ld a, $04 call GetSRAMBank call Function10208e call Function102068 @@ -4957,59 +4957,59 @@ Function1020bf: ; 1020bf Function1020ea: ; 1020ea ld hl, wdc41 bit 4, [hl] - jr z, .asm_102110 + jr z, .quit ld hl, wdc41 bit 2, [hl] - jr nz, .asm_102110 + jr nz, .quit call Function10218d ld hl, wc608 bit 4, [hl] - jr z, .asm_102110 + jr z, .quit ld hl, wc608 bit 2, [hl] - jr nz, .asm_102110 + jr nz, .quit call Function102112 - jr z, .asm_102110 + jr z, .quit and a ret -.asm_102110 +.quit scf ret ; 102112 Function102112: ; 102112 - ld a, $4 + ld a, $04 call GetSRAMBank ld hl, $a041 - ld c, $28 -.asm_10211c + ld c, 40 +.outer_loop push hl - ld de, wc60f - ld b, $1f -.asm_102122 + ld de, $c60f + ld b, 31 +.inner_loop ld a, [de] cp [hl] - jr nz, .asm_10212f + jr nz, .not_matching inc de inc hl dec b - jr nz, .asm_102122 + jr nz, .inner_loop pop hl xor a - jr .asm_10213c + jr .done -.asm_10212f +.not_matching pop hl - ld de, $25 + ld de, 37 add hl, de dec c - jr nz, .asm_10211c - ld a, $1 + jr nz, .outer_loop + ld a, $01 and a - jr .asm_10213c + jr .done ; useless jr -.asm_10213c +.done push af call CloseSRAM pop af @@ -5052,12 +5052,12 @@ Function102180: ; 102180 ; 10218d Function10218d: ; 10218d - ld hl, wdc00 + ld hl, w5_dc00 ld de, wc608 ld bc, $26 - ld a, $5 + ld a, $05 call FarCopyWRAM - ld de, wc608 + 1 + ld de, wc608 + 1 ; useless ret ; 10219f @@ -5075,7 +5075,7 @@ Function10219f: ; 10219f Function1021b8: ; 1021b8 call FadeToMenu call Function10218d - ld de, wc60f + ld de, wPlayerMoveStruct callba Function8ac70 ld a, c ld [StringBuffer1], a @@ -5206,7 +5206,7 @@ Function102274: ; 102274 ; 102283 Function102283: ; 102283 - ld a, $1 + ld a, $01 ld [AttrMapEnd], a ld hl, wcd4b set 0, [hl] @@ -5223,7 +5223,7 @@ Function10228e: ; 10228e Function102298: ; 102298 ld a, e - cp $2 + cp $02 ret nz ld hl, wcd4b bit 6, [hl] @@ -5246,7 +5246,7 @@ Function102298: ; 102298 .asm_1022c1 call Function10304f - ld a, $1 + ld a, $01 ld [AttrMapEnd], a ret ; 1022ca @@ -5268,7 +5268,7 @@ Function1022d0: ; 1022d0 ld a, 30 sub c ld c, a - ld b, $3 + ld b, $03 callba Function10062d jr c, .asm_1022f3 xor a @@ -5372,7 +5372,7 @@ Function102387: ; 102387 call PlayMusic call Function102d9a call Function102dd3 - ld a, $1 + ld a, $01 ld [wMenuCursorY], a Function1023a1: ; 1023a1 @@ -5582,13 +5582,13 @@ Function10250c: ; 10250c call Function1028fc ret nc ld a, [wcd51] - cp $f + cp $0f jr z, .asm_10254b and a jr z, .asm_102572 cp $aa jr z, .asm_102572 - cp $7 + cp $07 jr nc, .asm_102572 ld [wcd4d], a dec a @@ -5603,7 +5603,7 @@ Function10250c: ; 10250c jr c, .asm_102568 ld hl, wcd4b set 1, [hl] - ld a, $e + ld a, $0e ld [wcd49], a ret @@ -5642,7 +5642,7 @@ Function10250c: ; 10250c ld [wcd4e], a ld a, $3c ld [wcd4f], a - ld a, $9 + ld a, $09 ld [wcd49], a ret ; 102591 @@ -5664,7 +5664,7 @@ Function102591: ; 102591 ; 1025b0 Function1025b0: ; 1025b0 - ld a, $9 + ld a, $09 call Function1028e8 ld a, [wcd49] inc a @@ -5675,7 +5675,7 @@ Function1025b0: ; 1025b0 Function1025bd: ; 1025bd call Function1028fc ret nc - ld a, $4 + ld a, $04 ld [wcd49], a ret ; 1025c7 @@ -5684,7 +5684,7 @@ Function1025c7: ; 1025c7 call Function102f6d ld hl, wcd4b set 1, [hl] - ld a, $f + ld a, $0f call Function1028e8 ld a, [wcd49] inc a @@ -5753,7 +5753,7 @@ Function1025ff: ; 1025ff .d_down ld a, [wMenuCursorY] - cp $1 + cp $01 ret nz ld a, $23 ; Function1026b7 ld [wcd49], a @@ -5869,7 +5869,7 @@ Function1026f3: ; 1026f3 .asm_102702 hlcoord 9, 17 ld [hl], " " - ld a, $1 + ld a, $01 ld [wMenuCursorY], a ld a, $1d ; Function102652 ld [wcd49], a @@ -5928,7 +5928,7 @@ Jumptable_102766: ; 102766 ; 102770 Function102770: ; 102770 - ld a, $1 + ld a, $01 ld [wcd4a], a Function102775: ; 102775 @@ -5955,7 +5955,7 @@ Function10278c: ; 10278c ret .asm_10279b - ld a, $3 + ld a, $03 ld [wcd4a], a Function1027a0: ; 1027a0 hlcoord 1, 16 @@ -6060,7 +6060,7 @@ Function10283c: ; 10283c ; 102862 Function102862: ; 102862 - ld a, $8 + ld a, $08 call Function1028e8 ld a, [wcd49] inc a @@ -6074,7 +6074,7 @@ Function10286f: ; 10286f ld a, [wcd52] ld [wMenuCursorY], a ld a, [wcd51] - cp $8 + cp $08 jr nz, .asm_102886 ld a, $15 ; Function1023b5 ld [wcd49], a @@ -6260,7 +6260,7 @@ Function102996: ; 102996 ; 10299e Function10299e: ; 10299e - ld a, $1 + ld a, $01 ld [wccb4], a ld a, [wcd50] ld [wccb5], a @@ -6331,14 +6331,14 @@ Function1029fe: ; 1029fe call ExitMenu pop af ld a, [wMenuCursorY] - cp $1 + cp $01 jr nz, .asm_102a21 - ld a, $1 + ld a, $01 and a ret .asm_102a21 - ld a, $1 + ld a, $01 and a scf ret @@ -6361,7 +6361,7 @@ Function102a3b: ; 102a3b ld a, [wcd30] ld [wc74e], a ld hl, PlayerName - ld de, wc6e7 + ld de, wPlayerTrademonSenderName ld bc, NAME_LENGTH call CopyBytes ld a, [wcd4c] @@ -6474,7 +6474,7 @@ Function102b32: ; 102b32 ld a, [wcd4c] dec a ld [CurPartyMon], a - ld a, $1 + ld a, $01 ld [wForceEvolution], a callba EvolvePokemon call Function102d9a @@ -6645,9 +6645,9 @@ Function102c48: ; 102c48 call Function102c71 call CloseSRAM ld hl, wc608 - ld de, wda00 + ld de, w5_da00 ld bc, $1e0 - ld a, $5 + ld a, $05 call FarCopyWRAM ret ; 102c71 @@ -6691,15 +6691,15 @@ Function102c87: ; 102c87 ld [wJumptableIndex], a ld a, [OTPartyCount] ld [wcf64], a - ld a, $5 - ld hl, wda00 + ld a, $05 + ld hl, w5_da00 ld de, wc608 ld bc, $11a call FarCopyWRAM call Function102cee - ld a, $5 + ld a, $05 ld hl, wc608 - ld de, wda00 + ld de, w5_da00 ld bc, $11a call FarCopyWRAM pop af @@ -6718,7 +6718,7 @@ Function102cee: ; 102cee call CopyBytes ld a, [wJumptableIndex] ld c, a - ld a, $6 + ld a, $06 sub c ret z ld bc, $2f @@ -6801,11 +6801,11 @@ Function102d48: ; 102d48 ; 102d9a Function102d9a: ; 102d9a - ld a, $7f - ld hl, SpritesEnd + ld a, " " + hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call ByteFill - ld a, $7 + ld a, $07 hlcoord 0, 0, AttrMap ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call ByteFill @@ -6823,8 +6823,8 @@ Function102db7: ; 102db7 Function102dc3: ; 102dc3 hlcoord 0, 12 - ld b, $4 - ld c, $12 + ld b, 4 + ld c, 18 ld d, h ld e, l callba _LinkTextbox @@ -6843,10 +6843,10 @@ Function102dd3: ; 102dd3 ; 102dec Function102dec: ; 102dec - ld hl, Unknown_1032e2 + ld hl, Palettes_1032e2 ld de, UnknOBPals - ld bc, $20 - ld a, $5 + ld bc, 4 palettes + ld a, $05 call FarCopyWRAM callba Function49742 call SetPalettes @@ -6856,41 +6856,42 @@ Function102dec: ; 102dec Function102e07: ; 102e07 hlcoord 3, 10 - ld b, $1 - ld c, $b + ld b, 1 + ld c, 11 ld a, [wBattleMode] and a - jr z, .asm_102e19 + jr z, .link_battle call TextBox - jr .asm_102e28 + jr .okay -.asm_102e19 +.link_battle +; this is idiotic hlcoord 3, 10 - ld b, $1 - ld c, $b + ld b, 1 + ld c, 11 ld d, h ld e, l callba _LinkTextbox -.asm_102e28 - ld de, String_102e32 +.okay + ld de, .waiting hlcoord 4, 11 call PlaceString ret ; 102e32 -String_102e32: ; 102e32 +.waiting: ; 102e32 db "Waiting...!@" ; 102e3e Function102e3e: ; 102e3e - ld de, String_102e48 + ld de, .CANCEL hlcoord 10, 17 call PlaceString ret ; 102e48 -String_102e48: ; 102e48 +.CANCEL: ; 102e48 db "CANCEL@" ; 102e4f @@ -6909,16 +6910,16 @@ Function102e4f: ; 102e4f ld [bc], a hlcoord 7, 1 ld de, PartySpecies - call Function102e86 + call .PlaceSpeciesNames hlcoord 7, 9 ld de, OTPartySpecies - call Function102e86 + call .PlaceSpeciesNames ret ; 102e86 -Function102e86: ; 102e86 +.PlaceSpeciesNames: ; 102e86 ld c, 0 -.asm_102e88 +.count_loop ld a, [de] cp $ff ret z @@ -6935,11 +6936,11 @@ Function102e86: ; 102e86 pop de inc de pop hl - ld bc, $14 + ld bc, SCREEN_WIDTH add hl, bc pop bc inc c - jr .asm_102e88 + jr .count_loop ; 102ea8 Function102ea8: ; 102ea8 @@ -6991,49 +6992,49 @@ String_102ef4: ; 102ef4 Function102f15: ; 102f15 call Function102dc3 - ld de, String_102f22 + ld de, .TooBadTheTradeWasCanceled hlcoord 1, 14 call PlaceString ret ; 102f22 -String_102f22: ; 102f22 +.TooBadTheTradeWasCanceled: ; 102f22 db "こうかんを キャンセルしました@" ; 102f32 Function102f32: ; 102f32 call Function102dc3 - ld de, String_102f3f + ld de, .TradeCompleted hlcoord 1, 14 call PlaceString ret ; 102f3f -String_102f3f: ; 102f3f +.TradeCompleted: ; 102f3f db "Trade completed!@" ; 102f50 Function102f50: ; 102f50 call Function102dc3 - ld de, String_102f5d + ld de, .PleaseWait hlcoord 1, 14 call PlaceString ret ; 102f5d -String_102f5d: ; 102f5d +.PleaseWait: ; 102f5d db "しょうしょう おまち ください@" ; 102f6d Function102f6d: ; 102f6d call Function102dc3 - ld de, String_102f7a + ld de, .Finished hlcoord 1, 14 call PlaceString ret ; 102f7a -String_102f7a: ; 102f7a +.Finished: ; 102f7a db "しゅうりょう します@" ; 102f85 @@ -7059,8 +7060,8 @@ Function102f85: ; 102f85 ; 102fb2 String_102fb2: ; 102fb2 - db "あいてがわ", $4a, "えらんだ " - next "いじょう", $4a, "あるようです!!" + db "あいてがわえらんだ " + next "いじょうあるようです!!" db "@" ; 102fcc @@ -7077,8 +7078,8 @@ Function102fce: ; 102fce ; 102fdb String_102fdb: ; 102fdb - db "あいてがわ", $25, "せんたくに" - next "いじょう", $4a, "あるようです!!" + db "あいてがわ%せんたくに" + next "いじょうあるようです!!" done ; 102ff5 @@ -7132,7 +7133,7 @@ Function10305d: ; 10305d ; 10306e Function10306e: ; 10306e - ld a, $1 + ld a, $01 ld [hOAMUpdate], a call ClearSprites ld de, Sprites @@ -7143,11 +7144,11 @@ Function10306e: ; 10306e ; 10307f Function10307f: ; 10307f - ld c, $2 + ld c, $02 ld hl, wcd4b bit 7, [hl] jr z, .asm_10308a - ld c, $1 + ld c, $01 .asm_10308a ld hl, wcf45 @@ -7209,7 +7210,7 @@ endr ld bc, Unknown_103112 add hl, bc ld b, $30 - ld c, $8 + ld c, $08 .asm_1030de push hl ld hl, wcd4b @@ -7217,7 +7218,7 @@ endr pop hl ld a, 0 jr z, .asm_1030eb - ld a, $5 + ld a, $05 .asm_1030eb add [hl] @@ -7238,7 +7239,7 @@ endr inc hl ld [de], a inc de - ld a, $a + ld a, $0a add [hl] inc hl ld [de], a @@ -7251,7 +7252,7 @@ endr inc de pop hl ld a, b - add $8 + add $08 ld b, a dec c jr nz, .asm_1030de @@ -7259,77 +7260,89 @@ endr ; 103112 Unknown_103112: ; 103112 - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $1, $0, $0, $0, $0, $0, $0, $ - db $2, $1, $0, $0, $0, $0, $0, $ - db $3, $2, $1, $0, $0, $0, $0, $ - db $4, $3, $2, $1, $0, $0, $0, $ - db $4, $4, $3, $2, $1, $0, $0, $ - db $4, $4, $4, $3, $2, $1, $0, $ - db $4, $4, $4, $4, $3, $2, $1, $ - db $4, $4, $4, $4, $4, $3, $2, $1 - db $4, $4, $4, $4, $4, $4, $3, $2 - db $4, $4, $4, $4, $4, $4, $4, $3 - db $4, $4, $4, $4, $4, $4, $4, $4 - db $4, $4, $4, $4, $4, $4, $4, $4 - db $4, $4, $4, $4, $4, $4, $4, $4 - db $4, $4, $4, $4, $4, $4, $4, $4 - db $4, $4, $4, $4, $4, $4, $4, $4 - db $4, $4, $4, $4, $4, $4, $4, $4 - db $4, $4, $4, $4, $4, $4, $4, $4 - db $4, $4, $4, $4, $4, $4, $4, $4 - db $3, $4, $4, $4, $4, $4, $4, $4 - db $2, $3, $4, $4, $4, $4, $4, $4 - db $1, $2, $3, $4, $4, $4, $4, $4 - db $0, $1, $2, $3, $4, $4, $4, $4 - db $0, $0, $1, $2, $3, $4, $4, $4 - db $0, $0, $0, $1, $2, $3, $4, $4 - db $0, $0, $0, $0, $1, $2, $3, $4 - db $0, $0, $0, $0, $0, $1, $2, $3 - db $0, $0, $0, $0, $0, $0, $1, $2 - db $0, $0, $0, $0, $0, $0, $0, $1 - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ - db $0, $0, $0, $0, $0, $0, $0, $ + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $01, $00, $00, $00, $00, $00, $00, $00 + db $02, $01, $00, $00, $00, $00, $00, $00 + db $03, $02, $01, $00, $00, $00, $00, $00 + db $04, $03, $02, $01, $00, $00, $00, $00 + db $04, $04, $03, $02, $01, $00, $00, $00 + db $04, $04, $04, $03, $02, $01, $00, $00 + db $04, $04, $04, $04, $03, $02, $01, $00 + db $04, $04, $04, $04, $04, $03, $02, $01 + db $04, $04, $04, $04, $04, $04, $03, $02 + db $04, $04, $04, $04, $04, $04, $04, $03 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $03, $04, $04, $04, $04, $04, $04, $04 + db $02, $03, $04, $04, $04, $04, $04, $04 + db $01, $02, $03, $04, $04, $04, $04, $04 + db $00, $01, $02, $03, $04, $04, $04, $04 + db $00, $00, $01, $02, $03, $04, $04, $04 + db $00, $00, $00, $01, $02, $03, $04, $04 + db $00, $00, $00, $00, $01, $02, $03, $04 + db $00, $00, $00, $00, $00, $01, $02, $03 + db $00, $00, $00, $00, $00, $00, $01, $02 + db $00, $00, $00, $00, $00, $00, $00, $01 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 ; 10327a Unknown_10327a: ; 10327a - db $0, $0, $0, $ - db $0, $0, $1, $ - db $0, $0, $2, $ - db $0, $0, $3, $ - db $0, $0, $1, $1 - db $0, $0, $0, $ - db $0, $0, $1, $2 - db $0, $0, $2, $2 - db $0, $0, $3, $2 - db $0, $0, $1, $3 + db $00, $00, $00, $00 + db $00, $00, $01, $00 + db $00, $00, $02, $00 + db $00, $00, $03, $00 + db $00, $00, $01, $01 + db $00, $00, $00, $00 + db $00, $00, $01, $02 + db $00, $00, $02, $02 + db $00, $00, $03, $02 + db $00, $00, $01, $03 GFX_1032a2: INCBIN "gfx/unknown/1032a2.2bpp" -Unknown_1032e2: - db $0, $0, $ff, $1f - db $f4, $1b, $8d, $42 - db $0, $0, $67, $45 - db $0, $0, $0, $ - db $0, $0, $1f, $13 - db $99, $1, $ff, $10 - db $0, $0, $19, $ - db $0, $0, $0, $ +Palettes_1032e2: + RGB 0, 0, 0 + RGB 31, 31, 7 + RGB 20, 31, 6 + RGB 13, 20, 16 + + RGB 0, 0, 0 + RGB 7, 11, 17 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 31, 24, 4 + RGB 25, 12, 0 + RGB 31, 7, 4 + + RGB 0, 0, 0 + RGB 25, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + ; 103302 Function103302: ; 103302 @@ -7345,7 +7358,7 @@ Function103309: ; 103309 ld bc, 10 xor a call ByteFill - ld a, $4 + ld a, $04 call GetSRAMBank ld a, [wdc41] ld [$a60c], a @@ -7378,7 +7391,7 @@ Function103309: ; 103309 call Function1034be call UpdateSprites callba Function104000 - ld a, $1 + ld a, $01 ld [wd1f0], a call Function10339a ret @@ -7398,7 +7411,7 @@ Function103362: ; 103362 ld hl, Buffer2 bit 6, [hl] jr z, .asm_103398 - ld a, $4 + ld a, $04 call GetSRAMBank ld a, [Buffer1] ld [$a60c], a @@ -7448,7 +7461,7 @@ Function1033af: ; 1033af ld a, [wd1f0] dec a ld [wd1f0], a - cp $1 + cp $01 ret nc ld a, [wd1ee] ld [wd1f0], a @@ -7462,7 +7475,7 @@ Function1033af: ; 1033af ld a, [wd1ee] cp c ret nc - ld a, $1 + ld a, $01 ld [wd1f0], a ret @@ -7474,7 +7487,7 @@ Function1033af: ; 1033af .a ld a, [wd1f3] - cp $3 + cp $03 jr nz, .asm_103412 ld de, SFX_TRANSACTION call PlaySFX @@ -7488,7 +7501,7 @@ Function1033af: ; 1033af .right .asm_103412 ld a, [wd1f3] - cp $3 + cp $03 ret z ld de, SFX_PUSH_BUTTON call PlaySFX @@ -7511,12 +7524,12 @@ Function10342c: ; 10342c Function10343c: ; 10343c ld a, [wd1f3] - cp $2 + cp $02 jr nz, .asm_103452 ld bc, 1 call Function1034f7 ld c, $12 - ld b, $1 + ld b, $01 call Function1034e0 jr .asm_10345f @@ -7524,7 +7537,7 @@ Function10343c: ; 10343c ld bc, $ffed call Function1034f7 ld c, $12 - ld b, $2 + ld b, $02 call Function1034e0 .asm_10345f @@ -7558,7 +7571,7 @@ Function103487: ; 103487 Function103490: ; 103490 hlcoord 0, 15 ld c, $14 - ld b, $3 + ld b, $03 call Function1034e0 ld bc, 6 call Function10350f @@ -7580,7 +7593,7 @@ Function1034a7: ; 1034a7 ; 1034be Function1034be: ; 1034be - ld a, $1 + ld a, $01 ld [wd1f2], a ld hl, wd1ec ld a, [hli] @@ -7611,7 +7624,7 @@ Function1034e0: ; 1034e0 ld bc, AttrMap - TileMap add hl, bc pop bc - ld a, $6 + ld a, $06 call FillBoxWithByte ret ; 1034f1 @@ -7652,17 +7665,17 @@ Unknown_103522: ; 103522 dw String_103598 dw String_1035a0 dw String_10355f - db $1 + db $01 dw String_10354f dw String_1035a8 dw String_1035b1 dw String_103571 - db $2 + db $02 dw String_103557 dw String_1035ba dw String_1035bd dw String_103585 - db $4 + db $04 dw String_103545 dw String_1035c1 dw String_1035c1 @@ -7708,28 +7721,28 @@ Unknown_1035d7: ; 1035d7 Unknown_1035e7: ; 1035e7 dwcoord 0, 6 - db $12, $7, $7 + db $12, $07, $07 dw .this .this db 4, 2, 1, 0, 3 Unknown_1035f3: ; 1035f3 dwcoord 0, 7 - db $12, $6, $9 + db $12, $06, $09 dw .this .this db 3, 2, 1, 3 Unknown_1035fe: ; 1035fe dwcoord 0, 9 - db $12, $4, $b + db $12, $04, $0b dw .this .this db 2, 0, 3 Unknown_103608: ; 103608 dwcoord 0, 9 - db $12, $4, $b + db $12, $04, $0b dw .this .this db 2, 2, 3 @@ -7738,8 +7751,8 @@ Unknown_103608: ; 103608 AskMobileOrCable: ; 103612 ld hl, MenuDataHeader_103640 call LoadMenuDataHeader - ld a, [wdc40] - and $f + ld a, [wMobileOrCable_LastSelection] + and $0f jr z, .skip_load ld [wMenuCursorBuffer], a @@ -7750,10 +7763,10 @@ AskMobileOrCable: ; 103612 ld a, [wMenuCursorY] ld [ScriptVar], a ld c, a - ld a, [wdc40] + ld a, [wMobileOrCable_LastSelection] and $f0 or c - ld [wdc40], a + ld [wMobileOrCable_LastSelection], a ret .pressed_b @@ -7782,13 +7795,13 @@ Function103654: ; 103654 jr nz, .asm_103666 ld hl, wcd2a res 5, [hl] - ld c, $2 + ld c, $02 ret .asm_103666 ld hl, wcd2a set 5, [hl] - ld c, $1 + ld c, $01 ret ; 10366e @@ -7806,7 +7819,7 @@ Mobile_SelectThreeMons: ; 10366e jr .asm_103696 .asm_103690 - ld a, $1 + ld a, $01 ld [ScriptVar], a ret @@ -7816,7 +7829,7 @@ Mobile_SelectThreeMons: ; 10366e ret .asm_10369b - ld hl, wdc40 + ld hl, wMobileOrCable_LastSelection bit 7, [hl] set 7, [hl] jr nz, .asm_1036b5 @@ -7836,11 +7849,11 @@ Mobile_SelectThreeMons: ; 10366e call ExitMenu jr c, .asm_1036f4 ld a, [wMenuCursorY] - cp $1 + cp $01 jr z, .asm_1036d9 - cp $2 + cp $02 jr z, .asm_1036f4 - cp $3 + cp $03 jr z, .asm_1036ec jr .asm_1036b5 @@ -7851,7 +7864,7 @@ Mobile_SelectThreeMons: ; 10366e jr .asm_1036f4 .asm_1036e6 - ld a, $1 + ld a, $01 ld [ScriptVar], a ret @@ -7873,7 +7886,7 @@ Function1036f9: ; 1036f9 ; 103700 Function103700: ; 103700 - ld c, $a + ld c, $0a ld hl, SwarmFlags bit 4, [hl] jr z, .asm_10370f @@ -7883,11 +7896,11 @@ Function103700: ; 103700 ld a, c ld [StringBuffer2], a ld a, [StringBuffer2] - cp $5 + cp $05 jr nc, .asm_103724 - cp $2 + cp $02 jr nc, .asm_10372c - cp $1 + cp $01 jr nc, .asm_103734 jr .asm_10373c @@ -7975,7 +7988,7 @@ Function10378c: ; 10378c ld hl, SwarmFlags bit 4, [hl] jr nz, .already_set - ld c, $1 + ld c, $01 ld hl, SwarmFlags set 4, [hl] @@ -7984,7 +7997,7 @@ Function10378c: ; 10378c callba Link_SaveGame pop bc jr c, .failed_to_save - ld a, $1 + ld a, $01 ld [ScriptVar], a ld a, c and a @@ -8013,7 +8026,7 @@ Function1037c2: ; 1037c2 call PrintText call YesNoBox jr c, .nope - ld a, $1 + ld a, $01 ld [ScriptVar], a ret @@ -8046,12 +8059,12 @@ Function1037eb: ; 1037eb ld a, [wdc60] and a jr nz, .asm_103813 - ld a, $1 + ld a, $01 ld [ScriptVar], a ret .asm_103813 - ld a, $2 + ld a, $02 ld [ScriptVar], a ret ; 103819 @@ -8072,7 +8085,7 @@ Function103823: ; 103823 jr nz, .asm_103838 callba Function1008a6 ld a, c - cp $1 + cp $01 jr c, .asm_10383a .asm_103838 @@ -8085,7 +8098,7 @@ Function103823: ; 103823 ; 10383c Function10383c: ; 10383c - ld a, $1 + ld a, $01 ld [wdc60], a xor a ld hl, wdc5c @@ -8107,7 +8120,7 @@ Function10383c: ; 10383c ret .asm_103870 - ld a, $1 + ld a, $01 ld [ScriptVar], a ret ; 103876 diff --git a/misc/mobile_42.asm b/misc/mobile_42.asm index f5ed53c81..950a3f0c2 100644 --- a/misc/mobile_42.asm +++ b/misc/mobile_42.asm @@ -1242,9 +1242,9 @@ asm_108966 call MobileTradeAnim_ClearTilemap hlcoord 7, 2 xor a - ld [hFillBox], a + ld [hGraphicStartTile], a lb bc, 7, 7 - predef FillBox + predef PlaceGraphic call WaitBGMap ret ; 10898a @@ -1256,9 +1256,9 @@ Function10898a: ; 10898a call MobileTradeAnim_ClearTilemap hlcoord 7, 2 xor a - ld [hFillBox], a + ld [hGraphicStartTile], a lb bc, 7, 7 - predef FillBox + predef PlaceGraphic call WaitBGMap ret ; 1089a8 diff --git a/misc/mobile_45.asm b/misc/mobile_45.asm index 7ee14da4f..39d1f46ed 100644 --- a/misc/mobile_45.asm +++ b/misc/mobile_45.asm @@ -134,9 +134,9 @@ Function114243:: ; 114243 ld a, SRAM_ENABLE ld [MBC3SRamEnable], a ld a, [hFF8C] - push af ; if [wdc02] == 0, this is popped to pc. + push af ; if [$dc02] == 0, this is popped to pc. push de - ld a, [wdc02] + ld a, [$dc02] add a ld e, a ld d, 0 @@ -151,7 +151,7 @@ Function114243:: ; 114243 ; 11425c Function11425c: ; 11425c - ld [wdc02], a + ld [$dc02], a pop af rept 2 ld [hFF8C], a @@ -161,8 +161,7 @@ endr ; 114268 -Function114268: ; 114268 - ret +Function114268: mobile ; 114269 @@ -170,10 +169,10 @@ Function114269: ; 114269 ld h, d ld l, e xor a - ld [wdc02], a - ld [wdc03], a + ld [$dc02], a + ld [$dc03], a ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] @@ -188,7 +187,7 @@ Function114269: ; 114269 and a jr z, .asm_1142a4 ld h, a - ld a, [wdc03] + ld a, [$dc03] and a jr nz, .asm_114292 ld a, h @@ -200,7 +199,7 @@ Function114269: ; 114269 cp $d jr z, .asm_1142bb xor a - ld [wdc02], a + ld [$dc02], a .asm_11429b inc e call z, Function114333 @@ -210,7 +209,7 @@ Function114269: ; 114269 jr nz, .asm_114282 .asm_1142a4 - ld a, [wdc03] + ld a, [$dc03] and a jr nz, .asm_114303 ld b, $80 @@ -220,7 +219,7 @@ Function114269: ; 114269 ld b, $81 .asm_1142b0 - ld a, [wdc00] + ld a, [$dc00] ld c, a ld a, $1 ld h, d @@ -238,7 +237,7 @@ Function114269: ; 114269 jr z, .asm_1142a4 ld a, [de] ld h, a - ld a, [wdc03] + ld a, [$dc03] and a jr nz, .asm_1142d4 ld a, h @@ -249,14 +248,14 @@ Function114269: ; 114269 ld a, h cp $a jr nz, .asm_1142ae - ld a, [wdc03] + ld a, [$dc03] and a jr nz, .asm_11430d - ld a, [wdc02] + ld a, [$dc02] and a jr nz, .asm_114309 ld a, $1 - ld [wdc02], a + ld [$dc02], a inc e call z, Function114333 dec bc @@ -282,14 +281,14 @@ Function114269: ; 114269 .asm_114309 xor a - ld [wdc02], a + ld [$dc02], a .asm_11430d - ld a, [wdc02] + ld a, [$dc02] and a jr nz, .asm_1142fe ld a, $1 - ld [wdc03], a + ld [$dc03], a inc e call z, Function114333 dec bc @@ -302,14 +301,14 @@ Function114269: ; 114269 cp $2e jp nz, .asm_114282 ld a, $1 - ld [wdc02], a + ld [$dc02], a jp .asm_11429b ; 114333 Function114333: ; 114333 push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -348,7 +347,7 @@ Function11433c: ; 11433c .asm_114360 ld a, h - ld [wdc03], a + ld [$dc03], a pop hl push bc push de @@ -373,14 +372,14 @@ Function11433c: ; 11433c .asm_114381 pop de pop bc - ld a, [wdc03] - ld [wdc00], a + ld a, [$dc03] + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a call Function114c0b ld hl, String_114004 .asm_114394 - ld de, wdc24 + ld de, $dc24 .asm_114397 ld a, [hli] and a @@ -493,7 +492,7 @@ Function1143f3: ; 1143f3 Function114412: ; 114412 ld a, c - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld hl, Unknown_11417f @@ -528,8 +527,8 @@ Function114412: ; 114412 jr z, .asm_1144b8 .asm_11444a - ld a, [wdc00] - ld [wdc02], a + ld a, [$dc00] + ld [$dc02], a ld a, [de] and a jr z, .asm_1144c2 @@ -595,7 +594,7 @@ Function114412: ; 114412 jr z, .asm_114486 ld d, h ld e, l - ld a, [wdc02] + ld a, [$dc02] ld h, a xor a ret @@ -624,7 +623,7 @@ Function114412: ; 114412 Function1144c8: ; 1144c8 push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -654,10 +653,10 @@ endr ld [hl], a xor a ld [BigDoll], a - ld [wdc17], a + ld [$dc17], a ld a, $2 - ld [wdc0e], a - ld hl, wdc03 + ld [$dc0e], a + ld hl, $dc03 ld c, [hl] inc hl ld e, [hl] @@ -669,7 +668,7 @@ endr and a jr z, .asm_114511 ld a, $1 - ld [wdc0d], a + ld [$dc0d], a call Function1146fa and a jr nz, .asm_11455b @@ -680,7 +679,7 @@ endr and a jr nz, .asm_11455b ld a, $2 - ld [wdc0d], a + ld [$dc0d], a .asm_11451c pop hl @@ -691,7 +690,7 @@ endr ld e, [hl] inc hl ld d, [hl] - ld a, [wdc0d] + ld a, [$dc0d] ld [de], a ld b, $0 ld a, [BigDoll] @@ -700,12 +699,12 @@ endr ld b, $1 .asm_114537 - ld hl, wdc06 + ld hl, $dc06 ld a, [hl] ld [wCurrentMapSignpostCount], a ld [hFF8C], a ld [MBC3SRamBank], a - ld hl, wdc09 + ld hl, $dc09 ld e, [hl] inc hl ld d, [hl] @@ -732,7 +731,7 @@ endr ; 114561 Function114561: ; 114561 - ld hl, wdc03 + ld hl, $dc03 ld a, [de] ld [hli], a inc de @@ -764,13 +763,13 @@ Function114576: ; 114576 and a jr nz, .asm_1145b4 ld a, h - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a push hl push de push bc - ld hl, wdc24 + ld hl, $dc24 call Function115d53 call Function1145c5 pop bc @@ -782,7 +781,7 @@ Function114576: ; 114576 and a jr nz, .asm_1145ba ld a, h - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld hl, String_114218 @@ -811,7 +810,7 @@ Function114576: ; 114576 ; 1145c5 Function1145c5: ; 1145c5 - ld hl, wdc24 + ld hl, $dc24 ld de, String_11421e ld c, $0 .asm_1145cd @@ -905,7 +904,7 @@ Function1145c5: ; 1145c5 ; 11463c Function11463c: ; 11463c - ld a, [wdc00] + ld a, [$dc00] push af push de ld hl, $ddc8 @@ -958,7 +957,7 @@ Function11463c: ; 11463c .asm_11468a pop de pop af - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a xor a @@ -970,7 +969,7 @@ Function11463c: ; 11463c Function11469b: ; 11469b push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -981,9 +980,9 @@ Function1146a4: ; 1146a4 call Function114867 and a jr nz, .asm_1146e4 - ld hl, wdc03 + ld hl, $dc03 ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] @@ -995,9 +994,9 @@ Function1146a4: ; 1146a4 call Function1148c2 and a jr nz, .asm_1146e4 - ld hl, wdc03 + ld hl, $dc03 ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] @@ -1021,7 +1020,7 @@ endr jr .asm_1146f7 .asm_1146e8 - ld a, [wdc17] + ld a, [$dc17] and a jr z, .asm_1146f5 ld a, $1 @@ -1041,9 +1040,9 @@ Function1146fa: ; 1146fa call Function114867 and a jp nz, .asm_11478a - ld hl, wdc03 + ld hl, $dc03 ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] @@ -1056,8 +1055,8 @@ Function1146fa: ; 1146fa and a jp nz, .asm_11478a ld a, $1 - ld [wdc0e], a - ld a, [wdc00] + ld [$dc0e], a + ld a, [$dc00] ld [hFF8C], a ld [MBC3SRamBank], a ld a, $1 @@ -1069,7 +1068,7 @@ Function1146fa: ; 1146fa call Function114843 cp $1 jr nz, .asm_114749 - ld a, [wdc17] + ld a, [$dc17] and a jr z, .asm_114794 ld a, $1 @@ -1082,9 +1081,9 @@ Function1146fa: ; 1146fa ld a, [BigDoll] and a jr nz, .asm_114786 - ld hl, wdc03 + ld hl, $dc03 ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] @@ -1093,7 +1092,7 @@ Function1146fa: ; 1146fa call Function1147cd and a jr nz, .asm_1147b7 - ld a, [wdc0e] + ld a, [$dc0e] cp $3 jr nz, .asm_114773 rept 2 @@ -1104,9 +1103,9 @@ endr call Function1149cc and a jr nz, .asm_11478a - ld a, [wdc0d] + ld a, [$dc0d] inc a - ld [wdc0d], a + ld [$dc0d], a ld a, [BigDoll] and a jr z, .asm_114799 @@ -1120,7 +1119,7 @@ endr jr .asm_114796 .asm_11478e - ld a, [wdc17] + ld a, [$dc17] and a jr nz, .asm_114796 @@ -1137,9 +1136,9 @@ endr jr z, .asm_114737 jr .asm_1147cb - ld hl, wdc03 + ld hl, $dc03 ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a call Function114a7a @@ -1149,12 +1148,12 @@ endr ld [BigDoll], a .asm_1147b7 - ld a, [wdc17] + ld a, [$dc17] and a jr z, .asm_114794 ld a, $1 ld [BigDoll], a - ld a, [wdc0d] + ld a, [$dc0d] cp $1 jr nz, .asm_114773 ld b, $1 @@ -1235,7 +1234,7 @@ Function1147cd: ; 1147cd and a jr nz, .asm_114837 ld a, $1 - ld [wdc17], a + ld [$dc17], a .asm_114837 ld a, $1 @@ -1245,7 +1244,7 @@ Function1147cd: ; 1147cd Function11483a: ; 11483a push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -1253,7 +1252,7 @@ Function11483a: ; 11483a ; 114843 Function114843: ; 114843 - ld a, [wdc00] + ld a, [$dc00] push af push de ld [hFF8C], a @@ -1263,7 +1262,7 @@ Function114843: ; 114843 jr nz, .asm_11485f pop de pop af - ld [wdc00], a + ld [$dc00], a ld hl, String_114218 call Function114acf ret @@ -1271,14 +1270,14 @@ Function114843: ; 114843 .asm_11485f pop de pop af - ld [wdc00], a + ld [$dc00], a ld a, $1 ret ; 114867 Function114867: ; 114867 - ld hl, wdc06 + ld hl, $dc06 ld a, [hli] ld [wCurrentMapSignpostCount], a ld [hFF8C], a @@ -1294,7 +1293,7 @@ Function114867: ; 114867 ld [de], a inc e call z, Function1148b9 - ld hl, wdc03 + ld hl, $dc03 ld a, [hli] ld [de], a inc e @@ -1307,7 +1306,7 @@ Function114867: ; 114867 ld [de], a inc e call z, Function1148b9 - ld hl, wdc06 + ld hl, $dc06 ld a, [wCurrentMapSignpostCount] ld [hli], a ld [hl], e @@ -1347,7 +1346,7 @@ Function1148b9: ; 1148b9 ; 1148c2 Function1148c2: ; 1148c2 - ld hl, wdc06 + ld hl, $dc06 ld a, [hli] ld [wCurrentMapSignpostCount], a ld [hFF8C], a @@ -1363,7 +1362,7 @@ Function1148c2: ; 1148c2 ld [de], a inc e call z, Function114944 - ld a, [wdc0e] + ld a, [$dc0e] ld [de], a inc e call z, Function114944 @@ -1388,7 +1387,7 @@ Function1148c2: ; 1148c2 call z, Function114944 .asm_114904 - ld hl, wdc03 + ld hl, $dc03 ld a, [hli] ld [de], a inc e @@ -1401,7 +1400,7 @@ Function1148c2: ; 1148c2 ld [de], a inc e call z, Function114944 - ld hl, wdc06 + ld hl, $dc06 ld a, [wCurrentMapSignpostCount] ld [hli], a ld [hl], e @@ -1411,7 +1410,7 @@ Function1148c2: ; 1148c2 ld c, [hl] inc hl ld b, [hl] - ld a, [wdc0e] + ld a, [$dc0e] cp $3 jr z, .asm_114932 ld d, $6 @@ -1449,7 +1448,7 @@ Function114944: ; 114944 ; 11494d Function11494d: ; 11494d - ld hl, wdc06 + ld hl, $dc06 ld a, [hli] ld [wCurrentMapSignpostCount], a ld [hFF8C], a @@ -1457,7 +1456,7 @@ Function11494d: ; 11494d ld e, [hl] inc hl ld d, [hl] - ld a, [wdc0e] + ld a, [$dc0e] ld [de], a inc e call z, Function1149c3 @@ -1482,7 +1481,7 @@ Function11494d: ; 11494d call z, Function1149c3 .asm_114983 - ld hl, wdc03 + ld hl, $dc03 ld a, [hli] ld [de], a inc e @@ -1495,7 +1494,7 @@ Function11494d: ; 11494d ld [de], a inc e call z, Function1149c3 - ld hl, wdc06 + ld hl, $dc06 ld a, [wCurrentMapSignpostCount] ld [hli], a ld [hl], e @@ -1505,7 +1504,7 @@ Function11494d: ; 11494d ld c, [hl] inc hl ld b, [hl] - ld a, [wdc0e] + ld a, [$dc0e] cp $3 jr z, .asm_1149b1 ld d, $4 @@ -1543,13 +1542,13 @@ Function1149c3: ; 1149c3 ; 1149cc Function1149cc: ; 1149cc - ld hl, wdc06 + ld hl, $dc06 ld a, [hl] ld [wCurrentMapSignpostCount], a ld [hFF8C], a ld [MBC3SRamBank], a push de - ld hl, wdc09 + ld hl, $dc09 ld e, [hl] inc hl ld d, [hl] @@ -1576,7 +1575,7 @@ Function1149cc: ; 1149cc ld [de], a inc e call z, Function114a0f - ld hl, wdc06 + ld hl, $dc06 ld a, [wCurrentMapSignpostCount] ld [hli], a ld [hl], e @@ -1641,8 +1640,8 @@ Function114a18: ; 114a18 dec bc .asm_114a52 - ld hl, wdc03 - ld a, [wdc00] + ld hl, $dc03 + ld a, [$dc00] ld [hli], a ld [hl], e inc hl @@ -1662,7 +1661,7 @@ Function114a18: ; 114a18 and a jr nz, .asm_114a6e ld a, $1 - ld [wdc17], a + ld [$dc17], a .asm_114a6e ld a, $1 @@ -1672,7 +1671,7 @@ Function114a18: ; 114a18 Function114a71: ; 114a71 push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -1711,8 +1710,8 @@ Function114a7a: ; 114a7a jr nz, .asm_114abb inc e call z, Function114ac6 - ld hl, wdc03 - ld a, [wdc00] + ld hl, $dc03 + ld a, [$dc00] ld [hli], a ld [hl], e inc hl @@ -1724,7 +1723,7 @@ Function114a7a: ; 114a7a and a jr nz, .asm_114ac3 ld a, $1 - ld [wdc17], a + ld [$dc17], a .asm_114ac3 ld a, $1 @@ -1734,7 +1733,7 @@ Function114a7a: ; 114a7a Function114ac6: ; 114ac6 push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -1768,7 +1767,7 @@ Function114acf: ; 114acf jr nz, .asm_114ad1 .asm_114aec ld a, $2 - ld [wdc0e], a + ld [$dc0e], a pop bc pop hl ret @@ -1816,7 +1815,7 @@ Function114acf: ; 114acf .asm_114b26 ld hl, Plant - ld a, [wdc00] + ld a, [$dc00] ld [hli], a ld [hl], e inc hl @@ -1839,7 +1838,7 @@ Function114acf: ; 114acf pop bc pop hl ld a, $3 - ld [wdc0e], a + ld [$dc0e], a xor a ret @@ -1847,7 +1846,7 @@ Function114acf: ; 114acf Function114b4c: ; 114b4c push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -1857,13 +1856,13 @@ Function114b4c: ; 114b4c Function114b55: ; 114b55 call Function114561 ld b, $0 - ld hl, wdc03 + ld hl, $dc03 ld c, [hl] inc hl ld e, [hl] inc hl ld d, [hl] - ld hl, wdc24 + ld hl, $dc24 .asm_114b65 push de push bc @@ -1906,7 +1905,7 @@ endr jr .asm_114b82 .asm_114b96 - ld hl, wdc06 + ld hl, $dc06 ld a, [hli] ld [wCurrentMapSignpostCount], a ld [hFF8C], a @@ -1916,7 +1915,7 @@ endr ld d, [hl] inc hl ld bc, $004e - ld hl, wdc24 + ld hl, $dc24 call Function115d6a jp Function11425c @@ -1948,11 +1947,11 @@ Function114bbc: ; 114bbc and a jr nz, .asm_114bff ld a, h - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a call Function114c0b - ld hl, wdc24 + ld hl, $dc24 call Function114c5e ld a, b or c @@ -1965,7 +1964,7 @@ Function114bbc: ; 114bbc ld a, [hli] ld e, a ld d, [hl] - ld hl, wdc24 + ld hl, $dc24 push bc call Function115d6a pop hl @@ -1986,11 +1985,11 @@ Function114bbc: ; 114bbc ; 114c0b Function114c0b: ; 114c0b - ld hl, wdc24 + ld hl, $dc24 push bc call Function115d53 pop bc - ld hl, wdc24 + ld hl, $dc24 ld d, h ld e, l .asm_114c18 @@ -2006,7 +2005,7 @@ Function114c0b: ; 114c0b .asm_114c24 xor a ld [de], a - ld hl, wdc24 + ld hl, $dc24 ld bc, NULL .asm_114c2c ld a, [hli] @@ -2047,7 +2046,7 @@ Function114c0b: ; 114c0b Function114c55: ; 114c55 push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -2096,9 +2095,9 @@ rept 2 dec bc endr ld a, l - ld [wdc03], a + ld [$dc03], a ld a, h - ld [wdc04], a + ld [$dc04], a pop hl push de call Function115c49 @@ -2117,9 +2116,9 @@ endr ld a, b or c jr nz, .asm_114ca6 - ld a, [wdc03] + ld a, [$dc03] ld l, a - ld a, [wdc04] + ld a, [$dc04] ld h, a jr .asm_114c62 @@ -2172,15 +2171,15 @@ Function114cd9: ; 114cd9 call Function1143f3 and a jr nz, .asm_114d33 - ld [wdc03], a - ld [wdc04], a + ld [$dc03], a + ld [$dc04], a ld a, h - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a - ld hl, wdc24 + ld hl, $dc24 call Function114d39 - ld hl, wdc24 + ld hl, $dc24 call Function114d99 pop hl push hl @@ -2226,7 +2225,7 @@ endr Function114d39: ; 114d39 .asm_114d39 - ld a, [wdc04] + ld a, [$dc04] and a jr nz, .asm_114d4a ld a, [de] @@ -2245,27 +2244,27 @@ Function114d39: ; 114d39 jr .asm_114d84 .asm_114d55 - ld [wdc03], a + ld [$dc03], a ld a, $1 - ld [wdc04], a + ld [$dc04], a jr .asm_114d84 .asm_114d5f - ld a, [wdc03] + ld a, [$dc03] cp $28 jr nz, .asm_114d84 xor a - ld [wdc03], a - ld [wdc04], a + ld [$dc03], a + ld [$dc04], a jr .asm_114d84 .asm_114d6f - ld a, [wdc03] + ld a, [$dc03] cp $22 jr nz, .asm_114d84 xor a - ld [wdc03], a - ld [wdc04], a + ld [$dc03], a + ld [$dc04], a jr .asm_114d84 .asm_114d7f @@ -2281,7 +2280,7 @@ Function114d39: ; 114d39 inc e jr nz, .asm_114d39 push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc jr .asm_114d39 @@ -2480,7 +2479,7 @@ Function114e62: ; 114e62 call Function114ea0 and a jr nz, .asm_114e99 - ld hl, wdc09 + ld hl, $dc09 ld a, [hli] cpl ld e, a @@ -2503,7 +2502,7 @@ Function114e62: ; 114e62 ; 114ea0 Function114ea0: ; 114ea0 - ld hl, wdc06 + ld hl, $dc06 ld a, [hli] ld [wCurrentMapSignpostCount], a ld [hFF8C], a @@ -2529,7 +2528,7 @@ Function114ea0: ; 114ea0 dec bc inc e call z, Function114ee0 - ld hl, wdc06 + ld hl, $dc06 ld a, [wCurrentMapSignpostCount] ld [hli], a ld a, e @@ -2560,7 +2559,7 @@ Function114ee0: ; 114ee0 ; 114ee9 Function114ee9: ; 114ee9 - ld hl, wdc03 + ld hl, $dc03 ld a, b ld [hli], a ld a, c @@ -2599,7 +2598,7 @@ Function114f0a: ; 114f0a call Function114f39 and a jr nz, .asm_114f26 - ld a, [wdc03] + ld a, [$dc03] cp $6 jr c, .asm_114f21 cp $c @@ -2620,7 +2619,7 @@ Function114f0a: ; 114f0a call Function114f59 and a jr nz, .asm_114f23 - ld hl, wdc0d + ld hl, $dc0d ld e, [hl] inc hl ld d, [hl] @@ -2633,7 +2632,7 @@ Function114f0a: ; 114f0a ; 114f39 Function114f39: ; 114f39 - ld hl, wdc0d + ld hl, $dc0d ld e, [hl] inc hl ld d, [hl] @@ -2652,7 +2651,7 @@ Function114f39: ; 114f39 ld a, [de] ld [hli], a inc de - ld hl, wdc0d + ld hl, $dc0d ld [hl], e inc hl ld [hl], d @@ -2668,7 +2667,7 @@ Function114f59: ; 114f59 ld a, [wStartDay] and a jr nz, .asm_114f7c - ld a, [wdc03] + ld a, [$dc03] cp $11 jr z, .asm_114fa7 add a @@ -2686,7 +2685,7 @@ Function114f59: ; 114f59 ld [wStartDay], a .asm_114f7c - ld a, [wdc03] + ld a, [$dc03] cp $5 jr c, .asm_114fc9 jr z, .asm_114fec @@ -2716,15 +2715,15 @@ Function114f59: ; 114f59 ld c, [hl] inc hl ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] inc hl ld d, [hl] - ld hl, wdc24 + ld hl, $dc24 call Function115d53 - ld hl, wdc24 + ld hl, $dc24 call Function115020 and a jr nz, .asm_114fe7 @@ -2734,9 +2733,9 @@ Function114f59: ; 114f59 call Function115062 and a jr nz, .asm_114fe7 - ld a, [wdc04] + ld a, [$dc04] dec a - ld [wdc04], a + ld [$dc04], a and a jr z, .asm_114fdf call Function114f39 @@ -2744,8 +2743,8 @@ Function114f59: ; 114f59 jr nz, .asm_114fc9 .asm_114fdf - ld a, [wdc05] - ld [wdc04], a + ld a, [$dc05] + ld [$dc04], a jr .asm_11501e .asm_114fe7 @@ -2774,7 +2773,7 @@ Function114f59: ; 114f59 .asm_115007 call Function11528f - ld hl, wdc24 + ld hl, $dc24 call Function115217 and a jr nz, .asm_114fe7 @@ -2794,7 +2793,7 @@ Function114f59: ; 114f59 Function115020: ; 115020 push hl - ld hl, wdc06 + ld hl, $dc06 ld a, [hli] ld [wCurrentMapSignpostCount], a ld [hFF8C], a @@ -2822,7 +2821,7 @@ Function115020: ; 115020 jr .asm_115036 .asm_115046 - ld hl, wdc06 + ld hl, $dc06 ld a, [wCurrentMapSignpostCount] ld [hli], a ld a, e @@ -2857,14 +2856,14 @@ Function115062: ; 115062 jr z, .asm_1150ae ld c, a ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] inc hl ld d, [hl] ld b, $0 - ld hl, wdc24 + ld hl, $dc24 ld a, [wStartDay] cp $1 jr z, .asm_11509b @@ -2906,7 +2905,7 @@ Function115062: ; 115062 ; 1150b3 Function1150b3: ; 1150b3 - ld hl, wdc24 + ld hl, $dc24 ld de, PartyMon5Defense ld b, $0 .asm_1150bb @@ -3011,7 +3010,7 @@ endr ; 115136 Function115136: ; 115136 - ld hl, wdc06 + ld hl, $dc06 ld a, [hli] ld [wCurrentMapSignpostCount], a ld [hFF8C], a @@ -3039,7 +3038,7 @@ Function115136: ; 115136 jr .asm_11514d .asm_11515d - ld hl, wdc06 + ld hl, $dc06 ld a, [wCurrentMapSignpostCount] ld [hli], a ld a, e @@ -3068,7 +3067,7 @@ Function115170: ; 115170 ; 115179 Function115179: ; 115179 - ld hl, wdc06 + ld hl, $dc06 ld a, [hli] ld [wCurrentMapSignpostCount], a ld [hFF8C], a @@ -3164,7 +3163,7 @@ Function115179: ; 115179 jr z, .asm_1151ef inc e call z, Function11520e - ld hl, wdc06 + ld hl, $dc06 ld a, [wCurrentMapSignpostCount] ld [hli], a ld a, e @@ -3190,7 +3189,7 @@ Function11520e: ; 11520e Function115217: ; 115217 push hl - ld hl, wdc06 + ld hl, $dc06 ld a, [hli] ld [wCurrentMapSignpostCount], a ld [hFF8C], a @@ -3218,7 +3217,7 @@ Function115217: ; 115217 jr .asm_11522d .asm_11523d - ld a, [wdc03] + ld a, [$dc03] cp $b jr z, .asm_115278 cp $c @@ -3230,7 +3229,7 @@ Function115217: ; 115217 jr .asm_115262 .asm_115252 - ld hl, wdc06 + ld hl, $dc06 ld a, [wCurrentMapSignpostCount] ld [hli], a ld a, e @@ -3289,14 +3288,14 @@ Function11528f: ; 11528f ld c, [hl] inc hl ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld a, [hli] ld e, a ld a, [hli] ld d, a - ld hl, wdc24 + ld hl, $dc24 .asm_1152a4 ld a, [de] ld [hli], a @@ -3311,7 +3310,7 @@ Function11528f: ; 11528f Function1152af: ; 1152af push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -3332,12 +3331,12 @@ Function1152b8: ; 1152b8 and a jr nz, .asm_1152f9 .asm_1152ca - ld hl, wdc0d + ld hl, $dc0d ld e, [hl] inc hl ld d, [hl] .asm_1152d0 - ld a, [wdc03] + ld a, [$dc03] cp $3 jr nz, .asm_1152d8 push de @@ -3358,11 +3357,11 @@ Function1152b8: ; 1152b8 inc de and a jr nz, .asm_115301 - ld a, [wdc03] + ld a, [$dc03] cp $6 jr z, .asm_115335 inc a - ld [wdc03], a + ld [$dc03], a jr .asm_1152d0 .asm_1152f9 @@ -3372,29 +3371,29 @@ Function1152b8: ; 1152b8 jp Function11425c .asm_115301 - ld hl, wdc0d + ld hl, $dc0d ld [hl], e inc hl ld [hl], d .asm_115307 - ld [wdc05], a + ld [$dc05], a ld a, $1 - ld [wdc04], a + ld [$dc04], a call Function1153b5 call Function114f59 and a jr nz, .asm_1152f9 - ld a, [wdc05] + ld a, [$dc05] dec a jr nz, .asm_115307 - ld a, [wdc03] + ld a, [$dc03] inc a - ld [wdc03], a + ld [$dc03], a call Function114ea0 and a jr nz, .asm_1152f9 ld [wStartDay], a - ld a, [wdc03] + ld a, [$dc03] cp $6 jr nz, .asm_1152ca @@ -3408,9 +3407,9 @@ Function1152b8: ; 1152b8 call Function114ea0 and a jr nz, .asm_1152f9 - ld a, [wdc03] + ld a, [$dc03] inc a - ld [wdc03], a + ld [$dc03], a cp $9 jr nz, .asm_115335 pop bc @@ -3428,7 +3427,7 @@ Function1152b8: ; 1152b8 jr nz, .asm_1152f9 .asm_11536b - ld hl, wdc09 + ld hl, $dc09 ld a, [hli] cpl ld e, a @@ -3446,7 +3445,7 @@ Function1152b8: ; 1152b8 ; 11537d Function11537d: ; 11537d - ld hl, wdc06 + ld hl, $dc06 ld a, [de] ld [hli], a inc de @@ -3484,19 +3483,19 @@ Function11537d: ; 11537d ld a, [de] ld [hli], a inc de - ld hl, wdc0d + ld hl, $dc0d ld [hl], e inc hl ld [hl], d xor a - ld [wdc03], a + ld [$dc03], a ld [wStartDay], a ret ; 1153b5 Function1153b5: ; 1153b5 - ld hl, wdc0d + ld hl, $dc0d ld e, [hl] inc hl ld d, [hl] @@ -3515,7 +3514,7 @@ endr ld a, [de] ld [Bed], a inc de - ld hl, wdc0d + ld hl, $dc0d ld [hl], e inc hl ld [hl], d @@ -3524,14 +3523,14 @@ endr ; 1153d2 Function1153d2: ; 1153d2 - ld a, [wdc03] + ld a, [$dc03] ld d, a - ld a, [wdc04] + ld a, [$dc04] ld e, a push de xor a - ld [wdc03], a - ld [wdc04], a + ld [$dc03], a + ld [$dc04], a ld a, $24 ld [Console], a ld a, $dc @@ -3549,7 +3548,7 @@ Function1153d2: ; 1153d2 push bc .asm_1153f5 ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] @@ -3598,7 +3597,7 @@ Function1153d2: ; 1153d2 ld [LeftOrnament], a xor a ld [de], a - ld hl, wdc24 + ld hl, $dc24 .asm_11543d ld a, [hli] and a @@ -3614,14 +3613,14 @@ Function1153d2: ; 1153d2 .asm_11544b pop hl ld a, h - ld [wdc03], a + ld [$dc03], a ld a, l - ld [wdc04], a + ld [$dc04], a ld a, $1 ret .asm_115457 - ld hl, wdc24 + ld hl, $dc24 call Function114d99 ld hl, $ddc8 .asm_115460 @@ -3703,9 +3702,9 @@ Function1153d2: ; 1153d2 ld d, a pop hl ld a, h - ld [wdc03], a + ld [$dc03], a ld a, l - ld [wdc04], a + ld [$dc04], a xor a ret @@ -3737,7 +3736,7 @@ Function1154d4: ; 1154d4 .asm_115502 ld a, $a - ld [wdc03], a + ld [$dc03], a call Function114f59 and a jr z, .asm_11551a @@ -3745,7 +3744,7 @@ Function1154d4: ; 1154d4 .asm_11550f ld a, $c - ld [wdc03], a + ld [$dc03], a call Function114f59 and a jr nz, .asm_11552c @@ -3769,7 +3768,7 @@ Function1154d4: ; 1154d4 ld a, $1 ld [wDailyResetTimer], a ld a, $b - ld [wdc03], a + ld [$dc03], a call Function114f59 and a jr nz, .asm_11552c @@ -3781,7 +3780,7 @@ Function1154d4: ; 1154d4 and a jr nz, .asm_11552c ld a, $e - ld [wdc03], a + ld [$dc03], a call Function114f59 and a jr nz, .asm_11552c @@ -3798,7 +3797,7 @@ Function1154d4: ; 1154d4 and a jr z, .asm_11557d ld a, $f - ld [wdc03], a + ld [$dc03], a call Function114f59 and a jr nz, .asm_11552c @@ -3810,14 +3809,14 @@ Function1154d4: ; 1154d4 .asm_11557d ld a, $10 - ld [wdc03], a + ld [$dc03], a call Function114f59 and a jr nz, .asm_11552c call Function114ea0 and a jr nz, .asm_11552c - ld hl, wdc09 + ld hl, $dc09 ld a, [hli] cpl ld e, a @@ -3844,7 +3843,7 @@ Function1154d4: ; 1154d4 ; 1155af Function1155af: ; 1155af - ld hl, wdc06 + ld hl, $dc06 ld a, [de] ld [hli], a inc de @@ -3876,9 +3875,9 @@ Function1155af: ; 1155af ; 1155d1 Function1155d1: ; 1155d1 - ld a, [wdc0d] + ld a, [$dc0d] ld l, a - ld a, [wdc0e] + ld a, [$dc0e] ld h, a ld a, [hli] ld [BigDoll], a @@ -3897,7 +3896,7 @@ Function1155d1: ; 1155d1 ld [Bed], a .asm_1155f0 - ld de, wdc17 + ld de, $dc17 ld a, [hli] ld [de], a inc de @@ -3913,21 +3912,21 @@ Function1155d1: ; 1155d1 ld a, [hli] ld [de], a ld a, l - ld [wdc0d], a + ld [$dc0d], a ld a, h - ld [wdc0e], a + ld [$dc0e], a ret ; 11560a Function11560a: ; 11560a - ld a, [wdc06] + ld a, [$dc06] ld [wCurrentMapSignpostCount], a - ld a, [wdc17] - ld [wdc00], a + ld a, [$dc17] + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a - ld hl, wdc1a + ld hl, $dc1a ld c, [hl] inc hl ld b, [hl] @@ -3935,7 +3934,7 @@ Function11560a: ; 11560a cp b jp c, .asm_1156b1 jr nz, .asm_115631 - ld a, [wdc09] + ld a, [$dc09] cp c jp c, .asm_1156b1 @@ -3943,7 +3942,7 @@ Function11560a: ; 11560a ld a, b or c jr z, .asm_1156a9 - ld a, [wdc09] + ld a, [$dc09] ld l, a ld a, [wCurrMapCallbackCount] ld h, a @@ -3956,7 +3955,7 @@ Function11560a: ; 11560a inc de add hl, de ld a, l - ld [wdc09], a + ld [$dc09], a ld a, h ld [wCurrMapCallbackCount], a .asm_11564d @@ -3969,9 +3968,9 @@ Function11560a: ; 11560a jr c, .asm_1156b6 .asm_115659 - ld a, [wdc1a] + ld a, [$dc1a] ld e, a - ld a, [wdc1b] + ld a, [$dc1b] ld d, a ld a, c cpl @@ -3982,15 +3981,15 @@ Function11560a: ; 11560a inc hl add hl, de ld a, l - ld [wdc1a], a + ld [$dc1a], a ld a, h - ld [wdc1b], a + ld [$dc1b], a push bc ld hl, $dc18 ld e, [hl] inc hl ld d, [hl] - ld hl, wdc24 + ld hl, $dc24 call Function115d53 ld hl, $dc18 ld [hl], e @@ -4004,13 +4003,13 @@ Function11560a: ; 11560a ld e, [hl] inc hl ld d, [hl] - ld hl, wdc24 + ld hl, $dc24 call Function115d6a ld hl, wCurrMapTriggerCount ld [hl], e inc hl ld [hl], d - ld hl, wdc1a + ld hl, $dc1a ld c, [hl] inc hl ld b, [hl] @@ -4020,7 +4019,7 @@ Function11560a: ; 11560a .asm_1156a9 ld a, [wCurrentMapSignpostCount] - ld [wdc06], a + ld [$dc06], a xor a ret @@ -4037,7 +4036,7 @@ Function11560a: ; 11560a cpl ld l, a add hl, bc - ld de, wdc1a + ld de, $dc1a ld a, l ld [de], a inc de @@ -4113,7 +4112,7 @@ Function1156cc: ; 1156cc ; 115732 Function115732: ; 115732 - ld hl, wdc02 + ld hl, $dc02 ld a, [de] ld [hli], a inc de @@ -4157,7 +4156,7 @@ Function115732: ; 115732 ; 11575c Function11575c: ; 11575c - ld hl, wdc05 + ld hl, $dc05 ld a, [hli] ld h, [hl] ld l, a @@ -4245,11 +4244,11 @@ Function11575c: ; 11575c ; 1157d0 Function1157d0: ; 1157d0 - ld hl, wdc05 + ld hl, $dc05 ld a, [hli] ld h, [hl] ld l, a - ld a, [wdc0e] + ld a, [$dc0e] ld c, a ld a, [Bed] ld b, a @@ -4276,15 +4275,15 @@ Function1157d0: ; 1157d0 inc bc add hl, bc ld a, l - ld [wdc05], a + ld [$dc05], a ld a, h - ld [wdc06], a + ld [$dc06], a ld a, h or l jr nz, .asm_11580f pop bc ld a, c - ld [wdc0e], a + ld [$dc0e], a ld a, b ld [Bed], a ld a, $4 @@ -4294,7 +4293,7 @@ Function1157d0: ; 1157d0 .asm_11580f pop bc ld a, c - ld [wdc0e], a + ld [$dc0e], a ld a, b ld [Bed], a ld a, $3 @@ -4307,29 +4306,29 @@ Function11581e: ; 11581e ld a, [wStartDay] and a ret z - ld a, [wdc0e] + ld a, [$dc0e] ld c, a ld a, [Bed] ld b, a - ld hl, wdc02 + ld hl, $dc02 ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] inc hl ld d, [hl] - ld hl, wdc24 + ld hl, $dc24 push bc call Function115d53 pop bc - ld hl, wdc02 - ld a, [wdc00] + ld hl, $dc02 + ld a, [$dc00] ld [hli], a ld [hl], e inc hl ld [hl], d - ld hl, wdc24 + ld hl, $dc24 ld de, PartyMon5Defense call Function1158c2 ld hl, PartyMon5Defense @@ -4415,18 +4414,18 @@ Function1158c2: ; 1158c2 ld a, e ld [SwarmFlags], a ld a, d - ld [wdc21], a + ld [$dc21], a xor a - ld [wdc22], a + ld [$dc22], a xor a ld [de], a inc de ld [de], a inc de ld a, c - ld [wdc19], a + ld [$dc19], a ld a, b - ld [wdc1a], a + ld [$dc1a], a ld c, e ld b, d ld e, l @@ -4439,16 +4438,16 @@ Function1158c2: ; 1158c2 .asm_1158e5 ld b, $3 push hl - ld hl, wdc1b + ld hl, $dc1b .asm_1158eb ld a, [de] inc de ld [hli], a dec b jr nz, .asm_1158eb - ld a, [wdc19] + ld a, [$dc19] ld c, a - ld a, [wdc1a] + ld a, [$dc1a] ld b, a xor a or b @@ -4475,9 +4474,9 @@ rept 3 dec bc endr ld a, c - ld [wdc19], a + ld [$dc19], a ld a, b - ld [wdc1a], a + ld [$dc1a], a push de push hl ld hl, SwarmFlags @@ -4547,20 +4546,20 @@ endr inc bc call Function1159dc ld [hli], a - ld a, [wdc22] + ld a, [$dc22] inc a cp $10 jr nz, .asm_1159b1 push af push bc - ld a, [wdc19] + ld a, [$dc19] ld b, a - ld a, [wdc1a] + ld a, [$dc1a] or b jr nz, .asm_115998 - ld a, [wdc05] + ld a, [$dc05] ld b, a - ld a, [wdc06] + ld a, [$dc06] or b jr nz, .asm_115998 pop bc @@ -4592,11 +4591,11 @@ endr xor a .asm_1159b1 - ld [wdc22], a - ld a, [wdc19] + ld [$dc22], a + ld a, [$dc19] cp $0 jp nz, .asm_1158e5 - ld a, [wdc1a] + ld a, [$dc1a] cp $0 jp nz, .asm_1158e5 @@ -4717,7 +4716,7 @@ Function1159fb: ; 1159fb ; 115a5f Function115a5f: ; 115a5f - ld hl, wdc05 + ld hl, $dc05 ld a, [hli] ld h, [hl] ld l, a @@ -4778,11 +4777,11 @@ Function115a5f: ; 115a5f ; 115ab0 Function115ab0: ; 115ab0 - ld hl, wdc05 + ld hl, $dc05 ld a, [hli] ld h, [hl] ld l, a - ld a, [wdc0e] + ld a, [$dc0e] ld c, a ld a, [Bed] ld b, a @@ -4809,15 +4808,15 @@ Function115ab0: ; 115ab0 inc bc add hl, bc ld a, l - ld [wdc05], a + ld [$dc05], a ld a, h - ld [wdc06], a + ld [$dc06], a ld a, h or l jr nz, .asm_115af0 pop bc ld a, c - ld [wdc0e], a + ld [$dc0e], a ld a, b ld [Bed], a ld a, $4 @@ -4828,7 +4827,7 @@ Function115ab0: ; 115ab0 .asm_115af0 pop bc ld a, c - ld [wdc0e], a + ld [$dc0e], a ld a, b ld [Bed], a ld a, $3 @@ -4842,13 +4841,13 @@ Function115b00: ; 115b00 ld a, [wStartDay] and a ret z - ld a, [wdc0e] + ld a, [$dc0e] ld c, a ld a, [Bed] ld b, a - ld hl, wdc02 + ld hl, $dc02 ld a, [hli] - ld [wdc00], a + ld [$dc00], a ld [hFF8C], a ld [MBC3SRamBank], a ld e, [hl] @@ -4893,16 +4892,16 @@ endr add hl, bc ld b, h ld c, l - ld hl, wdc02 - ld a, [wdc00] + ld hl, $dc02 + ld a, [$dc00] ld [hli], a ld [hl], e inc hl ld [hl], d ld hl, PartyMon5Defense - ld de, wdc24 + ld de, $dc24 call Function115c49 - ld hl, wdc24 + ld hl, $dc24 ld c, [hl] inc hl ld b, [hl] @@ -4943,7 +4942,7 @@ endr ld e, [hl] inc hl ld d, [hl] - ld hl, wdc26 + ld hl, $dc26 call Function115d6a ld hl, wCurrMapTriggerCount ld a, [wCurrentMapSignpostCount] @@ -5064,7 +5063,7 @@ endr .Function115c3d: push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -5087,9 +5086,9 @@ Function115c49: ; 115c49 inc de ld a, c - ld [wdc19], a + ld [$dc19], a ld a, b - ld [wdc1a], a + ld [$dc1a], a ld c, e ld b, d ld e, l @@ -5098,17 +5097,17 @@ Function115c49: ; 115c49 ld h, b .asm_115c64 - ld a, [wdc1a] + ld a, [$dc1a] or a jr nz, .asm_115c71 - ld a, [wdc19] + ld a, [$dc19] cp $4 jr c, .asm_115c99 .asm_115c71 ld b, $4 push hl - ld hl, wdc1b + ld hl, $dc1b .asm_115c77 ld a, [de] inc de @@ -5116,9 +5115,9 @@ Function115c49: ; 115c49 ld [hli], a dec b jr nz, .asm_115c77 - ld a, [wdc19] + ld a, [$dc19] ld c, a - ld a, [wdc1a] + ld a, [$dc1a] ld b, a rept 4 dec bc @@ -5142,9 +5141,9 @@ endr .asm_115c9f ld a, c - ld [wdc19], a + ld [$dc19], a ld a, b - ld [wdc1a], a + ld [$dc1a], a push de push hl ld hl, WeeklyFlags @@ -5204,10 +5203,10 @@ endr inc bc ld a, [bc] ld [hli], a - ld a, [wdc19] + ld a, [$dc19] cp $0 jp nz, .asm_115c64 - ld a, [wdc1a] + ld a, [$dc1a] cp $0 jp nz, .asm_115c64 ret @@ -5303,7 +5302,7 @@ Function115d53: ; 115d53 Function115d61: ; 115d61 push bc - ld bc, wdc00 + ld bc, $dc00 call Function115d80 pop bc ret @@ -6882,7 +6881,7 @@ Function11766b: ; 11766b (45:766b) ld de, wcd49 ld bc, $8 call CopyBytes - ld de, wc708 + ld de, $c708 ld bc, $11 call CopyBytes call CloseSRAM @@ -6897,7 +6896,7 @@ Function117699: ; 117699 (45:7699) ld de, $b1f3 ld bc, $8 call CopyBytes - ld hl, wc708 + ld hl, $c708 ld bc, $11 call CopyBytes call CloseSRAM @@ -6909,7 +6908,7 @@ Function117699: ; 117699 (45:7699) ld [wcd4d], a ld [wcd4e], a ld [wcd4f], a - ld hl, wc708 + ld hl, $c708 ld bc, $11 call ByteFill call ClearBGPalettes @@ -7059,7 +7058,7 @@ Function117764_b_button: ; 1177d6 (45:77d6) ld [wcd4a], a ld e, a ld d, $0 - ld hl, wc708 + ld hl, $c708 add hl, de xor a ld [hl], a @@ -7171,7 +7170,7 @@ Function117764_a_button: ; 11784c (45:784c) ld b, $0 add hl, bc ld a, [hl] - ld hl, wc708 + ld hl, $c708 add hl, de ld [hl], a pop de @@ -7270,7 +7269,7 @@ Function117942: ; 117942 (45:7942) call GetSRAMBank ld a, [wcd4f] ld [sMobileLoginPassword], a - ld hl, wc708 + ld hl, $c708 ld de, sMobileLoginPassword + 1 ld bc, LOGIN_PASSWORD_LENGTH call CopyBytes diff --git a/misc/mobile_46.asm b/misc/mobile_46.asm index e49138df6..bed6da2e0 100755 --- a/misc/mobile_46.asm +++ b/misc/mobile_46.asm @@ -1118,7 +1118,7 @@ Function1188c8: ; 1188c8 (46:48c8) ld a, $1 ld [wcd65], a call Function1188e7 - ld hl, wc708 + ld hl, $c708 .asm_1188d3 ld a, [de] inc de @@ -1127,7 +1127,7 @@ Function1188c8: ; 1188c8 (46:48c8) jr nz, .asm_1188d3 call Function119eb4 call Function119ec2 - ld hl, wc708 + ld hl, $c708 ld a, $6 jp Function119e2b @@ -1908,9 +1908,9 @@ Function118f68: ld [hli], a ld a, [wcd4c] ld [hli], a - ld a, wc708 % $100 + ld a, $c708 % $100 ld [hli], a - ld a, wc708 / $100 + ld a, $c708 / $100 ld [hli], a ld a, $60 ld [hli], a @@ -2537,9 +2537,9 @@ Function1193a0: ld [hli], a xor a ld [hli], a - ld a, wc708 % $100 + ld a, $c708 % $100 ld [hli], a - ld a, wc708 / $100 + ld a, $c708 / $100 ld [hli], a ld a, $60 ld [hli], a @@ -2975,7 +2975,7 @@ Function119694: ; 119694 (46:5694) ld b, 0 ld hl, Unknown_1196b8 .asm_119699 - ld de, wc708 + ld de, $c708 ld a, [de] inc de cp [hl] @@ -3018,7 +3018,7 @@ SECTION "bank46_2", ROMX, BANK[$46] ; A hack to use ascii above. Function1196cd: ; 1196cd (46:56cd) - ld de, wc719 + ld de, $c719 call Function1196de ld [wcd4a], a inc de @@ -3029,6 +3029,8 @@ Function1196cd: ; 1196cd (46:56cd) Function1196de: ; 1196de (46:56de) ld a, [de] inc de + ; b = ([de] - 48) * 2 + ; c = ([de] - 48) * 10 sub $30 sla a ld b, a @@ -3362,9 +3364,9 @@ Function1198f7: ld [hli], a xor a ld [hli], a - ld a, wc708 % $100 + ld a, $c708 % $100 ld [hli], a - ld a, wc708 / $100 + ld a, $c708 / $100 ld [hli], a ld a, [wcd51] ld [hli], a @@ -7231,7 +7233,7 @@ Function11b483: ; 11b483 jp Function11ad8a .InitRAM - ld bc, wc626 + ld bc, $c626 ld a, [PlayerID] ld [wcd2a], a ld [bc], a @@ -7444,9 +7446,9 @@ Function11b6b4: ; 11b6b4 ld a, $5 call GetSRAMBank ld a, [wcd30] - ld [wc708], a + ld [$c708], a ld a, [wcd31] - ld [wc709], a + ld [$c709], a ld a, $c708 % $100 ld [wMobileMonSpeciesPointerBuffer], a @@ -7735,8 +7737,8 @@ Function11b920: ; 11b920 ld a, $5 call GetSRAMBank ld hl, $a81f - ld de, wc626 - ld bc, $0008 + ld de, $c626 + ld bc, 8 call CopyBytes call CloseSRAM call Function118000 diff --git a/misc/mobile_5c.asm b/misc/mobile_5c.asm index 321ea9382..b8710a78a 100755 --- a/misc/mobile_5c.asm +++ b/misc/mobile_5c.asm @@ -1,32 +1,32 @@ Function170000: ; 170000 ld a, [$c62b] - ld [$c6d0], a + ld [wPlayerTrademonSpecies], a ld hl, $c62e - ld de, $c6e7 + ld de, wPlayerTrademonSenderName ld bc, $0005 call CopyBytes ld a, $50 ld [de], a ld hl, $c663 - ld de, $c6f2 + ld de, wPlayerTrademonOTName ld bc, $0005 call CopyBytes ld a, $50 ld [de], a ld hl, $c648 ld a, [hli] - ld [$c6fd], a + ld [wPlayerTrademonDVs], a ld a, [hl] - ld [$c6fe], a + ld [wPlayerTrademonDVs + 1], a ld hl, $c639 ld a, [hli] - ld [$c6ff], a + ld [wPlayerTrademonID], a ld a, [hl] - ld [wc700], a + ld [wPlayerTrademonID + 1], a ld bc, $c633 callba GetCaughtGender ld a, c - ld [wc701], a + ld [wPlayerTrademonCaughtData], a ld a, [wcd81] ld [wc74e], a ld hl, $c608 @@ -41,33 +41,33 @@ Function17005a: ; 17005a ld a, $5 call GetSRAMBank ld a, [$a824] - ld [wc702], a + ld [wOTTrademonSpecies], a ld hl, $a827 - ld de, wc719 - ld bc, $0005 + ld de, wOTTrademonSenderName + ld bc, 5 ; Japanese Name Length call CopyBytes - ld a, $50 + ld a, "@" ld [de], a ld hl, $a85c - ld de, wc724 - ld bc, $0005 + ld de, wOTTrademonOTName + ld bc, 5 ; Japanese Name Length call CopyBytes - ld a, $50 + ld a, "@" ld [de], a ld hl, $a841 ld a, [hli] - ld [wEnemyTrappingMove], a + ld [wOTTrademonDVs], a ld a, [hl] - ld [wPlayerWrapCount], a + ld [wOTTrademonDVs + 1], a ld hl, $a832 ld a, [hli] - ld [wEnemyWrapCount], a + ld [wOTTrademonID], a ld a, [hl] - ld [wPlayerCharging], a + ld [wOTTrademonID + 1], a ld bc, $a82c callba GetCaughtGender ld a, c - ld [wEnemyCharging], a + ld [wOTTrademonCaughtData], a ld a, [wcd81] ld [wc74e], a call CloseSRAM diff --git a/misc/mobile_5f.asm b/misc/mobile_5f.asm index 044038e38..e031d962c 100644 --- a/misc/mobile_5f.asm +++ b/misc/mobile_5f.asm @@ -277,7 +277,7 @@ Function17d0f3: ; 17d0f3 ld [wOTTrademonSpecies], a ld [CurPartySpecies], a ld a, [wcd81] - ld [wc74e], a + ld [$c74e], a ld hl, $c63d ld de, wOTTrademonOTName ld bc, 5 @@ -1000,7 +1000,7 @@ Function17d60b: ; 17d60b call CloseSRAM ld a, $6 call GetSRAMBank - ld de, wc708 + ld de, $c708 ld a, c and a jr z, .asm_17d684 @@ -1060,7 +1060,7 @@ Function17d60b: ; 17d60b call CloseSRAM ld a, $5 call GetSRAMBank - ld hl, wc708 + ld hl, $c708 ld de, $b1b3 ld a, [$b1b1] ld c, a @@ -1477,7 +1477,7 @@ Function17d902: ; 17d902 Function17d93a: ; 17d93a call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0005 call CopyBytes call Function17e41e @@ -1486,25 +1486,25 @@ Function17d93a: ; 17d93a push af ld a, $1 ld [rSVBK], a - ld a, [wc70c] + ld a, [$c70c] call Function17e6de - ld a, [wc70a] + ld a, [$c70a] ld [CurPartySpecies], a - ld a, [wc70c] + ld a, [$c70c] ld e, a callba Function8bc6 call SetPalettes - ld a, [wc708] + ld a, [$c708] ld l, a - ld a, [wc709] + ld a, [$c709] ld h, a - ld a, [wc70b] + ld a, [$c70b] ld c, a decoord 0, 0 add hl, de ld e, l ld d, h - callba Functiond066e + callba HOF_AnimateFrontpic pop af ld [rSVBK], a call Function17e349 @@ -1513,7 +1513,7 @@ Function17d93a: ; 17d93a Function17d98b: ; 17d98b call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0004 call CopyBytes call Function17e41e @@ -1522,17 +1522,17 @@ Function17d98b: ; 17d98b push af ld a, $1 ld [rSVBK], a - ld a, [wc70b] + ld a, [$c70b] call Function17e6de - ld a, [wc70a] + ld a, [$c70a] ld [TrainerClass], a - ld a, [wc70b] + ld a, [$c70b] ld e, a callba Function8bbd call SetPalettes - ld a, [wc708] + ld a, [$c708] ld e, a - ld a, [wc709] + ld a, [$c709] ld d, a push de ld de, VTiles2 @@ -1541,7 +1541,7 @@ Function17d98b: ; 17d98b decoord 0, 0 add hl, de ld bc, $0707 - predef FillBox + predef PlaceGraphic pop af ld [rSVBK], a call Function17e349 @@ -1550,34 +1550,34 @@ Function17d98b: ; 17d98b Function17d9e3: ; 17d9e3 call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0007 call CopyBytes call Function17e41e - ld a, [wc70b] + ld a, [$c70b] push af cp $c0 jr c, .asm_17da01 - ld a, [wc70c] + ld a, [$c70c] ld [rSVBK], a jr .asm_17da07 .asm_17da01 - ld a, [wc70c] + ld a, [$c70c] call GetSRAMBank .asm_17da07 - ld a, [wc708] + ld a, [$c708] ld l, a - ld a, [wc709] + ld a, [$c709] ld h, a - ld a, [wc70a] + ld a, [$c70a] ld e, a - ld a, [wc70b] + ld a, [$c70b] ld d, a - ld a, [wc70d] + ld a, [$c70d] ld c, a - ld a, [wc70e] + ld a, [$c70e] ld b, a call CopyBytes pop af @@ -1596,28 +1596,28 @@ Function17d9e3: ; 17d9e3 Function17da31: ; 17da31 call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0004 call CopyBytes call Function17e41e - ld a, [wc709] + ld a, [$c709] push af cp $c0 jr c, .asm_17da4f - ld a, [wc70a] + ld a, [$c70a] ld [rSVBK], a jr .asm_17da55 .asm_17da4f - ld a, [wc70a] + ld a, [$c70a] call GetSRAMBank .asm_17da55 - ld a, [wc708] + ld a, [$c708] ld e, a - ld a, [wc709] + ld a, [$c709] ld d, a - ld a, [wc70b] + ld a, [$c70b] ld c, a bit 7, c jr nz, .asm_17da70 @@ -1897,22 +1897,22 @@ Function17dc1f: ; 17dc1f ld [rSVBK], a ld hl, $c688 ld a, $40 - ld [wc708], a + ld [$c708], a ld a, [hli] - ld [wc70a], a + ld [$c70a], a add $5 - ld [wc70c], a + ld [$c70c], a ld a, [hli] - ld [wc709], a + ld [$c709], a add $4 - ld [wc70b], a + ld [$c70b], a ld a, $96 - ld [wc70d], a + ld [$c70d], a ld a, $5c - ld [wc70e], a + ld [$c70e], a ld a, $1 - ld [wEnemyGoesFirst], a - ld hl, wc708 + ld [$c70f], a + ld hl, $c708 call LoadMenuDataHeader call VerticalMenu jr nc, .asm_17dc6e @@ -2075,112 +2075,112 @@ Function17dd30: ; 17dd30 Function17dd49: ; 17dd49 call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $000a call CopyBytes - ld a, [wc711] + ld a, [$c711] ld c, a ld b, $0 call CopyBytes - ld a, [wc70a] + ld a, [$c70a] cp $c0 - jr c, .asm_17dd6c - ld a, [wc708] + jr c, .sram + ld a, [$c708] ld [rSVBK], a - jr .asm_17dd72 + jr .got_bank -.asm_17dd6c - ld a, [wc708] +.sram + ld a, [$c708] call GetSRAMBank -.asm_17dd72 - ld a, [wc709] +.got_bank + ld a, [$c709] ld l, a - ld a, [wc70a] + ld a, [$c70a] ld h, a ld de, $c688 - ld a, [wc711] + ld a, [$c711] ld c, a ld b, $0 call CopyBytes - ld a, [wc70a] + ld a, [$c70a] cp $c0 - jr c, .asm_17dd93 + jr c, .close_sram ld a, $4 ld [rSVBK], a - jr .asm_17dd96 + jr .exited_bank -.asm_17dd93 +.close_sram call CloseSRAM -.asm_17dd96 - ld a, [wc711] +.exited_bank + ld a, [$c711] ld c, a - ld hl, wc712 + ld hl, $c712 ld de, $c688 -.asm_17dda0 +.loop ld a, [de] inc de cp [hl] inc hl - jr z, .asm_17ddaa - jr c, .asm_17ddc1 - jr .asm_17ddb7 + jr z, .next + jr c, .load + jr .load2 -.asm_17ddaa +.next dec c - jr nz, .asm_17dda0 - ld a, [wc70d] + jr nz, .loop + ld a, [$c70d] ld l, a - ld a, [wc70e] + ld a, [$c70e] ld h, a - jr .asm_17ddc9 + jr .done -.asm_17ddb7 - ld a, [wEnemyGoesFirst] +.load2 + ld a, [$c70f] ld l, a - ld a, [wc710] + ld a, [$c710] ld h, a - jr .asm_17ddc9 + jr .done -.asm_17ddc1 - ld a, [wc70b] +.load + ld a, [$c70b] ld l, a - ld a, [wc70c] + ld a, [$c70c] ld h, a -.asm_17ddc9 +.done call Function17e40f ret ; 17ddcd Function17ddcd: ; 17ddcd call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0008 call CopyBytes - ld a, [wc70a] + ld a, [$c70a] cp $c0 jr c, .asm_17dde7 - ld a, [wc708] + ld a, [$c708] ld [rSVBK], a jr .asm_17dded .asm_17dde7 - ld a, [wc708] + ld a, [$c708] call GetSRAMBank .asm_17dded - ld a, [wc709] + ld a, [$c709] ld e, a - ld a, [wc70a] + ld a, [$c70a] ld d, a ld a, [de] - ld [wc710], a - ld a, [wc70b] + ld [$c710], a + ld a, [$c70b] ld c, a ld b, $0 - ld a, [wc70a] + ld a, [$c70a] cp $c0 jr c, .asm_17de0c ld a, $4 @@ -2195,20 +2195,20 @@ Function17ddcd: ; 17ddcd ld hl, Unknown_17da8c add hl, bc ld a, [hl] - ld hl, wc710 + ld hl, $c710 and [hl] pop hl jr nz, .asm_17de26 - ld a, [wc70e] + ld a, [$c70e] ld l, a - ld a, [wEnemyGoesFirst] + ld a, [$c70f] ld h, a jr .asm_17de2e .asm_17de26 - ld a, [wc70c] + ld a, [$c70c] ld l, a - ld a, [wc70d] + ld a, [$c70d] ld h, a .asm_17de2e @@ -2218,26 +2218,26 @@ Function17ddcd: ; 17ddcd Function17de32: ; 17de32 call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0009 call CopyBytes - ld a, [wc710] + ld a, [$c710] ld c, a ld b, $0 call CopyBytes ld a, $6 call GetSRAMBank call Function17f4f6 - ld a, [wc708] + ld a, [$c708] ld e, a - ld a, [wc709] + ld a, [$c709] ld d, a add hl, de ld e, l ld d, h - ld a, [wc710] + ld a, [$c710] ld c, a - ld hl, wc711 + ld hl, $c711 .asm_17de61 ld a, [de] inc de @@ -2250,23 +2250,23 @@ Function17de32: ; 17de32 .asm_17de6b dec c jr nz, .asm_17de61 - ld a, [wc70c] + ld a, [$c70c] ld l, a - ld a, [wc70d] + ld a, [$c70d] ld h, a jr .asm_17de8a .asm_17de78 - ld a, [wc70e] + ld a, [$c70e] ld l, a - ld a, [wEnemyGoesFirst] + ld a, [$c70f] ld h, a jr .asm_17de8a .asm_17de82 - ld a, [wc70a] + ld a, [$c70a] ld l, a - ld a, [wc70b] + ld a, [$c70b] ld h, a .asm_17de8a @@ -2277,20 +2277,20 @@ Function17de32: ; 17de32 Function17de91: ; 17de91 call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0007 call CopyBytes ld a, $6 call GetSRAMBank call Function17f4f6 - ld a, [wc708] + ld a, [$c708] ld e, a - ld a, [wc709] + ld a, [$c709] ld d, a add hl, de ld e, l ld d, h - ld a, [wc70a] + ld a, [$c70a] ld c, a ld b, $0 ld hl, Unknown_17da8c @@ -2300,16 +2300,16 @@ Function17de91: ; 17de91 ld h, d and [hl] jr nz, .asm_17deca - ld a, [wc70d] + ld a, [$c70d] ld l, a - ld a, [wc70e] + ld a, [$c70e] ld h, a jr .asm_17ded2 .asm_17deca - ld a, [wc70b] + ld a, [$c70b] ld l, a - ld a, [wc70c] + ld a, [$c70c] ld h, a .asm_17ded2 @@ -2320,7 +2320,7 @@ Function17de91: ; 17de91 Function17ded9: ; 17ded9 call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $001f call CopyBytes call Function17e32b @@ -2328,7 +2328,7 @@ Function17ded9: ; 17ded9 push af ld a, $1 ld [rSVBK], a - ld hl, wc708 + ld hl, $c708 ld a, [hli] ld [CurPartySpecies], a ld [TempEnemyMonSpecies], a @@ -2661,14 +2661,14 @@ asm_17e0ee Function17e0fd: ; 17e0fd call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0006 call CopyBytes ld a, [rSVBK] push af ld a, $1 ld [rSVBK], a - ld hl, wc708 + ld hl, $c708 ld a, [hli] ld [CurItem], a ld a, [hli] @@ -2695,14 +2695,14 @@ Function17e0fd: ; 17e0fd Function17e133: ; 17e133 call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0005 call CopyBytes ld a, [rSVBK] push af ld a, $1 ld [rSVBK], a - ld hl, wc708 + ld hl, $c708 ld a, [hli] ld [ScriptVar], a push hl @@ -2726,14 +2726,14 @@ Function17e133: ; 17e133 Function17e165: ; 17e165 call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $0005 call CopyBytes ld a, [rSVBK] push af ld a, $1 ld [rSVBK], a - ld hl, wc708 + ld hl, $c708 ld a, [hli] ld [CurItem], a push hl @@ -2763,31 +2763,31 @@ Function17e165: ; 17e165 Function17e1a1: ; 17e1a1 call Function17e415 - ld de, wc708 + ld de, $c708 ld bc, $000d call CopyBytes - ld a, [wc70a] + ld a, [$c70a] cp $c0 jr c, .asm_17e1bb - ld a, [wc708] + ld a, [$c708] ld [rSVBK], a jr .asm_17e1c1 .asm_17e1bb - ld a, [wc708] + ld a, [$c708] call GetSRAMBank .asm_17e1c1 - ld a, [wc709] + ld a, [$c709] ld l, a - ld a, [wc70a] + ld a, [$c70a] ld h, a ld de, $c608 - ld a, [wc70b] + ld a, [$c70b] ld c, a ld b, $0 call CopyBytes - ld a, [wc70a] + ld a, [$c70a] cp $c0 jr c, .asm_17e1e2 ld a, $4 @@ -2798,28 +2798,28 @@ Function17e1a1: ; 17e1a1 call CloseSRAM .asm_17e1e5 - ld a, [wc70e] + ld a, [$c70e] cp $c0 jr c, .asm_17e1f3 - ld a, [wc70c] + ld a, [$c70c] ld [rSVBK], a jr .asm_17e1f9 .asm_17e1f3 - ld a, [wc70c] + ld a, [$c70c] call GetSRAMBank .asm_17e1f9 - ld a, [wc70d] + ld a, [$c70d] ld l, a - ld a, [wc70e] + ld a, [$c70e] ld h, a ld de, $c688 - ld a, [wc70b] + ld a, [$c70b] ld c, a ld b, $0 call CopyBytes - ld a, [wc70e] + ld a, [$c70e] cp $c0 jr c, .asm_17e21a ld a, $4 @@ -2830,7 +2830,7 @@ Function17e1a1: ; 17e1a1 call CloseSRAM .asm_17e21d - ld a, [wc70b] + ld a, [$c70b] ld c, a ld hl, $c688 ld de, $c608 @@ -2846,23 +2846,23 @@ Function17e1a1: ; 17e1a1 .asm_17e231 dec c jr nz, .asm_17e227 - ld a, [wc711] + ld a, [$c711] ld l, a - ld a, [wc712] + ld a, [$c712] ld h, a jr .asm_17e250 .asm_17e23e - ld a, [wEnemyGoesFirst] + ld a, [$c70f] ld l, a - ld a, [wc710] + ld a, [$c710] ld h, a jr .asm_17e250 .asm_17e248 - ld a, [wc712 + 1] + ld a, [$c712 + 1] ld l, a - ld a, [wc712 + 2] + ld a, [$c712 + 2] ld h, a .asm_17e250 @@ -3647,9 +3647,9 @@ Function17e691: ; 17e691 Function17e6de: ; 17e6de push af - ld a, [wc708] + ld a, [$c708] ld l, a - ld a, [wc709] + ld a, [$c709] ld h, a decoord 0, 0, AttrMap add hl, de @@ -4345,14 +4345,14 @@ Function17f382: ; 17f382 Function17f3c9: ; 17f3c9 push bc ld hl, wcd36 - ld de, wc708 + ld de, $c708 ld bc, $000c call CopyBytes pop de ld c, $0 callba Function11c075 push hl - ld hl, wc708 + ld hl, $c708 ld de, wcd36 ld bc, $000c call CopyBytes diff --git a/wram.asm b/wram.asm index f9816f97b..ce781b51d 100644 --- a/wram.asm +++ b/wram.asm @@ -359,23 +359,20 @@ TileMapEnd:: SECTION "Battle", WRAM0 +wc608:: wOddEgg:: party_struct OddEgg wOddEggName:: ds PKMN_NAME_LENGTH wOddEggOTName:: ds PKMN_NAME_LENGTH - ds wOddEgg - @ + ds wc608 - @ wBT_OTTemp:: battle_tower_struct wBT_OTTemp - ds wBT_OTTemp - @ + ds wc608 - @ hall_of_fame wHallOfFameTemp - ds wHallOfFameTemp - @ + ds wc608 - @ wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2) -wBattle:: -wc608:: - ds 7 -wc60f:: - ds 3 + ds 10 wc612:: ds 10 wInitHourBuffer:: ; c61c @@ -383,8 +380,9 @@ wInitHourBuffer:: ; c61c wc626:: ds wc608 - @ -wEnemyMoveStruct:: move_struct wEnemyMoveStruct -wPlayerMoveStruct:: move_struct wPlayerMoveStruct +wBattle:: +wEnemyMoveStruct:: move_struct wEnemyMoveStruct ; c608 +wPlayerMoveStruct:: move_struct wPlayerMoveStruct ; c60f EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616 BattleMonNick:: ds PKMN_NAME_LENGTH ; c621 @@ -542,17 +540,17 @@ PlayerDamageTaken:: ; c682 EnemyDamageTaken:: ; c684 ds 2 -wBattleReward:: ds 3 +wBattleReward:: ds 3 ; c686 wBattleAnimParam:: wKickCounter:: -wPresentPower:: ds 1 +wPresentPower:: ds 1 ; c689 BattleScriptBuffer:: ; c68a ds 40 BattleScriptBufferLoc:: ; c6b2 ds 2 -wTurnEnded:: ds 1 +wTurnEnded:: ds 1 ; c6b4 ds 1 PlayerStats:: ; c6b6 @@ -592,10 +590,8 @@ EnemyDefLevel:: ; c6d5 ds 1 EnemySpdLevel:: ; c6d6 ds 1 -wTownMapCursorLandmark:: EnemySAtkLevel:: ; c6d7 ds 1 -wTownMapPlayerIconLandmark:: EnemySDefLevel:: ; c6d8 ds 1 EnemyAccLevel:: ; c6d9 @@ -616,7 +612,8 @@ PlayerSubstituteHP:: ; c6df EnemySubstituteHP:: ; c6e0 ds 1 -wc6e1:: ds 2 +wUnusedPlayerLockedMove:: ds 1 ; c6e1 + ds 1 CurPlayerMove:: ; c6e3 ds 1 CurEnemyMove:: ; c6e4 @@ -626,16 +623,12 @@ LinkBattleRNCount:: ; c6e5 ; how far through the prng stream ds 1 -wc6e6:: ds 1 -wc6e7:: ds 1 -wc6e8:: ds 1 -wc6e9:: +wEnemyItemState:: ds 1 ; c6e6 + ds 2 CurEnemyMoveNum:: ; c6e9 ds 1 -wEnemyHPAtTimeOfPlayerSwitch:: -wc6ea:: ds 1 -wc6eb:: ds 1 +wEnemyHPAtTimeOfPlayerSwitch:: ds 2 ; c6ea wPayDayMoney:: ds 3 ; c6ec wSafariMonAngerCount:: ds 1 @@ -649,12 +642,11 @@ DisabledMove:: ; c6f5 ds 1 EnemyDisabledMove:: ; c6f6 ds 1 -wc6f7:: ds 1 +wWhichMonFaintedFirst:: ds 1 ; exists so you can't counter on switch LastEnemyCounterMove:: ; c6f8 ds 1 -wc6f9:: LastPlayerCounterMove:: ; c6f9 ds 1 @@ -663,11 +655,9 @@ wEnemyMinimized:: ds 1 ; c6fa AlreadyFailed:: ; c6fb ds 1 -wc6fc:: ds 1 -wc6fd:: ds 1 -wc6fe:: +wBattleParticipantsIncludingFainted:: ds 1 ; c6fc +wDanger:: ds 1 ; c6fd wPlayerMinimized:: ds 1 ; c6fe -wc6ff:: PlayerScreens:: ; c6ff ; bit ; 4 reflect @@ -676,34 +666,25 @@ PlayerScreens:: ; c6ff ; 0 spikes ds 1 -wc700:: EnemyScreens:: ; c700 ; see PlayerScreens ds 1 -wc701:: PlayerSafeguardCount:: ; c701 ds 1 -wc702:: PlayerLightScreenCount:: ; c702 ds 1 -wc703:: PlayerReflectCount:: ; c703 ds 1 -wc704:: ds 1 -wc705:: + ds 1 EnemySafeguardCount:: ; c705 ds 1 -wc706:: EnemyLightScreenCount:: ; c706 ds 1 EnemyReflectCount:: ; c707 ds 1 - -wc708:: ds 1 -wc709:: ds 1 -wc70a:: + ds 2 Weather:: ; c70a ; 00 normal ; 01 rain @@ -714,81 +695,62 @@ Weather:: ; c70a ; 06 sandstorm subsided ds 1 -wc70b:: WeatherCount:: ; c70b ; # turns remaining ds 1 -wc70c:: LoweredStat:: ; c70c ds 1 -wc70d:: EffectFailed:: ; c70d ds 1 -wc70e:: FailedMessage:: ; c70e ds 1 -wc70f:: -wEnemyGoesFirst:: +wEnemyGoesFirst:: ; c70f ds 1 -wc710:: wPlayerIsSwitching:: ds 1 ; c710 -wc711:: wEnemyIsSwitching:: ds 1 ; c711 -wc712:: PlayerUsedMoves:: ; c712 ; add a move that has been used once by the player ; added in order of use ds NUM_MOVES -wc716:: ds 1 -wEnemySwitchMonParam:: -wc717:: ds 1 -wc718:: -wEnemySwitchMonIndex:: ds 1 -wTempLevel:: -wc719:: ds 1 -LastPlayerMon:: ; c71a -wc71a:: ds 1 +wEnemyAISwitchScore:: ds 1 ; c716 +wEnemySwitchMonParam:: ds 1 ; c717 +wEnemySwitchMonIndex:: ds 1 ; c718 +wTempLevel:: ds 1 ; c719 +LastPlayerMon:: ds 1 ; c71a LastPlayerMove:: ; c71b ds 1 LastEnemyMove:: ; c71c ds 1 -wPlayerFutureSightCount:: ds 1 -wEnemyFutureSightCount:: ds 1 -wc71f:: ds 1 -wc720:: ds 4 ; copy from/to EnemyMonBaseStats, length=7 -wc724:: ds 3 -wPlayerFutureSightDamage:: ds 2 -wEnemyFutureSightDamage:: ds 2 -wPlayerRageCounter:: ds 1 -wEnemyRageCounter:: ds 1 -wc72d:: ds 1 ; if 0 then PrintButItFailed -wc72e:: -wPlayerTrappingMove:: ds 1 -wc72f:: -wEnemyTrappingMove:: ds 1 -wc730:: -wPlayerWrapCount:: ds 1 -wc731:: -wEnemyWrapCount:: ds 1 -wc732:: -wPlayerCharging:: ds 1 -wEnemyCharging:: -wc733:: ds 1 -wTradeAnimPointer:: -wc734:: +wPlayerFutureSightCount:: ds 1 ; c71d +wEnemyFutureSightCount:: ds 1 ; c71e +wGivingExperienceToExpShareHolders:: ds 1 ; c71f +wBackupEnemyMonBaseStats:: ds 5 ; c720 +wBackupEnemyMonCatchRate:: db ; c725 +wBackupEnemyMonBaseExp:: db ; c726 +wPlayerFutureSightDamage:: ds 2 ; c727 +wEnemyFutureSightDamage:: ds 2 ; c729 +wPlayerRageCounter:: ds 1 ; c72b +wEnemyRageCounter:: ds 1 ; c72c +wBeatUpHitAtLeastOnce:: ds 1 ; c72d +wPlayerTrappingMove:: ds 1 ; c72e +wEnemyTrappingMove:: ds 1 ; c72f +wPlayerWrapCount:: ds 1 ; c730 +wEnemyWrapCount:: ds 1 ; c731 +wPlayerCharging:: ds 1 ; c732 +wEnemyCharging:: ds 1 ; c733 BattleEnded:: ; c734 ds 1 -wWildMonMoves:: ds NUM_MOVES -wWildMonPP:: ds NUM_MOVES -wAmuletCoin:: ds 1 -wSomeoneIsRampaging:: ds 1 -wPlayerJustGotFrozen:: ds 1 -wEnemyJustGotFrozen:: ds 1 +wWildMonMoves:: ds NUM_MOVES ; c735 +wWildMonPP:: ds NUM_MOVES ; c739 +wAmuletCoin:: ds 1 ; c73a +wSomeoneIsRampaging:: ds 1 ; c73b +wPlayerJustGotFrozen:: ds 1 ; c73c +wEnemyJustGotFrozen:: ds 1 ; c73d wBattleEnd:: ; Battle RAM @@ -798,6 +760,7 @@ wTrademons:: wPlayerTrademon:: trademon wPlayerTrademon wOTTrademon:: trademon wOTTrademon wTrademonsEnd:: +wTradeAnimPointer:: ds 2 wLinkPlayer1Name:: ds NAME_LENGTH wLinkPlayer2Name:: ds NAME_LENGTH @@ -827,7 +790,8 @@ wPokegearPhoneScrollPosition:: ds 1 ; c6d2 wPokegearPhoneSelectedPerson:: ds 1 ; c6d3 wPokegearPhoneSubmenuCursor:: ds 1 ; c6d4 wPokegearMapCursorObjectPointer:: ds 2 ; c6d5 - ds 2 +wPokegearMapCursorLandmark:: ds 1 ; c6d7 +wPokegearMapPlayerIconLandmark:: ds 1 ; c6d8 wPokegearRadioChannelBank:: ds 1 ; c6d9 wPokegearRadioChannelAddr:: ds 2 ; c6da wPokegearRadioMusicPlaying:: ds 1 ; c6dc @@ -2226,8 +2190,8 @@ wDudeKeyItems:: ds 18 wDudeKeyItemsEnd:: ds 1 wDudeNumBalls:: ds 1 ; d2a6 -wDudeBalls:: ds 2 * 4 -wDudeBallsEnd:: ds 1 +wDudeBalls:: ds 2 * 4 ; d2a7 +wDudeBallsEnd:: ds 1 ; d2af wDudeBagEnd:: ds wDudeBag - @ @@ -2286,15 +2250,12 @@ ScriptDelay:: ; d44d wPriorityScriptBank:: wScriptTextBank:: -wd44e:: ds 1 + ds 1 ; d44e wPriorityScriptAddr:: -wScriptTextAddr:: -wd44f:: ds 1 -wd450:: ds 1 -wd451:: ds 1 +wScriptTextAddr:: ds 2 ; d44f + ds 1 wWildEncounterCooldown:: ds 1 -wd453:: ds 1 -wd454:: ds 1 +wXYComparePointer:: ds 2 ds 4 wBattleScriptFlags:: ds 2 @@ -2494,8 +2455,7 @@ CurTimeOfDay:: ; d848 ds 1 -wSecretID:: ds 1 -wd84b:: ds 1 +wSecretID:: ds 2 StatusFlags:: ; d84c ; 0 - pokedex ; 1 - unown dex @@ -2581,7 +2541,8 @@ PlayerState:: ; d95d ds 1 wHallOfFameCount:: ds 2 -wTradeFlags:: ds 2 +wTradeFlags:: flag_array 6 ; d960 + ds 1 MooMooBerries:: ; d962 ds 1 ; how many berries fed to MooMoo UndergroundSwitchPositions:: ; d963 @@ -2679,8 +2640,8 @@ wMobileBattleRoomTrigger:: ds 1 ; d9c0 ;SECTION "Events", WRAMX, BANK [1] -wJackFightCount:: ds 1 - ds 1 +wJackFightCount:: ds 1 ; d9f2 +wBeverlyFightCount:: ds 1 ; unused wHueyFightCount:: ds 1 wGavenFightCount:: ds 1 wBethFightCount:: ds 1 @@ -2693,23 +2654,21 @@ wLizFightCount:: ds 1 wAnthonyFightCount:: ds 1 wToddFightCount:: ds 1 wGinaFightCount:: ds 1 - -wda00:: ds 1 - +wIrwinFightCount:: ds 1 ; unused wArnieFightCount:: ds 1 wAlanFightCount:: ds 1 wDanaFightCount:: ds 1 wChadFightCount:: ds 1 - ds 1 +wDerekFightCount:: ds 1 ; unused wTullyFightCount:: ds 1 wBrentFightCount:: ds 1 wTiffanyFightCount:: ds 1 wVanceFightCount:: ds 1 wWiltonFightCount:: ds 1 - ds 1 +wKenjiFightCount:: ds 1 ; unused wParryFightCount:: ds 1 wErinFightCount:: ds 1 - +; da0e ds 100 EventFlags:: ; da72 @@ -2736,32 +2695,22 @@ BikeFlags:: ; dbf5 ds 1 ds 1 -wCurrentMapTriggerPointer:: ; dbf7 - ds 2 +wCurrentMapTriggerPointer:: ds 2 ; dbf7 -wCurrentCaller:: ds 2 -wCurrMapWarpCount:: ds 1 -wCurrMapWarpHeaderPointer:: ds 1 -wdbfd:: ds 1 -wCurrentMapXYTriggerCount:: ds 1 -wCurrentMapXYTriggerHeaderPointer:: ds 1 -wdc00:: ds 1 -wCurrentMapSignpostCount:: ds 1 -wCurrentMapSignpostHeaderPointer:: -wdc02:: ds 1 -wdc03:: ds 1 -wCurrentMapPersonEventCount:: -wdc04:: ds 1 -wCurrentMapPersonEventHeaderPointer:: -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 +wCurrentCaller:: ds 2 ; dbf9 +wCurrMapWarpCount:: ds 1 ; dbfb +wCurrMapWarpHeaderPointer:: ds 2 ; dbfc +wCurrentMapXYTriggerCount:: ds 1 ; dbfe +wCurrentMapXYTriggerHeaderPointer:: ds 2 ; dbff +wCurrentMapSignpostCount:: ds 1 ; dc01 +wCurrentMapSignpostHeaderPointer:: ds 2 ; dc02 +wCurrentMapPersonEventCount:: ds 1 ; dc04 +wCurrentMapPersonEventHeaderPointer:: ds 2 ; dc05 +wCurrMapTriggerCount:: ds 1 ; dc07 +wCurrMapTriggerHeaderPointer:: ds 2 ; dc08 +wCurrMapCallbackCount:: ds 1 ; dc0a +wCurrMapCallbackHeaderPointer:: ds 2 ; dc0b + ds 2 ; Sprite id of each decoration Bed:: ; dc0f @@ -2782,40 +2731,32 @@ BigDoll:: ; dc16 ds 1 ; Items bought from Mom -wWhichMomItem:: -wdc17:: ds 1 -wWhichMomItemSet:: - ds 1 -MomItemTriggerBalance:: -wdc19:: ds 1 -wdc1a:: ds 1 -wdc1b:: ds 1 +wWhichMomItem:: ds 1 ; dc17 +wWhichMomItemSet:: ds 1 ; dc18 +MomItemTriggerBalance:: ds 3 ; dc19 wDailyResetTimer:: ds 2 DailyFlags:: ds 1 WeeklyFlags:: ds 1 SwarmFlags:: ds 1 -wdc21:: ds 1 -wdc22:: ds 1 + ds 2 wStartDay:: ds 1 -wdc24:: ds 2 -wdc26:: ds 1 + ds 3 -FruitTreeFlags:: ; dc27 - ds 1 +FruitTreeFlags:: flag_array NUM_FRUIT_TREES ; dc27 - ds 5 + ds 2 wLuckyNumberDayBuffer:: ds 2 ds 2 wSpecialPhoneCallID:: ds 1 ds 3 wBugContestStartTime:: ds 4 ; day, hour, min, sec -wdc39:: ds 1 +wUnusedTwoDayTimerOn:: ds 1 ; dc39 wUnusedTwoDayTimer:: ds 1 wUnusedTwoDayTimerStartDate:: ds 1 ds 4 -wdc40:: ds 1 +wMobileOrCable_LastSelection:: ds 1 wdc41:: ds 1 wdc42:: ds 8 wBuenasPassword:: ds 1 @@ -2842,6 +2783,7 @@ wParkBallsRemaining:: wSafariBallsRemaining:: ds 1 ; dc79 wSafariTimeRemaining:: ds 2 ; dc7a wPhoneList:: ds CONTACT_LIST_SIZE ; dc7c +; dc86 ds 23 wLuckyNumberShowFlag:: ds 2 ; dc9d wLuckyIDNumber:: ds 2 ; dc9f @@ -2966,11 +2908,7 @@ wEggNick:: ds PKMN_NAME_LENGTH ; df65 wEggOT:: ds NAME_LENGTH ; df70 wEggMon:: box_struct wEggMon ; df7b -wdf9b:: wBugContestSecondPartySpecies:: ds 1 - - -wdf9c:: wContestMon:: party_struct wContestMon ; df9c wDunsparceMapGroup:: ds 1 @@ -2997,8 +2935,7 @@ wRoamMons_LastMapGroup:: ds 1 wBestMagikarpLengthFeet:: ds 1 wBestMagikarpLengthInches:: ds 1 wMagikarpRecordHoldersName:: ds NAME_LENGTH -wdff5:: - +; dff5 wPokemonDataEnd:: wGameDataEnd::