diff options
Diffstat (limited to 'engine')
41 files changed, 448 insertions, 655 deletions
diff --git a/engine/billspc.asm b/engine/billspc.asm index b9b51f850..4d8bf1c48 100755 --- a/engine/billspc.asm +++ b/engine/billspc.asm @@ -39,7 +39,7 @@ _DepositPKMN: ; e2391 (38:6391) ld a, [wJumptableIndex] ld hl, .Jumptable call BillsPC_Jumptable - jp [hl] + jp hl .Jumptable: ; e23df (38:63df) @@ -147,7 +147,7 @@ _DepositPKMN: ; e2391 (38:6391) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl BillsPCDepositJumptable: ; e24a1 (38:64a1) @@ -306,7 +306,7 @@ _WithdrawPKMN: ; e2583 (38:6583) ld a, [wJumptableIndex] ld hl, .Jumptable call BillsPC_Jumptable - jp [hl] + jp hl .Jumptable: ; e25d2 (38:65d2) @@ -415,7 +415,7 @@ BillsPC_Withdraw: ; e2675 (38:6675) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .dw ; e2699 (38:6699) #mark dw .withdraw ; Withdraw @@ -556,7 +556,7 @@ _MovePKMNWithoutMail: ; e2759 ld a, [wJumptableIndex] ld hl, .Jumptable call BillsPC_Jumptable - jp [hl] + jp hl ; e27ac .Jumptable: ; e27ac @@ -678,7 +678,7 @@ _MovePKMNWithoutMail: ; e2759 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; e2881 .Jumptable2: ; e2881 @@ -2014,7 +2014,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ld l, a ld de, .dw_return push de - jp [hl] + jp hl ; e322a .dw_return ; e322a diff --git a/engine/breeding/egg.asm b/engine/breeding/egg.asm index fa499c071..326faaa6c 100755 --- a/engine/breeding/egg.asm +++ b/engine/breeding/egg.asm @@ -232,7 +232,7 @@ HatchEggs: ; 16f70 (5:6f70) push de callba SetEggMonCaughtData - callba MobileFn_10608d + callba TrainerRankings_EggsHatched ld a, [CurPartyMon] ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species) ld bc, PARTYMON_STRUCT_LENGTH diff --git a/engine/card_flip.asm b/engine/card_flip.asm index 0479e8248..cdf2be010 100755 --- a/engine/card_flip.asm +++ b/engine/card_flip.asm @@ -76,7 +76,7 @@ _CardFlip: ; e00ee (38:40ee) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; e01a0 (38:41a0) .Jumptable: ; e01a0 @@ -652,7 +652,7 @@ CardFlip_BlankDiscardedCardSlot: ; e0534 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; e0553 .Jumptable: ; e0553 @@ -829,7 +829,7 @@ CardFlip_CheckWinCondition: ; e0637 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; e0643 .Jumptable: ; e0643 diff --git a/engine/credits.asm b/engine/credits.asm index fad8a615e..b2a1c1e93 100644 --- a/engine/credits.asm +++ b/engine/credits.asm @@ -263,7 +263,7 @@ Credits_Jumptable: ; 109926 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 109937 diff --git a/engine/crystal_intro.asm b/engine/crystal_intro.asm index 29bb0934f..1c0d7cd3e 100755 --- a/engine/crystal_intro.asm +++ b/engine/crystal_intro.asm @@ -125,7 +125,7 @@ PlaceGameFreakPresents: ; e4670 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; e467f .dw ; e467f @@ -222,7 +222,7 @@ GameFreakLogoJumper: ; e46ed (39:46ed) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl GameFreakLogoScenes: ; e46fd (39:46fd) dw GameFreakLogoScene1 @@ -367,7 +367,8 @@ GameFreakLogoPalettes: ; e47ac ; e47cc GameFreakLogo: ; e47cc -INCBIN "gfx/splash/logo.1bpp" +INCBIN "gfx/splash/logo1.1bpp" +INCBIN "gfx/splash/logo2.1bpp" ; e48ac CrystalIntro: ; e48ac @@ -438,7 +439,7 @@ IntroSceneJumper: ; e490f ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; e491e IntroScenes: ; e491e (39:491e) diff --git a/engine/debug.asm b/engine/debug.asm index 78fc52489..9c2bb35c2 100755 --- a/engine/debug.asm +++ b/engine/debug.asm @@ -305,7 +305,7 @@ Function81a74: ; 81a74 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .asm_81a9a call Function81eca @@ -611,7 +611,7 @@ Function81cc2: ; 81cc2 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .asm_81cdf ld a, $4 @@ -1353,7 +1353,7 @@ Function822f0: ; 822f0 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 82301 .dw ; 82301 diff --git a/engine/events.asm b/engine/events.asm index e7598b595..2eb92d1a1 100644 --- a/engine/events.asm +++ b/engine/events.asm @@ -609,7 +609,7 @@ TryObjectEvent: ; 969b5 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .nope_bugged ; pop bc diff --git a/engine/events_3.asm b/engine/events_3.asm index 01b8d7046..b6aaea3b7 100755 --- a/engine/events_3.asm +++ b/engine/events_3.asm @@ -360,7 +360,7 @@ CheckForHiddenItems: ; b8172 TreeMonEncounter: ; b81ea - callba MobileFn_1060ef + callba TrainerRankings_TreeEncounters xor a ld [TempWildMonSpecies], a diff --git a/engine/evolve.asm b/engine/evolve.asm index 202ad10ff..2f7739191 100755 --- a/engine/evolve.asm +++ b/engine/evolve.asm @@ -247,7 +247,7 @@ EvolveAfterBattle_MasterLoop push hl ld hl, Text_EvolvedIntoPKMN call PrintTextBoxText - callba MobileFn_106094 + callba TrainerRankings_MonsEvolved ld de, MUSIC_NONE call PlayMusic diff --git a/engine/facings.asm b/engine/facings.asm index f807e77f8..ee9efec3f 100644 --- a/engine/facings.asm +++ b/engine/facings.asm @@ -1,36 +1,36 @@ Facings: ; 4049 - dw Facing00 - dw Facing01 - dw Facing02 - dw Facing03 - dw Facing04 - dw Facing05 - dw Facing06 - dw Facing07 - dw Facing08 - dw Facing09 - dw Facing10 - dw Facing11 - dw Facing12 - dw Facing13 - dw Facing14 - dw Facing15 - dw Facing16 - dw Facing17 - dw Facing18 - dw Facing19 - dw Facing20 - dw Facing21 - dw Facing22 - dw Facing23 - dw Facing24 - dw Facing25 - dw Facing26 - dw Facing27 - dw Facing28 - dw Facing29 - dw Facing30 - dw Facing31 + dw FacingStepDown0 + dw FacingStepDown1 + dw FacingStepDown2 + dw FacingStepDown3 + dw FacingStepUp0 + dw FacingStepUp1 + dw FacingStepUp2 + dw FacingStepUp3 + dw FacingStepLeft0 + dw FacingStepLeft1 + dw FacingStepLeft2 + dw FacingStepLeft3 + dw FacingStepRight0 + dw FacingStepRight1 + dw FacingStepRight2 + dw FacingStepRight3 + dw FacingFishDown + dw FacingFishUp + dw FacingFishLeft + dw FacingFishRight + dw FacingEmote + dw FacingShadow + dw FacingBigDollAsymmetric + dw FacingBigDollSymmetric + dw FacingWeirdTree0 + dw FacingWeirdTree1 + dw FacingWeirdTree2 + dw FacingWeirdTree3 + dw FacingBoulderDust1 + dw FacingBoulderDust2 + dw FacingGrass1 + dw FacingGrass2 FacingsEnd: dw 0 NUM_FACINGS EQU (FacingsEnd - Facings) / 2 @@ -47,10 +47,10 @@ Y_FLIP EQU 1 << OAM_Y_FLIP BEHIND_BG EQU 1 << OAM_PRIORITY -Facing00: -Facing02: -Facing24: -Facing26: ; standing down +FacingStepDown0: +FacingStepDown2: +FacingWeirdTree0: +FacingWeirdTree2: ; standing down db 4 ; # db 0, 0, 0, $00 db 0, 8, 0, $01 @@ -58,7 +58,7 @@ Facing26: ; standing down db 8, 8, 2, $03 ; 409c -Facing01: ; walking down 1 +FacingStepDown1: ; walking down 1 db 4 ; # db 0, 0, 0, $80 db 0, 8, 0, $81 @@ -66,7 +66,7 @@ Facing01: ; walking down 1 db 8, 8, 2, $83 ; 40ad -Facing03: ; walking down 2 +FacingStepDown3: ; walking down 2 db 4 ; # db 0, 8, X_FLIP, $80 db 0, 0, X_FLIP, $81 @@ -74,8 +74,8 @@ Facing03: ; walking down 2 db 8, 0, 2 | X_FLIP, $83 ; 40be -Facing04: -Facing06: ; standing up +FacingStepUp0: +FacingStepUp2: ; standing up db 4 ; # db 0, 0, 0, $04 db 0, 8, 0, $05 @@ -83,7 +83,7 @@ Facing06: ; standing up db 8, 8, 2, $07 ; 40cf -Facing05: ; walking up 1 +FacingStepUp1: ; walking up 1 db 4 ; # db 0, 0, 0, $84 db 0, 8, 0, $85 @@ -91,7 +91,7 @@ Facing05: ; walking up 1 db 8, 8, 2, $87 ; 40e0 -Facing07: ; walking up 2 +FacingStepUp3: ; walking up 2 db 4 ; # db 0, 8, X_FLIP, $84 db 0, 0, X_FLIP, $85 @@ -99,8 +99,8 @@ Facing07: ; walking up 2 db 8, 0, 2 | X_FLIP, $87 ; 40f1 -Facing08: -Facing10: ; standing left +FacingStepLeft0: +FacingStepLeft2: ; standing left db 4 ; # db 0, 0, 0, $08 db 0, 8, 0, $09 @@ -108,8 +108,8 @@ Facing10: ; standing left db 8, 8, 2, $0b ; 4102 -Facing12: -Facing14: ; standing right +FacingStepRight0: +FacingStepRight2: ; standing right db 4 ; # db 0, 8, X_FLIP, $08 db 0, 0, X_FLIP, $09 @@ -117,8 +117,8 @@ Facing14: ; standing right db 8, 0, 2 | X_FLIP, $0b ; 4113 -Facing09: -Facing11: ; walking left +FacingStepLeft1: +FacingStepLeft3: ; walking left db 4 ; # db 0, 0, 0, $88 db 0, 8, 0, $89 @@ -126,8 +126,8 @@ Facing11: ; walking left db 8, 8, 2, $8b ; 4124 -Facing13: -Facing15: ; walking right +FacingStepRight1: +FacingStepRight3: ; walking right db 4 ; # db 0, 8, X_FLIP, $88 db 0, 0, X_FLIP, $89 @@ -135,7 +135,7 @@ Facing15: ; walking right db 8, 0, 2 | X_FLIP, $8b ; 4135 -Facing16: ; fishing down +FacingFishDown: ; fishing down db 5 ; # db 0, 0, 0, $00 db 0, 8, 0, $01 @@ -144,7 +144,7 @@ Facing16: ; fishing down db 16, 0, 4, $fc ; 414a -Facing17: ; fishing up +FacingFishUp: ; fishing up db 5 ; # db 0, 0, 0, $04 db 0, 8, 0, $05 @@ -153,7 +153,7 @@ Facing17: ; fishing up db -8, 0, 4, $fc ; 415f -Facing18: ; fishing left +FacingFishLeft: ; fishing left db 5 ; # db 0, 0, 0, $08 db 0, 8, 0, $09 @@ -162,7 +162,7 @@ Facing18: ; fishing left db 5, -8, 4 | X_FLIP, $fd ; 4174 -Facing19: ; fishing right +FacingFishRight: ; fishing right db 5 ; # db 0, 8, X_FLIP, $08 db 0, 0, X_FLIP, $09 @@ -171,7 +171,7 @@ Facing19: ; fishing right db 5, 16, 4, $fd ; 4189 -Facing20: ; emote +FacingEmote: ; emote db 4 ; # db 0, 0, 4, $f8 db 0, 8, 4, $f9 @@ -179,13 +179,13 @@ Facing20: ; emote db 8, 8, 4, $fb ; 419a -Facing21: ; shadow +FacingShadow: ; shadow db 2 ; # db 0, 0, 4, $fc db 0, 8, 4 | X_FLIP, $fc ; 41a3 -Facing23: ; big snorlax or lapras doll +FacingBigDollSymmetric: ; big snorlax or lapras doll db 16 ; # db 0, 0, 0, $00 db 0, 8, 0, $01 @@ -205,7 +205,7 @@ Facing23: ; big snorlax or lapras doll db 24, 16, X_FLIP, $07 ; 41e4 -Facing25: ; 41e4 +FacingWeirdTree1: ; 41e4 db 4 ; # db 0, 0, 0, $04 db 0, 8, 0, $05 @@ -213,7 +213,7 @@ Facing25: ; 41e4 db 8, 8, 0, $07 ; 41f5 -Facing27: ; 41f5 +FacingWeirdTree3: ; 41f5 db 4 ; # db 0, 8, X_FLIP, $04 db 0, 0, X_FLIP, $05 @@ -221,7 +221,7 @@ Facing27: ; 41f5 db 8, 0, X_FLIP, $07 ; 4206 -Facing22: ; big doll other than snorlax or lapras +FacingBigDollAsymmetric: ; big doll other than snorlax or lapras db 14 ; # db 0, 0, 0, $00 db 0, 8, 0, $01 @@ -239,7 +239,7 @@ Facing22: ; big doll other than snorlax or lapras db 24, 16, 0, $0b ; 423f -Facing28: ; boulder dust 1 +FacingBoulderDust1: ; boulder dust 1 db 4 ; # db 0, 0, 4, $fe db 0, 8, 4, $fe @@ -247,7 +247,7 @@ Facing28: ; boulder dust 1 db 8, 8, 4, $fe ; 4250 -Facing29: ; boulder dust 2 +FacingBoulderDust2: ; boulder dust 2 db 4 ; # db 0, 0, 4, $ff db 0, 8, 4, $ff @@ -255,13 +255,13 @@ Facing29: ; boulder dust 2 db 8, 8, 4, $ff ; 4261 -Facing30: ; 4261 +FacingGrass1: ; 4261 db 2 ; # db 8, 0, 4, $fe db 8, 8, 4 | X_FLIP, $fe ; 426a -Facing31: ; 426a +FacingGrass2: ; 426a db 2 ; # db 9, -1, 4, $fe db 9, 9, 4 | X_FLIP, $fe diff --git a/engine/fruit_trees.asm b/engine/fruit_trees.asm index 09619cfa5..6a40fb05c 100644 --- a/engine/fruit_trees.asm +++ b/engine/fruit_trees.asm @@ -58,7 +58,7 @@ CheckFruitTree: ; 44055 ; 4405f PickedFruitTree: ; 4405f - callba MobileFn_10609b ; empty function + callba TrainerRankings_FruitPicked ld b, 1 jp GetFruitTreeFlag ; 4406a diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm index 3e4257ab7..8e3c90204 100755 --- a/engine/intro_menu.asm +++ b/engine/intro_menu.asm @@ -1064,7 +1064,7 @@ StartTitleScreen: ; 6219 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 626a .dw @@ -1117,7 +1117,7 @@ TitleScreenScene: ; 62a3 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 62af .scenes diff --git a/engine/link.asm b/engine/link.asm index 951eb1444..f5bc24da9 100755 --- a/engine/link.asm +++ b/engine/link.asm @@ -1973,7 +1973,7 @@ LinkTrade: ; 28b87 .save callba SaveAfterLinkTrade - callba MobileFn_1060af + callba TrainerRankings_Trades callba BackupMobileEventIndex ld c, 40 call DelayFrames diff --git a/engine/map_object_action.asm b/engine/map_object_action.asm index 59e0ef7de..a7ab87200 100755 --- a/engine/map_object_action.asm +++ b/engine/map_object_action.asm @@ -14,23 +14,23 @@ ; 445f Pointers445f: ; 445f - dw SetFacingStanding, SetFacingStanding ; 00 - dw Function44b5, SetFacingCurrent ; 01 standing? - dw Function44c1, SetFacingCurrent ; 02 walking? - dw Function4508, SetFacingCurrent ; 03 bumping? - dw Function4529, SetFacingCurrent ; 04 - dw Function4539, SetFacingStanding ; 05 - dw Function456e, Function456e ; 06 - dw Function457b, SetFacingStanding ; 07 - dw Function4582, Function4582 ; 08 - dw Function4589, Function4589 ; 09 - dw Function4590, Function45a4 ; 0a - dw Function45ab, SetFacingCurrent ; 0c - dw Function45be, Function45be ; 0b - dw Function45c5, Function45c5 ; 0d - dw Function45da, SetFacingStanding ; 0e - dw Function45ed, SetFacingStanding ; 0f - dw Function44e4, SetFacingCurrent ; 10 + dw SetFacingStanding, SetFacingStanding ; 00 + dw SetFacingStandAction, SetFacingCurrent ; 01 standing? + dw SetFacingStepAction, SetFacingCurrent ; 02 walking? + dw SetFacingBumpAction, SetFacingCurrent ; 03 bumping? + dw SetFacingCounterclockwiseSpin, SetFacingCurrent ; 04 + dw SetFacingCounterclockwiseSpin2, SetFacingStanding ; 05 + dw SetFacingFish, SetFacingFish ; 06 + dw SetFacingShadow, SetFacingStanding ; 07 + dw SetFacingEmote, SetFacingEmote ; 08 + dw SetFacingBigDollSym, SetFacingBigDollSym ; 09 + dw SetFacingBounce, SetFacingFreezeBounce ; 0a + dw SetFacingWeirdTree, SetFacingCurrent ; 0b + dw SetFacingBigDollAsym, SetFacingBigDollAsym ; 0c + dw SetFacingBigDoll, SetFacingBigDoll ; 0d + dw SetFacingBoulderDust, SetFacingStanding ; 0e + dw SetFacingGrassShake, SetFacingStanding ; 0f + dw SetFacingSkyfall, SetFacingCurrent ; 10 ; 44a3 SetFacingStanding: ; 44a3 @@ -42,23 +42,23 @@ SetFacingStanding: ; 44a3 SetFacingCurrent: ; 44aa call GetSpriteDirection - or 0 ; useless + or FACING_STEP_DOWN_0 ; useless ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], a ret ; 44b5 -Function44b5: ; 44b5 +SetFacingStandAction: ; 44b5 ld hl, OBJECT_FACING_STEP add hl, bc ld a, [hl] and 1 - jr nz, Function44c1 + jr nz, SetFacingStepAction jp SetFacingCurrent ; 44c1 -Function44c1: ; 44c1 +SetFacingStepAction: ; 44c1 ld hl, OBJECT_FLAGS1 add hl, bc bit SLIDING, [hl] @@ -77,7 +77,7 @@ Function44c1: ; 44c1 ld d, a call GetSpriteDirection - or 0 ; useless + or FACING_STEP_DOWN_0 ; useless or d ld hl, OBJECT_FACING_STEP add hl, bc @@ -85,7 +85,7 @@ Function44c1: ; 44c1 ret ; 44e4 -Function44e4: ; 44e4 +SetFacingSkyfall: ; 44e4 ld hl, OBJECT_FLAGS1 add hl, bc bit SLIDING, [hl] @@ -104,7 +104,7 @@ Function44e4: ; 44e4 ld d, a call GetSpriteDirection - or 0 ; useless + or FACING_STEP_DOWN_0 ; useless or d ld hl, OBJECT_FACING_STEP add hl, bc @@ -112,7 +112,7 @@ Function44e4: ; 44e4 ret ; 4508 -Function4508: ; 4508 +SetFacingBumpAction: ; 4508 ld hl, OBJECT_FLAGS1 add hl, bc bit SLIDING, [hl] @@ -130,7 +130,7 @@ Function4508: ; 4508 ld d, a call GetSpriteDirection - or 0 ; useless + or FACING_STEP_DOWN_0 ; useless or d ld hl, OBJECT_FACING_STEP add hl, bc @@ -138,24 +138,28 @@ Function4508: ; 4508 ret ; 4529 -Function4529: ; 4529 - call Function453f +SetFacingCounterclockwiseSpin: ; 4529 + call CounterclockwiseSpinAction ld hl, OBJECT_FACING add hl, bc ld a, [hl] - or 0 ; useless + or FACING_STEP_DOWN_0 ; useless ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], a ret ; 4539 -Function4539: ; 4539 - call Function453f +SetFacingCounterclockwiseSpin2: ; 4539 + call CounterclockwiseSpinAction jp SetFacingStanding ; 453f -Function453f: ; 453f +CounterclockwiseSpinAction: ; 453f +; Here, OBJECT_STEP_FRAME consists of two 2-bit components, +; using only bits 0,1 and 4,5. +; bits 0,1 is a timer (4 overworld frames) +; bits 4,5 determines the facing - the direction is counterclockwise. ld hl, OBJECT_STEP_FRAME add hl, bc ld a, [hl] @@ -195,39 +199,39 @@ Function453f: ; 453f db OW_DOWN, OW_RIGHT, OW_UP, OW_LEFT ; 456e -Function456e: ; 456e +SetFacingFish: ; 456e call GetSpriteDirection rrca rrca - add $10 + add FACING_FISH_DOWN ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], a ret ; 457b -Function457b: ; 457b +SetFacingShadow: ; 457b ld hl, OBJECT_FACING_STEP add hl, bc - ld [hl], FACING_15 + ld [hl], FACING_SHADOW ret ; 4582 -Function4582: ; 4582 emote +SetFacingEmote: ; 4582 emote ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], FACING_EMOTE ret ; 4589 -Function4589: ; 4589 +SetFacingBigDollSym: ; 4589 ld hl, OBJECT_FACING_STEP add hl, bc - ld [hl], FACING_17 + ld [hl], FACING_BIG_DOLL_SYM ret ; 4590 -Function4590: ; 4590 +SetFacingBounce: ; 4590 ld hl, OBJECT_STEP_FRAME add hl, bc ld a, [hl] @@ -235,21 +239,21 @@ Function4590: ; 4590 and %00001111 ld [hl], a and %00001000 - jr z, Function45a4 + jr z, SetFacingFreezeBounce ld hl, OBJECT_FACING_STEP add hl, bc - ld [hl], FACING_04 + ld [hl], FACING_STEP_UP_0 ret ; 45a4 -Function45a4: ; 45a4 +SetFacingFreezeBounce: ; 45a4 ld hl, OBJECT_FACING_STEP add hl, bc - ld [hl], 0 + ld [hl], FACING_STEP_DOWN_0 ret ; 45ab -Function45ab: ; 45ab +SetFacingWeirdTree: ; 45ab ld hl, OBJECT_STEP_FRAME add hl, bc ld a, [hl] @@ -258,28 +262,28 @@ Function45ab: ; 45ab and %00001100 rrca rrca - add $18 + add FACING_WEIRD_TREE_0 ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], a ret ; 45be -Function45be: ; 45be +SetFacingBigDollAsym: ; 45be ld hl, OBJECT_FACING_STEP add hl, bc - ld [hl], FACING_16 + ld [hl], FACING_BIG_DOLL_ASYM ret ; 45c5 -Function45c5: ; 45c5 +SetFacingBigDoll: ; 45c5 ld a, [VariableSprites + SPRITE_BIG_DOLL - SPRITE_VARS] - ld d, FACING_17 ; symmetric + ld d, FACING_BIG_DOLL_SYM ; symmetric cp SPRITE_BIG_SNORLAX jr z, .ok cp SPRITE_BIG_LAPRAS jr z, .ok - ld d, FACING_16 ; asymmetric + ld d, FACING_BIG_DOLL_ASYM ; asymmetric .ok ld hl, OBJECT_FACING_STEP @@ -288,7 +292,7 @@ Function45c5: ; 45c5 ret ; 45da -Function45da: ; 45da +SetFacingBoulderDust: ; 45da ld hl, OBJECT_STEP_FRAME add hl, bc inc [hl] @@ -297,15 +301,15 @@ Function45da: ; 45da ld hl, OBJECT_FACING_STEP add hl, bc and 2 - ld a, FACING_1C + ld a, FACING_BOULDER_DUST_1 jr z, .ok - inc a ; FACING_1D + inc a ; FACING_BOULDER_DUST_2 .ok ld [hl], a ret ; 45ed -Function45ed: ; 45ed +SetFacingGrassShake: ; 45ed ld hl, OBJECT_STEP_FRAME add hl, bc inc [hl] @@ -313,9 +317,9 @@ Function45ed: ; 45ed ld hl, OBJECT_FACING_STEP add hl, bc and 4 - ld a, FACING_1E + ld a, FACING_GRASS_1 jr z, .ok - inc a ; FACING_1F + inc a ; FACING_GRASS_2 .ok ld [hl], a diff --git a/engine/map_objects.asm b/engine/map_objects.asm index 58c30c8fb..d5fa84642 100644 --- a/engine/map_objects.asm +++ b/engine/map_objects.asm @@ -776,7 +776,7 @@ MapObjectMovementPattern: ; 47dd ld [hl], STANDING ld hl, OBJECT_ACTION add hl, bc - ld [hl], PERSON_ACTION_09 + ld [hl], PERSON_ACTION_BIG_SNORLAX ld hl, OBJECT_STEP_TYPE add hl, bc ld [hl], STEP_TYPE_04 @@ -789,7 +789,7 @@ MapObjectMovementPattern: ; 47dd ld [hl], STANDING ld hl, OBJECT_ACTION add hl, bc - ld [hl], PERSON_ACTION_0A + ld [hl], PERSON_ACTION_BOUNCE ld hl, OBJECT_STEP_TYPE add hl, bc ld [hl], STEP_TYPE_04 @@ -864,7 +864,7 @@ MapObjectMovementPattern: ; 47dd call ._MovementShadow_Grass_Emote_BoulderDust ld hl, OBJECT_ACTION add hl, bc - ld [hl], PERSON_ACTION_07 + ld [hl], PERSON_ACTION_SHADOW ld hl, OBJECT_STEP_DURATION add hl, de ld a, [hl] @@ -921,7 +921,7 @@ MapObjectMovementPattern: ; 47dd call ._MovementShadow_Grass_Emote_BoulderDust ld hl, OBJECT_ACTION add hl, bc - ld [hl], PERSON_ACTION_0E + ld [hl], PERSON_ACTION_BOULDER_DUST ld hl, OBJECT_STEP_DURATION add hl, de ld a, [hl] @@ -965,7 +965,7 @@ MapObjectMovementPattern: ; 47dd call ._MovementShadow_Grass_Emote_BoulderDust ld hl, OBJECT_ACTION add hl, bc - ld [hl], PERSON_ACTION_0F + ld [hl], PERSON_ACTION_GRASS_SHAKE ld hl, OBJECT_STEP_DURATION add hl, de ld a, [hl] @@ -1804,7 +1804,7 @@ SkyfallTop: ; 4f83 .Init: ld hl, OBJECT_ACTION add hl, bc - ld [hl], PERSON_ACTION_10 + ld [hl], PERSON_ACTION_SKYFALL ld hl, OBJECT_STEP_DURATION add hl, bc ld [hl], 16 @@ -1955,7 +1955,7 @@ JumpMovementPointer: ; 505e ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 5065 ContinueReadingMovement: ; 5065 diff --git a/engine/mon_icons.asm b/engine/mon_icons.asm index 7e8136235..d66ea6fac 100755 --- a/engine/mon_icons.asm +++ b/engine/mon_icons.asm @@ -33,7 +33,7 @@ LoadMenuMonIcon: ; 8e83f ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 8e854 diff --git a/engine/movement.asm b/engine/movement.asm index 3cc2796db..7b58e4023 100644 --- a/engine/movement.asm +++ b/engine/movement.asm @@ -365,7 +365,7 @@ Movement_tree_shake: ; 5279 ld hl, OBJECT_ACTION add hl, bc - ld [hl], PERSON_ACTION_0B + ld [hl], PERSON_ACTION_WEIRD_TREE ld hl, OBJECT_DIRECTION_WALKING add hl, bc diff --git a/engine/mysterygift.asm b/engine/mysterygift.asm index 9f5302506..f2d29b08a 100755 --- a/engine/mysterygift.asm +++ b/engine/mysterygift.asm @@ -63,7 +63,7 @@ DoMysteryGift: ; 1048ba (41:48ba) jr z, .skip_append_save call .SaveMysteryGiftTrainerName callba RestoreMobileEventIndex - callba MobileFn_1060a9 + callba TrainerRankings_MysteryGift callba BackupMobileEventIndex .skip_append_save ld a, [wMysteryGiftPartnerSentDeco] diff --git a/engine/namingscreen.asm b/engine/namingscreen.asm index d80b4717b..4a7ca301a 100755 --- a/engine/namingscreen.asm +++ b/engine/namingscreen.asm @@ -70,7 +70,7 @@ NamingScreen: ; 116c1 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 1172e @@ -405,7 +405,7 @@ NamingScreenJoypadLoop: ; 11915 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 11977 @@ -1166,7 +1166,7 @@ INCBIN "gfx/icon/mail2.2bpp" ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .Jumptable: ; 12017 (4:6017) dw .init_blinking_cursor diff --git a/engine/options_menu.asm b/engine/options_menu.asm index 68c1883ee..ec41288ff 100755 --- a/engine/options_menu.asm +++ b/engine/options_menu.asm @@ -90,7 +90,7 @@ GetOptionPointer: ; e42d6 ld a, [hli] ld h, [hl] ld l, a - jp [hl] ; jump to the code of the current highlighted item + jp hl ; jump to the code of the current highlighted item ; e42e5 .Pointers: diff --git a/engine/pack.asm b/engine/pack.asm index 19b7fccbf..8a63d22e5 100644 --- a/engine/pack.asm +++ b/engine/pack.asm @@ -23,7 +23,7 @@ Pack: ; 10000 ld a, [wJumptableIndex] ld hl, .Jumptable call Pack_GetJumptablePointer - jp [hl] + jp hl ; 10030 @@ -144,7 +144,7 @@ Pack: ; 10000 ld a, [wMenuCursorY] dec a call Pack_GetJumptablePointer - jp [hl] + jp hl ; 10124 (4:4124) .MenuDataHeader1: ; 0x10124 @@ -306,7 +306,7 @@ Pack: ; 10000 ld a, [wMenuCursorY] dec a call Pack_GetJumptablePointer - jp [hl] + jp hl ; 10249 (4:4249) MenuDataHeader_UsableKeyItem: ; 0x10249 @@ -689,7 +689,7 @@ BattlePack: ; 10493 ld a, [wJumptableIndex] ld hl, .Jumptable call Pack_GetJumptablePointer - jp [hl] + jp hl ; 104c3 @@ -846,7 +846,7 @@ TMHMSubmenu: ; 105dc (4:45dc) ld a, [wMenuCursorY] dec a call Pack_GetJumptablePointer - jp [hl] + jp hl ; 10601 (4:4601) .UsableMenuDataHeader: ; 0x10601 @@ -997,7 +997,7 @@ DepositSellPack: ; 106be ld a, [wJumptableIndex] ld hl, .Jumptable call Pack_GetJumptablePointer - jp [hl] + jp hl ; 106d1 @@ -1144,7 +1144,7 @@ TutorialPack: ; 107bb ld a, [wJumptableIndex] ld hl, .dw call Pack_GetJumptablePointer - jp [hl] + jp hl ; 107e1 diff --git a/engine/phone.asm b/engine/phone.asm index 9d1376a62..f5f39218d 100644 --- a/engine/phone.asm +++ b/engine/phone.asm @@ -471,7 +471,7 @@ UnknownScript_0x90261: ; 0x90261 RingTwice_StartCall: ; 9026f call .Ring call .Ring - callba MobileFn_1060d3 + callba TrainerRankings_PhoneCalls ret ; 9027c @@ -500,7 +500,7 @@ PhoneCall:: ; 9029a ld [PhoneCallerHi], a call Phone_FirstOfTwoRings call Phone_FirstOfTwoRings - callba MobileFn_1060d3 + callba TrainerRankings_PhoneCalls ret ; 902b3 diff --git a/engine/player_step.asm b/engine/player_step.asm index 24e4fb873..83158c1b7 100755 --- a/engine/player_step.asm +++ b/engine/player_step.asm @@ -77,7 +77,7 @@ HandlePlayerStep: ; d4e5 (3:54e5) ret .mobile ; d509 (3:5509) - callba MobileFn_10602e + callba TrainerRankings_StepCount ret .fail2 ; d510 (3:5510) diff --git a/engine/pokedex.asm b/engine/pokedex.asm index e61a24964..569bdbb0b 100644 --- a/engine/pokedex.asm +++ b/engine/pokedex.asm @@ -182,7 +182,7 @@ Pokedex_RunJumptable: ; 4010b ld a, [wJumptableIndex] ld hl, .Jumptable call Pokedex_LoadPointer - jp [hl] + jp hl .Jumptable: ; 40115 (10:4115) @@ -366,7 +366,7 @@ Pokedex_UpdateDexEntryScreen: ; 40258 (10:4258) ld a, [wDexArrowCursorPosIndex] ld hl, DexEntryScreen_MenuActionJumptable call Pokedex_LoadPointer - jp [hl] + jp hl .return_to_prev_screen ld a, [LastVolume] @@ -545,7 +545,7 @@ Pokedex_UpdateOptionScreen: ; 403be (10:43be) ld a, [wDexArrowCursorPosIndex] ld hl, .MenuActionJumptable call Pokedex_LoadPointer - jp [hl] + jp hl .return_to_main_screen call Pokedex_BlackOutBG @@ -647,7 +647,7 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471) ld a, [wDexArrowCursorPosIndex] ld hl, .MenuActionJumptable call Pokedex_LoadPointer - jp [hl] + jp hl .cancel call Pokedex_BlackOutBG @@ -1621,7 +1621,7 @@ Pokedex_OrderMonsByMode: ; 40bdc ld a, [wCurrentDexMode] ld hl, .Jumptable call Pokedex_LoadPointer - jp [hl] + jp hl .Jumptable: ; 40bf0 (10:4bf0) diff --git a/engine/pokegear.asm b/engine/pokegear.asm index d180ee875..8e5697f75 100755 --- a/engine/pokegear.asm +++ b/engine/pokegear.asm @@ -235,7 +235,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8) ld l, a ld de, .return_from_jumptable push de - jp [hl] + jp hl .return_from_jumptable call Pokegear_FinishTilemap @@ -431,7 +431,7 @@ PokegearJumptable: ; 90f04 (24:4f04) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .Jumptable: ; 90f13 (24:4f13) dw PokegearClock_Init @@ -1217,7 +1217,7 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .Cancel: ; 913f1 ld hl, PokegearText_WhomToCall @@ -1484,7 +1484,7 @@ UpdateRadioStation: ; 9166f (24:566f) ld l, a ld de, .returnafterstation push de - jp [hl] + jp hl .returnafterstation ld a, [wPokegearRadioChannelBank] @@ -2043,7 +2043,7 @@ PlayRadio: ; 91a53 ld l, a ld de, .jump_return push de - jp [hl] + jp hl .jump_return push de @@ -2987,7 +2987,7 @@ INCBIN "gfx/misc/kanto.bin" PokedexNestIconGFX: ; 922d1 INCBIN "gfx/pokegear/dexmap_nest_icon.2bpp" FlyMapLabelBorderGFX: ; 922e1 -INCBIN "gfx/pokegear/flymap_label_border.2bpp" +INCBIN "gfx/pokegear/flymap_label_border.1bpp" ; XXX xor a diff --git a/engine/printer/serial.asm b/engine/printer/serial.asm index da1c334ed..37ed2990b 100755 --- a/engine/printer/serial.asm +++ b/engine/printer/serial.asm @@ -26,7 +26,7 @@ PrinterJumptableIteration: ; 84022 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 84031 @@ -468,7 +468,7 @@ _PrinterReceive:: ; 842db ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 842ea diff --git a/engine/radio.asm b/engine/radio.asm index ce3bc7942..99408af48 100644 --- a/engine/radio.asm +++ b/engine/radio.asm @@ -25,7 +25,7 @@ PlayRadioShow: ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl RadioJumptable: dw OaksPkmnTalk1 ; $00 diff --git a/engine/scripting.asm b/engine/scripting.asm index 745948a6f..e9899ef0f 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -1,15 +1,14 @@ ; Event scripting commands. -EnableScriptMode:: ; 96c56 +EnableScriptMode:: push af ld a, SCRIPT_READ ld [ScriptMode], a pop af ret -; 96c5e -ScriptEvents:: ; 96c5e +ScriptEvents:: call StartScript .loop ld a, [ScriptMode] @@ -18,20 +17,18 @@ ScriptEvents:: ; 96c5e call CheckScript jr nz, .loop ret -; 96c6e -.modes ; 96c6e +.modes dw EndScript dw RunScriptCommand dw WaitScriptMovement dw WaitScript -EndScript: ; 96c76 +EndScript: call StopScript ret -; 96c7a -WaitScript: ; 96c7a +WaitScript: call StopScript ld hl, ScriptDelay @@ -44,9 +41,8 @@ WaitScript: ; 96c7a ld [ScriptMode], a call StartScript ret -; 96c91 -WaitScriptMovement: ; 96c91 +WaitScriptMovement: call StopScript ld hl, VramState @@ -59,17 +55,15 @@ WaitScriptMovement: ; 96c91 ld [ScriptMode], a call StartScript ret -; 96ca9 -RunScriptCommand: ; 96ca9 +RunScriptCommand: call GetScriptByte ld hl, ScriptCommandTable rst JumpTable ret -; 96cb1 -ScriptCommandTable: ; 96cb1 +ScriptCommandTable: dw Script_scall ; 00 dw Script_farscall ; 01 dw Script_ptcall ; 02 @@ -242,27 +236,23 @@ ENDC dw Script_name ; a7 dw Script_wait ; a8 dw Script_check_save ; a9 -; 96e05 -StartScript: ; 96e05 +StartScript: ld hl, ScriptFlags set SCRIPT_RUNNING, [hl] ret -; 96e0b -CheckScript: ; 96e0b +CheckScript: ld hl, ScriptFlags bit SCRIPT_RUNNING, [hl] ret -; 96e11 -StopScript: ; 96e11 +StopScript: ld hl, ScriptFlags res SCRIPT_RUNNING, [hl] ret -; 96e17 -Script_callasm: ; 96e17 +Script_callasm: ; script command 0xe ; parameters: ; asm (AsmPointerParam) @@ -276,9 +266,8 @@ Script_callasm: ; 96e17 ld a, b rst FarCall ret -; 96e26 -Script_special: ; 96e26 +Script_special: ; script command 0xf ; parameters: ; predefined_script (MultiByteParam) @@ -289,9 +278,8 @@ Script_special: ; 96e26 ld d, a callba Special ret -; 96e35 -Script_ptcallasm: ; 96e35 +Script_ptcallasm: ; script command 0x10 ; parameters: ; asm (PointerToAsmPointerParam) @@ -308,9 +296,8 @@ Script_ptcallasm: ; 96e35 ld a, b rst FarCall ret -; 96e45 -Script_jumptextfaceplayer: ; 96e45 +Script_jumptextfaceplayer: ; script command 0x51 ; parameters: ; text_pointer (RawTextPointerLabelParam) @@ -324,9 +311,8 @@ Script_jumptextfaceplayer: ; 96e45 ld b, BANK(JumpTextFacePlayerScript) ld hl, JumpTextFacePlayerScript jp ScriptJump -; 96e5f -Script_jumptext: ; 96e5f +Script_jumptext: ; script command 0x53 ; parameters: ; text_pointer (RawTextPointerLabelParam) @@ -340,22 +326,20 @@ Script_jumptext: ; 96e5f ld b, BANK(JumpTextScript) ld hl, JumpTextScript jp ScriptJump -; 96e79 -JumpTextFacePlayerScript: ; 96e79 +JumpTextFacePlayerScript: faceplayer -JumpTextScript: ; 96e7a +JumpTextScript: opentext repeattext -1, -1 waitbutton closetext end -; 96e81 IF _CRYSTAL -Script_farjumptext: ; 96e81 +Script_farjumptext: ; script command 0x52 ; parameters: ; text_pointer (PointerLabelBeforeBank) @@ -369,12 +353,11 @@ Script_farjumptext: ; 96e81 ld b, BANK(JumpTextScript) ld hl, JumpTextScript jp ScriptJump -; 96e9b ENDC -Script_writetext: ; 96e9b +Script_writetext: ; script command 0x4c ; parameters: ; text_pointer (RawTextPointerLabelParam) @@ -387,9 +370,8 @@ Script_writetext: ; 96e9b ld b, a call MapTextbox ret -; 96eab -Script_farwritetext: ; 96eab +Script_farwritetext: ; script command 0x4b ; parameters: ; text_pointer (PointerLabelBeforeBank) @@ -402,9 +384,8 @@ Script_farwritetext: ; 96eab ld h, a call MapTextbox ret -; 96ebb -Script_repeattext: ; 96ebb +Script_repeattext: ; script command 0x4d ; parameters: ; byte (SingleByteParam) @@ -430,15 +411,13 @@ Script_repeattext: ; 96ebb .done ret -; 96ed9 -Script_waitbutton: ; 96ed9 +Script_waitbutton: ; script command 0x54 jp WaitButton -; 96edc -Script_buttonsound: ; 96edc +Script_buttonsound: ; script command 0x55 ld a, [hOAMUpdate] @@ -450,9 +429,8 @@ Script_buttonsound: ; 96edc pop af ld [hOAMUpdate], a ret -; 96eed -Script_yesorno: ; 96eed +Script_yesorno: ; script command 0x4e call YesNoBox @@ -462,9 +440,8 @@ Script_yesorno: ; 96eed .no ld [ScriptVar], a ret -; 96efa -Script_loadmenudata: ; 96efa +Script_loadmenudata: ; script command 0x4f ; parameters: ; data (MenuDataPointerParam) @@ -478,17 +455,15 @@ Script_loadmenudata: ; 96efa call Call_a_de call UpdateSprites ret -; 96f0f -Script_closewindow: ; 96f0f +Script_closewindow: ; script command 0x50 call CloseWindow call UpdateSprites ret -; 96f16 -Script_pokepic: ; 96f16 +Script_pokepic: ; script command 0x56 ; parameters: ; pokemon (PokemonParam) @@ -501,16 +476,14 @@ Script_pokepic: ; 96f16 ld [CurPartySpecies], a callba Pokepic ret -; 96f29 -Script_closepokepic: ; 96f29 +Script_closepokepic: ; script command 0x57 callba ClosePokepic ret -; 96f30 -Script_verticalmenu: ; 96f30 +Script_verticalmenu: ; script command 0x59 ld a, [ScriptBank] @@ -522,9 +495,8 @@ Script_verticalmenu: ; 96f30 .ok ld [ScriptVar], a ret -; 96f41 -Script__2dmenu: ; 96f41 +Script__2dmenu: ; script command 0x58 ld a, [ScriptBank] @@ -536,9 +508,8 @@ Script__2dmenu: ; 96f41 .ok ld [ScriptVar], a ret -; 96f52 -Script_battletowertext: ; 96f52 +Script_battletowertext: ; script command 0xa4 ; parameters: ; pointer (PointerLabelBeforeBank) @@ -549,9 +520,8 @@ Script_battletowertext: ; 96f52 ld c, a callba BattleTowerText ret -; 96f60 -Script_verbosegiveitem: ; 96f60 +Script_verbosegiveitem: ; script command 0x9e ; parameters: ; item (ItemLabelByte) @@ -565,14 +535,12 @@ Script_verbosegiveitem: ; 96f60 ld b, BANK(GiveItemScript) ld de, GiveItemScript jp ScriptCall -; 96f76 -ret_96f76: ; 96f76 +ret_96f76: ret -; 96f77 -GiveItemScript: ; 96f77 +GiveItemScript: callasm ret_96f76 writetext ReceivedItemText iffalse .Full @@ -586,15 +554,13 @@ GiveItemScript: ; 96f77 buttonsound pocketisfull end -; 96f89 -ReceivedItemText: ; 96f89 +ReceivedItemText: text_jump UnknownText_0x1c4719 db "@" -; 96f8e -Script_verbosegiveitem2: ; 96f8e +Script_verbosegiveitem2: ; script command 0x9f ; parameters: ; item (ItemLabelByte) @@ -624,9 +590,8 @@ Script_verbosegiveitem2: ; 96f8e ld b, BANK(GiveItemScript) ld de, GiveItemScript jp ScriptCall -; 96fc6 -Script_itemnotify: ; 96fc6 +Script_itemnotify: ; script command 0x45 call GetPocketName @@ -635,9 +600,8 @@ Script_itemnotify: ; 96fc6 ld hl, PutItemInPocketText call MapTextbox ret -; 96fd5 -Script_pocketisfull: ; 96fd5 +Script_pocketisfull: ; script command 0x46 call GetPocketName @@ -646,9 +610,8 @@ Script_pocketisfull: ; 96fd5 ld hl, PocketIsFullText call MapTextbox ret -; 96fe4 -Script_specialsound: ; 96fe4 +Script_specialsound: ; script command 0x88 callba CheckItemPocket @@ -661,10 +624,9 @@ Script_specialsound: ; 96fe4 call PlaySFX call WaitSFX ret -; 96ffe -GetPocketName: ; 96ffe +GetPocketName: callba CheckItemPocket ld a, [wItemAttributeParamBuffer] dec a @@ -695,28 +657,24 @@ GetPocketName: ; 96ffe db "BALL POCKET@" .TM: db "TM POCKET@" -; 97051 -CurItemName: ; 97051 +CurItemName: ld a, [CurItem] ld [wd265], a call GetItemName ret -; 9705b -PutItemInPocketText: ; 9705b +PutItemInPocketText: text_jump UnknownText_0x1c472c db "@" -; 97060 -PocketIsFullText: ; 97060 +PocketIsFullText: text_jump UnknownText_0x1c474b db "@" -; 97065 -Script_pokemart: ; 97065 +Script_pokemart: ; script command 0x94 ; parameters: ; dialog_id (SingleByteParam) @@ -732,9 +690,8 @@ Script_pokemart: ; 97065 ld b, a callba OpenMartDialog ret -; 9707c -Script_elevator: ; 9707c +Script_elevator: ; script command 0x95 ; parameters: ; floor_list_pointer (PointerLabelParam) @@ -752,9 +709,8 @@ Script_elevator: ; 9707c ld a, TRUE ld [ScriptVar], a ret -; 97099 -Script_trade: ; 97099 +Script_trade: ; script command 0x96 ; parameters: ; trade_id (SingleByteParam) @@ -763,9 +719,8 @@ Script_trade: ; 97099 ld e, a callba NPCTrade ret -; 970a4 -Script_phonecall: ; 970a4 +Script_phonecall: ; script command 0x98 ; parameters: ; caller_name (RawTextPointerLabelParam) @@ -778,16 +733,14 @@ Script_phonecall: ; 970a4 ld b, a callba PhoneCall ret -; 970b7 -Script_hangup: ; 970b7 +Script_hangup: ; script command 0x99 callba HangUp ret -; 970be -Script_askforphonenumber: ; 970be +Script_askforphonenumber: ; script command 0x97 ; parameters: ; number (SingleByteParam) @@ -809,9 +762,8 @@ Script_askforphonenumber: ; 970be .done ld [ScriptVar], a ret -; 970df -Script_describedecoration: ; 970df +Script_describedecoration: ; script command 0x9a ; parameters: ; byte (SingleByteParam) @@ -822,9 +774,8 @@ Script_describedecoration: ; 970df ld h, d ld l, e jp ScriptJump -; 970ee -Script_fruittree: ; 970ee +Script_fruittree: ; script command 0x9b ; parameters: ; tree_id (SingleByteParam) @@ -834,9 +785,8 @@ Script_fruittree: ; 970ee ld b, BANK(FruitTreeScript) ld hl, FruitTreeScript jp ScriptJump -; 970fc -Script_swarm: ; 970fc +Script_swarm: ; script command 0xa0 ; parameters: ; flag (SingleByteParam) @@ -851,9 +801,8 @@ Script_swarm: ; 970fc ld e, a callba StoreSwarmMapIndices ret -; 9710f -Script_trainertext: ; 9710f +Script_trainertext: ; script command 0x62 ; parameters: ; which_text (SingleByteParam) @@ -871,9 +820,8 @@ Script_trainertext: ; 9710f ld b, a call MapTextbox ret -; 97125 -Script_scripttalkafter: ; 97125 +Script_scripttalkafter: ; script command 0x65 ld hl, wScriptAfterPointer @@ -883,9 +831,8 @@ Script_scripttalkafter: ; 97125 ld a, [EngineBuffer1] ld b, a jp ScriptJump -; 97132 -Script_trainerflagaction: ; 97132 +Script_trainerflagaction: ; script command 0x63 ; parameters: ; action (SingleByteParam) @@ -905,37 +852,34 @@ Script_trainerflagaction: ; 97132 ld a, TRUE ld [ScriptVar], a ret -; 9714c -Script_winlosstext: ; 9714c +Script_winlosstext: ; script command 0x64 ; parameters: ; win_text_pointer (TextPointerLabelParam) ; loss_text_pointer (TextPointerLabelParam) - ld hl, wWinTextPointer ; d047 + ld hl, wWinTextPointer call GetScriptByte ld [hli], a call GetScriptByte ld [hli], a - ld hl, wLossTextPointer ; d049; this is unnecessary + ld hl, wLossTextPointer call GetScriptByte ld [hli], a call GetScriptByte ld [hli], a ret -; 97163 -Script_end_if_just_battled: ; 97163 +Script_end_if_just_battled: ; script command 0x66 ld a, [wRunningTrainerBattleScript] and a ret z jp Script_end -; 9716b -Script_check_just_battled: ; 9716b +Script_check_just_battled: ; script command 0x67 ld a, TRUE @@ -946,25 +890,22 @@ Script_check_just_battled: ; 9716b xor a ld [ScriptVar], a ret -; 9717a -Script_encountermusic: ; 9717a +Script_encountermusic: ; script command 0x80 ld a, [OtherTrainerClass] ld e, a callba PlayTrainerEncounterMusic ret -; 97185 -Script_playmapmusic: ; 97185 +Script_playmapmusic: ; script command 0x82 call PlayMapMusic ret -; 97189 -Script_playmusic: ; 97189 +Script_playmusic: ; script command 0x7f ; parameters: ; music_pointer (MultiByteParam) @@ -980,9 +921,8 @@ Script_playmusic: ; 97189 ld d, a call PlayMusic ret -; 971a2 -Script_musicfadeout: ; 971a2 +Script_musicfadeout: ; script command 0x81 ; parameters: ; music (MultiByteParam) @@ -996,9 +936,8 @@ Script_musicfadeout: ; 971a2 and $7f ld [MusicFade], a ret -; 971b7 -Script_playsound: ; 971b7 +Script_playsound: ; script command 0x85 ; parameters: ; sound_pointer (MultiByteParam) @@ -1009,24 +948,21 @@ Script_playsound: ; 971b7 ld d, a call PlaySFX ret -; 971c3 -Script_waitsfx: ; 971c3 +Script_waitsfx: ; script command 0x86 call WaitSFX ret -; 971c7 -Script_warpsound: ; 971c7 +Script_warpsound: ; script command 0x87 callba Function14a07 call PlaySFX ret -; 971d1 -Script_cry: ; 971d1 +Script_cry: ; script command 0x84 ; parameters: ; cry_id (MultiByteParam) @@ -1041,18 +977,16 @@ Script_cry: ; 971d1 .ok call PlayCry ret -; 971e3 -GetScriptPerson: ; 971e3 +GetScriptPerson: and a ret z cp LAST_TALKED ret z dec a ret -; 971ea -Script_setlasttalked: ; 971ea +Script_setlasttalked: ; script command 0x68 ; parameters: ; person (SingleByteParam) @@ -1061,9 +995,8 @@ Script_setlasttalked: ; 971ea call GetScriptPerson ld [hLastTalked], a ret -; 971f3 -Script_applymovement: ; 971f3 +Script_applymovement: ; script command 0x69 ; parameters: ; person (SingleByteParam) @@ -1072,9 +1005,8 @@ Script_applymovement: ; 971f3 call GetScriptByte call GetScriptPerson ld c, a -; 971fa -ApplyMovement: ; 971fa +ApplyMovement: push bc ld a, c callba SetFlagsForMovement_1 @@ -1097,14 +1029,12 @@ ApplyMovement: ; 971fa ld [ScriptMode], a call StopScript ret -; 97221 -SetFlagsForMovement_2: ; 97221 +SetFlagsForMovement_2: callba _SetFlagsForMovement_2 ret -; 97228 -Script_applymovement2: ; 97228 +Script_applymovement2: ; apply movement to last talked ; script command 0x6a ; parameters: @@ -1113,9 +1043,8 @@ Script_applymovement2: ; 97228 ld a, [hLastTalked] ld c, a jp ApplyMovement -; 9722e -Script_faceplayer: ; 9722e +Script_faceplayer: ; script command 0x6b ld a, [hLastTalked] @@ -1133,9 +1062,8 @@ Script_faceplayer: ; 9722e ld d, a call ApplyPersonFacing ret -; 97248 -Script_faceperson: ; 97248 +Script_faceperson: ; script command 0x6c ; parameters: ; person1 (SingleByteParam) @@ -1166,9 +1094,8 @@ Script_faceperson: ; 97248 ld d, c call ApplyPersonFacing ret -; 97274 -Script_spriteface: ; 97274 +Script_spriteface: ; script command 0x76 ; parameters: ; person (SingleByteParam) @@ -1187,9 +1114,8 @@ Script_spriteface: ; 97274 ld e, a call ApplyPersonFacing ret -; 9728b -ApplyPersonFacing: ; 9728b +ApplyPersonFacing: ld a, d push de call CheckObjectVisibility @@ -1220,9 +1146,8 @@ ApplyPersonFacing: ; 9728b pop de scf ret -; 972bc -.DisableTextTiles: ; 972bc +.DisableTextTiles: call LoadMapPart hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT @@ -1234,9 +1159,8 @@ ApplyPersonFacing: ; 9728b or c jr nz, .loop ret -; 972ce -Script_variablesprite: ; 972ce +Script_variablesprite: ; script command 0x6d ; parameters: ; byte (SingleByteParam) @@ -1250,9 +1174,8 @@ Script_variablesprite: ; 972ce call GetScriptByte ld [hl], a ret -; 972dd -Script_appear: ; 972dd +Script_appear: ; script command 0x6f ; parameters: ; person (SingleByteParam) @@ -1264,9 +1187,8 @@ Script_appear: ; 972dd ld b, 0 ; clear call ApplyEventActionAppearDisappear ret -; 972ee -Script_disappear: ; 972ee +Script_disappear: ; script command 0x6e ; parameters: ; person (SingleByteParam) @@ -1283,9 +1205,8 @@ Script_disappear: ; 972ee call ApplyEventActionAppearDisappear callba _UpdateSprites ret -; 9730b -ApplyEventActionAppearDisappear: ; 9730b +ApplyEventActionAppearDisappear: push bc call GetMapObject ld hl, MAPOBJECT_EVENT_FLAG @@ -1304,9 +1225,8 @@ ApplyEventActionAppearDisappear: ; 9730b .okay call EventFlagAction ret -; 97325 -Script_follow: ; 97325 +Script_follow: ; script command 0x70 ; parameters: ; person2 (SingleByteParam) @@ -1320,16 +1240,14 @@ Script_follow: ; 97325 ld c, a callba StartFollow ret -; 9733a -Script_stopfollow: ; 9733a +Script_stopfollow: ; script command 0x71 callba StopFollow ret -; 97341 -Script_moveperson: ; 97341 +Script_moveperson: ; script command 0x72 ; parameters: ; person (SingleByteParam) @@ -1347,9 +1265,8 @@ Script_moveperson: ; 97341 ld e, a callba CopyDECoordsToMapObject ret -; 9735b -Script_writepersonxy: ; 9735b +Script_writepersonxy: ; script command 0x73 ; parameters: ; person (SingleByteParam) @@ -1363,9 +1280,8 @@ Script_writepersonxy: ; 9735b ld b, a callba WritePersonXY ret -; 9736f -Script_follownotexact: ; 9736f +Script_follownotexact: ; script command 0x77 ; parameters: ; person2 (SingleByteParam) @@ -1379,9 +1295,8 @@ Script_follownotexact: ; 9736f ld c, a callba FollowNotExact ret -; 97384 -Script_loademote: ; 97384 +Script_loademote: ; script command 0x74 ; parameters: ; bubble (SingleByteParam) @@ -1394,9 +1309,8 @@ Script_loademote: ; 97384 ld c, a callba LoadEmote ret -; 97396 -Script_showemote: ; 97396 +Script_showemote: ; script command 0x75 ; parameters: ; bubble (SingleByteParam) @@ -1416,9 +1330,8 @@ Script_showemote: ; 97396 ld b, BANK(ShowEmoteScript) ld de, ShowEmoteScript jp ScriptCall -; 973b6 -ShowEmoteScript: ; 973b6 +ShowEmoteScript: loademote EMOTE_MEM applymovement2 .Show pause 0 @@ -1434,10 +1347,9 @@ ShowEmoteScript: ; 973b6 hide_emote step_sleep 1 step_end -; 973c7 -Script_earthquake: ; 973c7 +Script_earthquake: ; script command 0x78 ; parameters: ; param (DecimalParam) @@ -1453,22 +1365,19 @@ Script_earthquake: ; 973c7 ld b, BANK(.script) ld de, .script jp ScriptCall -; 973e6 -.script ; 973e6 +.script applymovement PLAYER, wd002 end -; 973eb -EarthquakeMovement: ; 973eb +EarthquakeMovement: step_shake 16 ; the 16 gets overwritten with the script byte step_sleep 16 ; the 16 gets overwritten with the lower 6 bits of the script byte step_end EarthquakeMovementEnd -; 973f0 -Script_loadpikachudata: ; 973f0 +Script_loadpikachudata: ; script command 0x5a ld a, PIKACHU @@ -1476,17 +1385,15 @@ Script_loadpikachudata: ; 973f0 ld a, 5 ld [CurPartyLevel], a ret -; 973fb -Script_randomwildmon: ; 973fb +Script_randomwildmon: ; script command 0x5b xor a ld [wBattleScriptFlags], a ret -; 97400 -Script_loadmemtrainer: ; 97400 +Script_loadmemtrainer: ; script command 0x5c ld a, (1 << 7) | 1 @@ -1496,9 +1403,8 @@ Script_loadmemtrainer: ; 97400 ld a, [wTempTrainerID] ld [OtherTrainerID], a ret -; 97412 -Script_loadwildmon: ; 97412 +Script_loadwildmon: ; script command 0x5d ; parameters: ; pokemon (PokemonParam) @@ -1511,9 +1417,8 @@ Script_loadwildmon: ; 97412 call GetScriptByte ld [CurPartyLevel], a ret -; 97424 -Script_loadtrainer: ; 97424 +Script_loadtrainer: ; script command 0x5e ; parameters: ; trainer_group (TrainerGroupParam) @@ -1526,9 +1431,8 @@ Script_loadtrainer: ; 97424 call GetScriptByte ld [OtherTrainerID], a ret -; 97436 -Script_startbattle: ; 97436 +Script_startbattle: ; script command 0x5f call BufferScreen @@ -1537,9 +1441,8 @@ Script_startbattle: ; 97436 and $3f ld [ScriptVar], a ret -; 97447 -Script_catchtutorial: ; 97447 +Script_catchtutorial: ; script command 0x61 ; parameters: ; byte (SingleByteParam) @@ -1549,9 +1452,8 @@ Script_catchtutorial: ; 97447 call BufferScreen callba CatchTutorial jp Script_reloadmap -; 97459 -Script_reloadmapafterbattle: ; 97459 +Script_reloadmapafterbattle: ; script command 0x60 ld hl, wBattleScriptFlags @@ -1580,9 +1482,8 @@ Script_reloadmapafterbattle: ; 97459 callba LoadScriptBDE .done jp Script_reloadmap -; 97491 -Script_reloadmap: ; 97491 +Script_reloadmap: ; script command 0x7b xor a @@ -1593,9 +1494,8 @@ Script_reloadmap: ; 97491 call LoadMapStatus call StopScript ret -; 974a2 -Script_scall: ; 974a2 +Script_scall: ; script command 0x0 ; parameters: ; pointer (ScriptPointerLabelParam) @@ -1607,9 +1507,8 @@ Script_scall: ; 974a2 call GetScriptByte ld d, a jr ScriptCall -; 974b0 -Script_farscall: ; 974b0 +Script_farscall: ; script command 0x1 ; parameters: ; pointer (ScriptPointerLabelBeforeBank) @@ -1621,9 +1520,8 @@ Script_farscall: ; 974b0 call GetScriptByte ld d, a jr ScriptCall -; 974be -Script_ptcall: ; 974be +Script_ptcall: ; script command 0x2 ; parameters: ; pointer (PointerLabelToScriptPointer) @@ -1639,7 +1537,7 @@ Script_ptcall: ; 974be ld d, [hl] ; fallthrough -ScriptCall: ; 974cb +ScriptCall: ; Bug: The script stack has a capacity of 5 scripts, yet there is ; nothing to stop you from pushing a sixth script. The high part ; of the script address can then be overwritten by modifications @@ -1669,16 +1567,14 @@ ScriptCall: ; 974cb ld a, d ld [ScriptPos + 1], a ret -; 974f3 -CallCallback:: ; 974f3 +CallCallback:: ld a, [ScriptBank] or $80 ld [ScriptBank], a jp ScriptCall -; 974fe -Script_jump: ; 974fe +Script_jump: ; script command 0x3 ; parameters: ; pointer (ScriptPointerLabelParam) @@ -1690,9 +1586,8 @@ Script_jump: ; 974fe ld a, [ScriptBank] ld b, a jp ScriptJump -; 9750d -Script_farjump: ; 9750d +Script_farjump: ; script command 0x4 ; parameters: ; pointer (ScriptPointerLabelBeforeBank) @@ -1704,9 +1599,8 @@ Script_farjump: ; 9750d call GetScriptByte ld h, a jp ScriptJump -; 9751c -Script_ptjump: ; 9751c +Script_ptjump: ; script command 0x5 ; parameters: ; pointer (PointerLabelToScriptPointer) @@ -1721,9 +1615,8 @@ Script_ptjump: ; 9751c ld h, [hl] ld l, a jp ScriptJump -; 9752c -Script_iffalse: ; 9752c +Script_iffalse: ; script command 0x8 ; parameters: ; pointer (ScriptPointerLabelParam) @@ -1732,9 +1625,8 @@ Script_iffalse: ; 9752c and a jp nz, SkipTwoScriptBytes jp Script_jump -; 97536 -Script_iftrue: ; 97536 +Script_iftrue: ; script command 0x9 ; parameters: ; pointer (ScriptPointerLabelParam) @@ -1743,9 +1635,8 @@ Script_iftrue: ; 97536 and a jp nz, Script_jump jp SkipTwoScriptBytes -; 97540 -Script_if_equal: ; 97540 +Script_if_equal: ; script command 0x6 ; parameters: ; byte (SingleByteParam) @@ -1756,9 +1647,8 @@ Script_if_equal: ; 97540 cp [hl] jr z, Script_jump jr SkipTwoScriptBytes -; 9754b -Script_if_not_equal: ; 9754b +Script_if_not_equal: ; script command 0x7 ; parameters: ; byte (SingleByteParam) @@ -1769,9 +1659,8 @@ Script_if_not_equal: ; 9754b cp [hl] jr nz, Script_jump jr SkipTwoScriptBytes -; 97556 -Script_if_greater_than: ; 97556 +Script_if_greater_than: ; script command 0xa ; parameters: ; byte (SingleByteParam) @@ -1783,9 +1672,8 @@ Script_if_greater_than: ; 97556 cp b jr c, Script_jump jr SkipTwoScriptBytes -; 97562 -Script_if_less_than: ; 97562 +Script_if_less_than: ; script command 0xb ; parameters: ; byte (SingleByteParam) @@ -1797,18 +1685,16 @@ Script_if_less_than: ; 97562 cp b jr c, Script_jump jr SkipTwoScriptBytes -; 9756e -Script_jumpstd: ; 9756e +Script_jumpstd: ; script command 0xc ; parameters: ; predefined_script (MultiByteParam) call StdScript jr ScriptJump -; 97573 -Script_callstd: ; 97573 +Script_callstd: ; script command 0xd ; parameters: ; predefined_script (MultiByteParam) @@ -1817,9 +1703,8 @@ Script_callstd: ; 97573 ld d, h ld e, l jp ScriptCall -; 9757b -StdScript: ; 9757b +StdScript: call GetScriptByte ld e, a call GetScriptByte @@ -1835,15 +1720,13 @@ StdScript: ; 9757b ld a, BANK(StdScripts) call GetFarHalfword ret -; 97596 -SkipTwoScriptBytes: ; 97596 +SkipTwoScriptBytes: call GetScriptByte call GetScriptByte ret -; 9759d -ScriptJump: ; 9759d +ScriptJump: ld a, b ld [ScriptBank], a ld a, l @@ -1851,9 +1734,8 @@ ScriptJump: ; 9759d ld a, h ld [ScriptPos + 1], a ret -; 975aa -Script_priorityjump: ; 975aa +Script_priorityjump: ; script command 0x8d ; parameters: ; pointer (ScriptPointerLabelParam) @@ -1867,9 +1749,8 @@ Script_priorityjump: ; 975aa ld hl, ScriptFlags set 3, [hl] ret -; 975c2 -Script_checktriggers: ; 975c2 +Script_checktriggers: ; script command 0x13 call CheckTriggers @@ -1881,9 +1762,8 @@ Script_checktriggers: ; 975c2 ld a, $ff ld [ScriptVar], a ret -; 975d1 -Script_checkmaptriggers: ; 975d1 +Script_checkmaptriggers: ; script command 0x11 ; parameters: ; map_group (SingleByteParam) @@ -1905,9 +1785,8 @@ Script_checkmaptriggers: ; 975d1 ld a, $ff ld [ScriptVar], a ret -; 975eb -Script_dotrigger: ; 975eb +Script_dotrigger: ; script command 0x14 ; parameters: ; trigger_id (SingleByteParam) @@ -1917,9 +1796,8 @@ Script_dotrigger: ; 975eb ld a, [MapNumber] ld c, a jr DoTrigger -; 975f5 -Script_domaptrigger: ; 975f5 +Script_domaptrigger: ; script command 0x12 ; parameters: ; map_group (MapGroupParam) @@ -1930,7 +1808,7 @@ Script_domaptrigger: ; 975f5 ld b, a call GetScriptByte ld c, a -DoTrigger: ; 975fd +DoTrigger: call GetMapTrigger ld a, d or e @@ -1939,9 +1817,8 @@ DoTrigger: ; 975fd ld [de], a .no_trigger ret -; 97609 -Script_copybytetovar: ; 97609 +Script_copybytetovar: ; script command 0x19 ; parameters: ; address (RAMAddressParam) @@ -1953,9 +1830,8 @@ Script_copybytetovar: ; 97609 ld a, [hl] ld [ScriptVar], a ret -; 97616 -Script_copyvartobyte: ; 97616 +Script_copyvartobyte: ; script command 0x1a ; parameters: ; address (RAMAddressParam) @@ -1967,9 +1843,8 @@ Script_copyvartobyte: ; 97616 ld a, [ScriptVar] ld [hl], a ret -; 97623 -Script_loadvar: ; 97623 +Script_loadvar: ; script command 0x1b ; parameters: ; address (RAMAddressParam) @@ -1982,9 +1857,8 @@ Script_loadvar: ; 97623 call GetScriptByte ld [hl], a ret -; 97630 -Script_writebyte: ; 97630 +Script_writebyte: ; script command 0x15 ; parameters: ; value (SingleByteParam) @@ -1992,9 +1866,8 @@ Script_writebyte: ; 97630 call GetScriptByte ld [ScriptVar], a ret -; 97637 -Script_addvar: ; 97637 +Script_addvar: ; script command 0x16 ; parameters: ; value (SingleByteParam) @@ -2004,9 +1877,8 @@ Script_addvar: ; 97637 add [hl] ld [hl], a ret -; 97640 -Script_random: ; 97640 +Script_random: ; script command 0x17 ; parameters: ; input (SingleByteParam) @@ -2047,9 +1919,8 @@ Script_random: ; 97640 call SimpleDivide ld [ScriptVar], a ret -; 97673 -.Divide256byC: ; 97673 +.Divide256byC: xor a ld b, a sub c @@ -2060,9 +1931,8 @@ Script_random: ; 97640 dec b add c ret -; 9767d -Script_checkcode: ; 9767d +Script_checkcode: ; script command 0x1c ; parameters: ; variable_id (SingleByteParam) @@ -2072,9 +1942,8 @@ Script_checkcode: ; 9767d ld a, [de] ld [ScriptVar], a ret -; 97688 -Script_writevarcode: ; 97688 +Script_writevarcode: ; script command 0x1d ; parameters: ; variable_id (SingleByteParam) @@ -2084,9 +1953,8 @@ Script_writevarcode: ; 97688 ld a, [ScriptVar] ld [de], a ret -; 97693 -Script_writecode: ; 97693 +Script_writecode: ; script command 0x1e ; parameters: ; variable_id (SingleByteParam) @@ -2097,27 +1965,23 @@ Script_writecode: ; 97693 call GetScriptByte ld [de], a ret -; 9769e -GetVarAction: ; 9769e +GetVarAction: ld c, a callba _GetVarAction ret -; 976a6 -Script_checkver: ; 976a6 +Script_checkver: ; script command 0x18 ld a, [Version] ld [ScriptVar], a ret -; 976ad -Version: ; 976ad +Version: db VERSION -; 976ae -Script_pokenamemem: ; 976ae +Script_pokenamemem: ; script command 0x40 ; parameters: ; pokemon (PokemonParam); leave $0 to draw from script var @@ -2132,22 +1996,21 @@ Script_pokenamemem: ; 976ae call GetPokemonName ld de, StringBuffer1 -ConvertMemToText: ; 976c0 +ConvertMemToText: call GetScriptByte cp 3 jr c, .ok xor a .ok -CopyConvertedText: ; 976c8 +CopyConvertedText: ld hl, StringBuffer3 ld bc, StringBuffer4 - StringBuffer3 call AddNTimes call CopyName2 ret -; 976d5 -Script_itemtotext: ; 976d5 +Script_itemtotext: ; script command 0x41 ; parameters: ; item (ItemLabelByte); use 0 to draw from ScriptVar @@ -2162,9 +2025,8 @@ Script_itemtotext: ; 976d5 call GetItemName ld de, StringBuffer1 jr ConvertMemToText -; 976e9 -Script_mapnametotext: ; 976e9 +Script_mapnametotext: ; script command 0x42 ; parameters: ; memory (SingleByteParam) @@ -2175,14 +2037,13 @@ Script_mapnametotext: ; 976e9 ld c, a call GetWorldMapLocation -ConvertLandmarkToText: ; 976f4 +ConvertLandmarkToText: ld e, a callba GetLandmarkName ld de, StringBuffer1 jp ConvertMemToText -; 97701 -Script_landmarktotext: ; 97701 +Script_landmarktotext: ; script command 0xa5 ; parameters: ; id (SingleByteParam) @@ -2190,9 +2051,8 @@ Script_landmarktotext: ; 97701 call GetScriptByte jr ConvertLandmarkToText -; 97706 -Script_trainertotext: ; 97706 +Script_trainertotext: ; script command 0x43 ; parameters: ; trainer_id (TrainerGroupParam) @@ -2205,9 +2065,8 @@ Script_trainertotext: ; 97706 ld b, a callba GetTrainerName jr ConvertMemToText -; 97716 -Script_name: ; 97716 +Script_name: ; script command 0xa7 ; parameters: ; type (SingleByteParam) @@ -2217,15 +2076,14 @@ Script_name: ; 97716 call GetScriptByte ld [wNamedObjectTypeBuffer], a -ContinueToGetName: ; 9771c +ContinueToGetName: call GetScriptByte ld [CurSpecies], a call GetName ld de, StringBuffer1 jp ConvertMemToText -; 9772b -Script_trainerclassname: ; 9772b +Script_trainerclassname: ; script command 0xa6 ; parameters: ; id (SingleByteParam) @@ -2234,9 +2092,8 @@ Script_trainerclassname: ; 9772b ld a, TRAINER_NAME ld [wNamedObjectTypeBuffer], a jr ContinueToGetName -; 97732 -Script_readmoney: ; 97732 +Script_readmoney: ; script command 0x3d ; parameters: ; account (SingleByteParam) @@ -2249,9 +2106,8 @@ Script_readmoney: ; 97732 call PrintNum ld de, StringBuffer1 jp ConvertMemToText -; 97747 -Script_readcoins: ; 97747 +Script_readcoins: ; script command 0x3e ; parameters: ; memory (SingleByteParam) @@ -2263,9 +2119,8 @@ Script_readcoins: ; 97747 call PrintNum ld de, StringBuffer1 jp ConvertMemToText -; 9775c -Script_RAM2MEM: ; 9775c +Script_RAM2MEM: ; script command 0x3f ; parameters: ; memory (SingleByteParam) @@ -2277,17 +2132,15 @@ Script_RAM2MEM: ; 9775c call PrintNum ld de, StringBuffer1 jp ConvertMemToText -; 97771 -ResetStringBuffer1: ; 97771 +ResetStringBuffer1: ld hl, StringBuffer1 ld bc, NAME_LENGTH ld a, "@" call ByteFill ret -; 9777d -Script_stringtotext: ; 9777d +Script_stringtotext: ; script command 0x44 ; parameters: ; text_pointer (EncodedTextLabelParam) @@ -2302,9 +2155,8 @@ Script_stringtotext: ; 9777d rst FarCall ld de, StringBuffer2 jp ConvertMemToText -; 97792 -Script_givepokeitem: ; 97792 +Script_givepokeitem: ; script command 0x2f ; parameters: ; pointer (PointerParamToItemAndLetter) @@ -2325,9 +2177,8 @@ Script_givepokeitem: ; 97792 pop bc callba GivePokeItem ret -; 977b7 -Script_checkpokeitem: ; 977b7 +Script_checkpokeitem: ; script command 0x30 ; parameters: ; pointer (PointerParamToItemAndLetter) @@ -2340,9 +2191,8 @@ Script_checkpokeitem: ; 977b7 ld b, a callba CheckPokeItem ret -; 977ca -Script_giveitem: ; 977ca +Script_giveitem: ; script command 0x1f ; parameters: ; item (ItemLabelByte) @@ -2366,9 +2216,8 @@ Script_giveitem: ; 977ca xor a ld [ScriptVar], a ret -; 977f0 -Script_takeitem: ; 977f0 +Script_takeitem: ; script command 0x20 ; parameters: ; item (ItemLabelByte) @@ -2388,9 +2237,8 @@ Script_takeitem: ; 977f0 ld a, TRUE ld [ScriptVar], a ret -; 97812 -Script_checkitem: ; 97812 +Script_checkitem: ; script command 0x21 ; parameters: ; item (ItemLabelByte) @@ -2405,9 +2253,8 @@ Script_checkitem: ; 97812 ld a, TRUE ld [ScriptVar], a ret -; 97829 -Script_givemoney: ; 97829 +Script_givemoney: ; script command 0x22 ; parameters: ; account (SingleByteParam) @@ -2417,9 +2264,8 @@ Script_givemoney: ; 97829 call LoadMoneyAmountToMem callba GiveMoney ret -; 97836 -Script_takemoney: ; 97836 +Script_takemoney: ; script command 0x23 ; parameters: ; account (SingleByteParam) @@ -2429,9 +2275,8 @@ Script_takemoney: ; 97836 call LoadMoneyAmountToMem callba TakeMoney ret -; 97843 -Script_checkmoney: ; 97843 +Script_checkmoney: ; script command 0x24 ; parameters: ; account (SingleByteParam) @@ -2440,9 +2285,8 @@ Script_checkmoney: ; 97843 call GetMoneyAccount call LoadMoneyAmountToMem callba CompareMoney -; 9784f -CompareMoneyAction: ; 9784f +CompareMoneyAction: jr c, .two jr z, .one ld a, 0 @@ -2455,18 +2299,16 @@ CompareMoneyAction: ; 9784f .done ld [ScriptVar], a ret -; 97861 -GetMoneyAccount: ; 97861 +GetMoneyAccount: call GetScriptByte and a ld de, Money ret z ld de, wMomsMoney ret -; 9786d -LoadMoneyAmountToMem: ; 9786d +LoadMoneyAmountToMem: ld bc, hMoneyTemp push bc call GetScriptByte @@ -2479,9 +2321,8 @@ LoadMoneyAmountToMem: ; 9786d ld [bc], a pop bc ret -; 97881 -Script_givecoins: ; 97881 +Script_givecoins: ; script command 0x25 ; parameters: ; coins (CoinByteParam) @@ -2489,9 +2330,8 @@ Script_givecoins: ; 97881 call LoadCoinAmountToMem callba GiveCoins ret -; 9788b -Script_takecoins: ; 9788b +Script_takecoins: ; script command 0x26 ; parameters: ; coins (CoinByteParam) @@ -2499,9 +2339,8 @@ Script_takecoins: ; 9788b call LoadCoinAmountToMem callba TakeCoins ret -; 97895 -Script_checkcoins: ; 97895 +Script_checkcoins: ; script command 0x27 ; parameters: ; coins (CoinByteParam) @@ -2509,18 +2348,16 @@ Script_checkcoins: ; 97895 call LoadCoinAmountToMem callba CheckCoins jr CompareMoneyAction -; 978a0 -LoadCoinAmountToMem: ; 978a0 +LoadCoinAmountToMem: call GetScriptByte ld [hMoneyTemp + 1], a call GetScriptByte ld [hMoneyTemp], a ld bc, hMoneyTemp ret -; 978ae -Script_checktime: ; 978ae +Script_checktime: ; script command 0x2b ; parameters: ; time (SingleByteParam) @@ -2534,9 +2371,8 @@ Script_checktime: ; 978ae ld a, TRUE ld [ScriptVar], a ret -; 978c3 -Script_checkpoke: ; 978c3 +Script_checkpoke: ; script command 0x2c ; parameters: ; pkmn (PokemonParam) @@ -2551,9 +2387,8 @@ Script_checkpoke: ; 978c3 ld a, TRUE ld [ScriptVar], a ret -; 978da -Script_addcellnum: ; 978da +Script_addcellnum: ; script command 0x28 ; parameters: ; person (SingleByteParam) @@ -2567,9 +2402,8 @@ Script_addcellnum: ; 978da ld a, TRUE ld [ScriptVar], a ret -; 978ef -Script_delcellnum: ; 978ef +Script_delcellnum: ; script command 0x29 ; parameters: ; person (SingleByteParam) @@ -2583,9 +2417,8 @@ Script_delcellnum: ; 978ef ld a, TRUE ld [ScriptVar], a ret -; 97904 -Script_checkcellnum: ; 97904 +Script_checkcellnum: ; script command 0x2a ; parameters: ; person (SingleByteParam) @@ -2600,9 +2433,8 @@ Script_checkcellnum: ; 97904 ld a, TRUE ld [ScriptVar], a ret -; 97919 -Script_specialphonecall: ; 97919 +Script_specialphonecall: ; script command 0x9c ; parameters: ; call_id (MultiByteParam) @@ -2612,9 +2444,8 @@ Script_specialphonecall: ; 97919 call GetScriptByte ld [wSpecialPhoneCallID + 1], a ret -; 97926 -Script_checkphonecall: ; 97926 +Script_checkphonecall: ; script command 0x9d ; returns false if no special phone call is stored @@ -2625,9 +2456,8 @@ Script_checkphonecall: ; 97926 .ok ld [ScriptVar], a ret -; 97932 -Script_givepoke: ; 97932 +Script_givepoke: ; script command 0x2d ; parameters: ; pokemon (PokemonParam) @@ -2660,9 +2490,8 @@ Script_givepoke: ; 97932 ld a, b ld [ScriptVar], a ret -; 97968 -Script_giveegg: ; 97968 +Script_giveegg: ; script command 0x2e ; parameters: ; pkmn (PokemonParam) @@ -2681,9 +2510,8 @@ Script_giveegg: ; 97968 ld a, 2 ld [ScriptVar], a ret -; 97988 -Script_setevent: ; 97988 +Script_setevent: ; script command 0x33 ; parameters: ; bit_number (MultiByteParam) @@ -2695,9 +2523,8 @@ Script_setevent: ; 97988 ld b, SET_FLAG call EventFlagAction ret -; 97996 -Script_clearevent: ; 97996 +Script_clearevent: ; script command 0x32 ; parameters: ; bit_number (MultiByteParam) @@ -2709,9 +2536,8 @@ Script_clearevent: ; 97996 ld b, RESET_FLAG call EventFlagAction ret -; 979a4 -Script_checkevent: ; 979a4 +Script_checkevent: ; script command 0x31 ; parameters: ; bit_number (MultiByteParam) @@ -2729,9 +2555,8 @@ Script_checkevent: ; 979a4 .false ld [ScriptVar], a ret -; 979bb -Script_setflag: ; 979bb +Script_setflag: ; script command 0x36 ; parameters: ; bit_number (MultiByteParam) @@ -2743,9 +2568,8 @@ Script_setflag: ; 979bb ld b, SET_FLAG call _EngineFlagAction ret -; 979c9 -Script_clearflag: ; 979c9 +Script_clearflag: ; script command 0x35 ; parameters: ; bit_number (MultiByteParam) @@ -2757,9 +2581,8 @@ Script_clearflag: ; 979c9 ld b, RESET_FLAG call _EngineFlagAction ret -; 979d7 -Script_checkflag: ; 979d7 +Script_checkflag: ; script command 0x34 ; parameters: ; bit_number (MultiByteParam) @@ -2777,30 +2600,26 @@ Script_checkflag: ; 979d7 .false ld [ScriptVar], a ret -; 979ee -_EngineFlagAction: ; 979ee +_EngineFlagAction: callba EngineFlagAction ret -; 979f5 -Script_wildoff: ; 979f5 +Script_wildoff: ; script command 0x38 ld hl, StatusFlags set 5, [hl] ret -; 979fb -Script_wildon: ; 979fb +Script_wildon: ; script command 0x37 ld hl, StatusFlags res 5, [hl] ret -; 97a01 -Script_xycompare: ; 97a01 +Script_xycompare: ; script command 0x39 ; parameters: ; pointer (MultiByteParam) @@ -2810,9 +2629,8 @@ Script_xycompare: ; 97a01 call GetScriptByte ld [wXYComparePointer + 1], a ret -; 97a0e -Script_warpfacing: ; 97a0e +Script_warpfacing: ; script command 0xa3 ; parameters: ; facing (SingleByteParam) @@ -2830,7 +2648,7 @@ Script_warpfacing: ; 97a0e ld [wPlayerSpriteSetupFlags], a ; fall through -Script_warp: ; 97a1d +Script_warp: ; script command 0x3c ; parameters: ; map_group (MapGroupParam) @@ -2870,9 +2688,8 @@ Script_warp: ; 97a1d call LoadMapStatus call StopScript ret -; 97a65 -Script_warpmod: ; 97a65 +Script_warpmod: ; script command 0x3a ; parameters: ; warp_id (SingleByteParam) @@ -2886,9 +2703,8 @@ Script_warpmod: ; 97a65 call GetScriptByte ld [BackupMapNumber], a ret -; 97a78 -Script_blackoutmod: ; 97a78 +Script_blackoutmod: ; script command 0x3b ; parameters: ; map_group (MapGroupParam) @@ -2899,17 +2715,15 @@ Script_blackoutmod: ; 97a78 call GetScriptByte ld [wLastSpawnMapNumber], a ret -; 97a85 -Script_dontrestartmapmusic: ; 97a85 +Script_dontrestartmapmusic: ; script command 0x83 ld a, 1 ld [wDontPlayMapMusicOnReload], a ret -; 97a8b -Script_writecmdqueue: ; 97a8b +Script_writecmdqueue: ; script command 0x7d ; parameters: ; queue_pointer (MultiByteParam) @@ -2922,9 +2736,8 @@ Script_writecmdqueue: ; 97a8b ld b, a callba WriteCmdQueue ; no need to farcall ret -; 97a9e -Script_delcmdqueue: ; 97a9e +Script_delcmdqueue: ; script command 0x7e ; parameters: ; byte (SingleByteParam) @@ -2938,9 +2751,8 @@ Script_delcmdqueue: ; 97a9e ld a, 1 ld [ScriptVar], a ret -; 97ab3 -Script_changemap: ; 97ab3 +Script_changemap: ; script command 0x79 ; parameters: ; map_data_pointer (MapDataPointerParam) @@ -2954,9 +2766,8 @@ Script_changemap: ; 97ab3 call ChangeMap call BufferScreen ret -; 97acc -Script_changeblock: ; 97acc +Script_changeblock: ; script command 0x7a ; parameters: ; x (SingleByteParam) @@ -2974,9 +2785,8 @@ Script_changeblock: ; 97acc ld [hl], a call BufferScreen ret -; 97ae3 -Script_reloadmappart:: ; 97ae3 +Script_reloadmappart:: ; script command 0x7c xor a @@ -2986,23 +2796,20 @@ Script_reloadmappart:: ; 97ae3 callba ReloadMapPart call UpdateSprites ret -; 97af6 -Script_warpcheck: ; 97af6 +Script_warpcheck: ; script command 0x8e call WarpCheck ret nc callba EnableEvents ret -; 97b01 Script_enableevents: ; unreferenced callba EnableEvents ret -; 97b08 -Script_newloadmap: ; 97b08 +Script_newloadmap: ; script command 0x8a ; parameters: ; which_method (SingleByteParam) @@ -3013,23 +2820,20 @@ Script_newloadmap: ; 97b08 call LoadMapStatus call StopScript ret -; 97b16 -Script_reloadandreturn: ; 97b16 +Script_reloadandreturn: ; script command 0x92 call Script_newloadmap jp Script_end -; 97b1c -Script_textbox: ; 97b1c +Script_textbox: ; script command 0x47 call OpenText ret -; 97b20 -Script_refreshscreen: ; 97b20 +Script_refreshscreen: ; script command 0x48 ; parameters: ; dummy (SingleByteParam) @@ -3037,9 +2841,8 @@ Script_refreshscreen: ; 97b20 call RefreshScreen call GetScriptByte ret -; 97b27 -Script_loadbytec2cf: ; 97b27 +Script_loadbytec2cf: ; script command 0x4a ; parameters: ; byte (SingleByteParam) @@ -3047,20 +2850,18 @@ Script_loadbytec2cf: ; 97b27 call GetScriptByte ld [wc2cf], a ret -; 97b2e ld c, c ; XXX -Script_closetext: ; 97b2f +Script_closetext: ; script command 0x49 call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap call CloseText ret -; 97b36 -Script_passtoengine: ; 97b36 +Script_passtoengine: ; script command 0x89 ; parameters: ; data_pointer (PointerLabelBeforeBank) @@ -3074,9 +2875,8 @@ Script_passtoengine: ; 97b36 pop af call StartAutoInput ret -; 97b47 -Script_pause: ; 97b47 +Script_pause: ; script command 0x8b ; parameters: ; length (DecimalParam) @@ -3092,9 +2892,8 @@ Script_pause: ; 97b47 dec [hl] jr nz, .loop ret -; 97b5c -Script_deactivatefacing: ; 97b5c +Script_deactivatefacing: ; script command 0x8c ; parameters: ; time (SingleByteParam) @@ -3108,18 +2907,16 @@ Script_deactivatefacing: ; 97b5c ld [ScriptMode], a call StopScript ret -; 97b6e -Script_ptpriorityjump: ; 97b6e +Script_ptpriorityjump: ; script command 0x8f ; parameters: ; pointer (ScriptPointerLabelParam) call StopScript jp Script_jump -; 97b74 -Script_end: ; 97b74 +Script_end: ; script command 0x91 call ExitScriptSubroutine @@ -3135,9 +2932,8 @@ Script_end: ; 97b74 res 0, [hl] call StopScript ret -; 97b8c -Script_return: ; 97b8c +Script_return: ; script command 0x90 call ExitScriptSubroutine @@ -3147,9 +2943,8 @@ Script_return: ; 97b8c res 0, [hl] call StopScript ret -; 97b9a -ExitScriptSubroutine: ; 97b9a +ExitScriptSubroutine: ; Return carry if there's no parent to return to. ld hl, wScriptStackSize @@ -3178,9 +2973,8 @@ ExitScriptSubroutine: ; 97b9a .done scf ret -; 97bc0 -Script_end_all: ; 97bc0 +Script_end_all: ; script command 0x93 xor a @@ -3192,22 +2986,20 @@ Script_end_all: ; 97bc0 res 0, [hl] call StopScript ret -; 97bd5 -Script_halloffame: ; 97bd5 +Script_halloffame: ; script command 0xa1 ld hl, GameTimerPause res 0, [hl] - callba Mobile_HallOfFame - callba Mobile_HallOfFame2 + callba TrainerRankings_HallOfFame + callba TrainerRankings_HallOfFame2 callba HallOfFame ld hl, GameTimerPause set 0, [hl] jr ReturnFromCredits -; 97bf3 -Script_credits: ; 97bf3 +Script_credits: ; script command 0xa2 callba RedCredits @@ -3217,9 +3009,8 @@ ReturnFromCredits: call LoadMapStatus call StopScript ret -; 97c051 -Script_wait: ; 97c05 +Script_wait: ; script command 0xa8 ; parameters: ; unknown (SingleByteParam) @@ -3235,23 +3026,20 @@ Script_wait: ; 97c05 jr nz, .loop pop bc ret -; 97c15 -Script_check_save: ; 97c15 +Script_check_save: ; script command 0xa9 callba CheckSave ld a, c ld [ScriptVar], a ret -; 97c20 -; 97c20 unreferenced +; unreferenced ld a, [.byte] ld [ScriptVar], a ret .byte db 0 -; 97c28 diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index 00ab1d828..93be28d9a 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -20,7 +20,7 @@ _SlotMachine: call PlaySFX call WaitSFX call ClearBGPalettes - callba MobileFn_105fd0 + callba TrainerRankings_EndSlotsWinStreak ld hl, Options res NO_TEXT_SCROLL, [hl] ld hl, rLCDC ; $ff40 @@ -796,7 +796,7 @@ Function92bd4: ; 92bd4 (24:6bd4) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 92be4 (24:6be4) @@ -1311,7 +1311,7 @@ Slots_CheckMatchedFirstTwoReels: ; 92e94 ld l, a ld de, .return push de - jp [hl] + jp hl .return ld a, [wFirstTwoReelsMatching] @@ -1422,7 +1422,7 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d ld l, a ld de, .return push de - jp [hl] + jp hl .return ld a, [wSlotMatched] @@ -1812,7 +1812,7 @@ SlotGetPayout: ; 93124 (24:7124) ld a, [hl] ld [wPayout], a ld d, a - callba MobileFn_105fe3 + callba TrainerRankings_AddToSlotsPayouts ret .PayoutTable: @@ -1836,7 +1836,7 @@ SlotPayoutText: ; 93158 (24:7158) jr nz, .MatchedSomething ld hl, .Text_Darn call PrintText - callba MobileFn_105fd0 + callba TrainerRankings_EndSlotsWinStreak ret .MatchedSomething: @@ -1855,12 +1855,12 @@ SlotPayoutText: ; 93158 (24:7158) ld l, a ld de, .return push de - jp [hl] + jp hl .return ld hl, .Text_PrintPayout call PrintText - callba MobileFn_105f9f + callba TrainerRankings_AddToSlotsWinStreak ret ; 93195 (24:7195) @@ -1958,7 +1958,7 @@ SlotMachine_AnimateGolem: ; 9321d (24:721d) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .Jumptable: ; 9322d (24:722d) @@ -2059,7 +2059,7 @@ Slots_AnimateChansey: ; 932ac (24:72ac) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .Jumptable: ; 932bc (24:72bc) diff --git a/engine/specials.asm b/engine/specials.asm index 841a59cd3..2d9b6f998 100644 --- a/engine/specials.asm +++ b/engine/specials.asm @@ -179,7 +179,7 @@ SpecialsPointers:: ; c029 add_special Mobile_SelectThreeMons add_special Function1037eb add_special Function10383c - add_special Mobile_HealParty + add_special TrainerRankings_Healings add_special RefreshSprites add_special Function1037c2 add_special Mobile_DummyReturnFalse diff --git a/engine/sprite_anims.asm b/engine/sprite_anims.asm index 0e25cafdf..a8755b832 100755 --- a/engine/sprite_anims.asm +++ b/engine/sprite_anims.asm @@ -9,7 +9,7 @@ DoAnimFrame: ; 8d24b ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 8d25b .Jumptable: ; 8d25b (23:525b) @@ -134,7 +134,7 @@ DoAnimFrame: ; 8d24b .four ; 8d302 (23:5302) call .AnonymousJumptable - jp [hl] + jp hl ; 8d306 (23:5306) ; Anonymous dw (see .AnonymousJumptable) @@ -418,7 +418,7 @@ DoAnimFrame: ; 8d24b .sixteen ; 8d483 (23:5483) call .AnonymousJumptable - jp [hl] + jp hl ; 8d487 (23:5487) ; Anonymous dw (see .AnonymousJumptable) diff --git a/engine/startmenu.asm b/engine/startmenu.asm index bf71a0b8d..a935b8a07 100755 --- a/engine/startmenu.asm +++ b/engine/startmenu.asm @@ -55,7 +55,7 @@ StartMenu:: ; 125cd ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .MenuReturns: dw .Reopen @@ -227,7 +227,7 @@ StartMenu:: ; 125cd ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 127ef .MenuString: ; 127ef @@ -701,7 +701,7 @@ PokemonActionSubmenu: ; 12a88 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl .nothing ld a, 0 @@ -1255,7 +1255,7 @@ MonMenu_Fly: ; 12e30 jr z, .Fail cp $0 jr z, .Error - callba MobileFn_1060b5 + callba TrainerRankings_Fly ld b, $4 ld a, $2 ret diff --git a/engine/std_scripts.asm b/engine/std_scripts.asm index 0f144f79c..4b69a4de1 100644 --- a/engine/std_scripts.asm +++ b/engine/std_scripts.asm @@ -107,7 +107,7 @@ PokeCenterNurseScript: farwritetext NurseTakePokemonText pause 20 - special Mobile_HealParty + special TrainerRankings_Healings spriteface LAST_TALKED, LEFT pause 10 special HealParty diff --git a/engine/time.asm b/engine/time.asm index 2112ec35c..296cc335d 100755 --- a/engine/time.asm +++ b/engine/time.asm @@ -462,4 +462,4 @@ CopyDayHourMinToHL: ; 1162e ld a, [hMinutes] ld [hli], a ret -; 11639
\ No newline at end of file +; 11639 diff --git a/engine/timeofdaypals.asm b/engine/timeofdaypals.asm index e9b19c6f7..263a83fc1 100644 --- a/engine/timeofdaypals.asm +++ b/engine/timeofdaypals.asm @@ -250,7 +250,7 @@ GetTimePalette: ; 8c117 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 8c126 .TimePalettes: diff --git a/engine/timeset.asm b/engine/timeset.asm index f828b0ff8..d560ae817 100755 --- a/engine/timeset.asm +++ b/engine/timeset.asm @@ -397,11 +397,11 @@ OakText_ResponseToSetTime: ; 0x908b8 ; 0x908fb GFX_908fb: ; 908fb -INCBIN "gfx/unknown/0908fb.2bpp" +INCBIN "gfx/unknown/0908fb.1bpp" GFX_90903: ; 90903 -INCBIN "gfx/unknown/090903.2bpp" +INCBIN "gfx/unknown/090903.1bpp" GFX_9090b: ; 9090b -INCBIN "gfx/unknown/09090b.2bpp" +INCBIN "gfx/unknown/09090b.1bpp" ; 90913 Special_SetDayOfWeek: ; 90913 diff --git a/engine/title.asm b/engine/title.asm index 787872939..36e2851d3 100644 --- a/engine/title.asm +++ b/engine/title.asm @@ -387,15 +387,15 @@ AnimateTitleCrystal: ; 10ef32 ; 10ef46 TitleSuicuneGFX: ; 10ef46 -INCBIN "gfx/title/suicune.w128.2bpp.lz" +INCBIN "gfx/title/suicune.2bpp.lz" ; 10f326 TitleLogoGFX: ; 10f326 -INCBIN "gfx/title/logo.w160.t4.2bpp.lz" +INCBIN "gfx/title/logo.2bpp.lz" ; 10fcee TitleCrystalGFX: ; 10fcee -INCBIN "gfx/title/crystal.w48.interleave.2bpp.lz" +INCBIN "gfx/title/crystal.2bpp.lz" ; 10fede TitleScreenPalettes: diff --git a/engine/tmhm2.asm b/engine/tmhm2.asm index 6efd07294..6e32fdae8 100755 --- a/engine/tmhm2.asm +++ b/engine/tmhm2.asm @@ -146,7 +146,7 @@ TeachTMHM: ; 2c867 and a jr z, .nope - callba MobileFn_106049 + callba TrainerRankings_TMsHMsTaught ld a, [CurItem] call IsHM ret c diff --git a/engine/trade/animation.asm b/engine/trade/animation.asm index d90f45a82..fa351ba3d 100755 --- a/engine/trade/animation.asm +++ b/engine/trade/animation.asm @@ -232,7 +232,7 @@ DoTradeAnimation: ; 29082 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 290af .JumpTable: ; 290af @@ -549,7 +549,7 @@ TradeAnim_TubeAnimJumptable: ; 29281 ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 2928f .Jumptable: ; 2928f @@ -1173,7 +1173,7 @@ TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; 29686 .Jumptable: ; 29686 (a:5686) diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm index a993ce4ba..23defe919 100755 --- a/engine/trainer_card.asm +++ b/engine/trainer_card.asm @@ -608,8 +608,8 @@ TrainerCard_JohtoBadgesOAM: ; 254c9 CardStatusGFX: INCBIN "gfx/misc/card_status.2bpp" -LeaderGFX: INCBIN "gfx/misc/leaders.w24.2bpp" -LeaderGFX2: INCBIN "gfx/misc/leaders.w24.2bpp" +LeaderGFX: INCBIN "gfx/misc/leaders.2bpp" +LeaderGFX2: INCBIN "gfx/misc/leaders.2bpp" BadgeGFX: INCBIN "gfx/misc/badges.2bpp" BadgeGFX2: INCBIN "gfx/misc/badges.2bpp" diff --git a/engine/unown_puzzle.asm b/engine/unown_puzzle.asm index 8d46a02a6..a1fed2520 100755 --- a/engine/unown_puzzle.asm +++ b/engine/unown_puzzle.asm @@ -183,7 +183,7 @@ UnownPuzzleJumptable: ; e12ca ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; e12d9 .Jumptable: ; e12d9 |