diff options
author | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-08-09 19:28:43 -0400 |
---|---|---|
committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-08-09 19:28:43 -0400 |
commit | 9c61b495da446c2216bcd8c56aaa55fffdbf3d61 (patch) | |
tree | 7f8706e0e174bffa26dad81fb08af5c6a98f99a1 | |
parent | b2002fdf4abee435a879522980425913c51dc9e5 (diff) |
Fix bank1c errors and a few missed bank0 errors.
-rwxr-xr-x | data/sgb_packets.asm | 4 | ||||
-rwxr-xr-x | data/super_palettes.asm | 4 | ||||
-rwxr-xr-x | engine/gamefreak.asm | 4 | ||||
-rwxr-xr-x | engine/hall_of_fame.asm | 2 | ||||
-rw-r--r-- | engine/joypad.asm | 1 | ||||
-rwxr-xr-x | engine/overworld/healing_machine.asm | 8 | ||||
-rwxr-xr-x | engine/overworld/player_animations.asm | 4 | ||||
-rwxr-xr-x | engine/palettes.asm | 26 | ||||
-rwxr-xr-x | engine/town_map.asm | 12 | ||||
-rw-r--r-- | home.asm | 8 | ||||
-rw-r--r-- | home/audio.asm | 3 | ||||
-rw-r--r-- | home/overworld.asm | 14 | ||||
-rw-r--r-- | home/text.asm | 2 | ||||
-rwxr-xr-x | yellow/main.asm | 39 |
14 files changed, 67 insertions, 64 deletions
diff --git a/data/sgb_packets.asm b/data/sgb_packets.asm index bfd209fd..37a39f1d 100755 --- a/data/sgb_packets.asm +++ b/data/sgb_packets.asm @@ -68,8 +68,8 @@ BlkPacket_StatusScreen: ; 72641 (1c:6641) BlkPacket_Pokedex: ; 72651 (1c:6651) db $21 db $1,$7,$5,$1,$1,$8,$8 - db $0,$0,$0,$0,$0,$0,$0,$0, -BlkPacket_Slots: ; 72661 (1c:6611) + db $0,$0,$0,$0,$0,$0,$0,$0 +BlkPacket_Slots: ; 72661 (1c:6661) db $22 db $5,$3,$5,$0,$0,$13,$b,$3,$a db $0,$4,$13,$9,$2,$f,$0,$6,$13 diff --git a/data/super_palettes.asm b/data/super_palettes.asm index 15bce3e2..1ede10c0 100755 --- a/data/super_palettes.asm +++ b/data/super_palettes.asm @@ -1,6 +1,8 @@ ; palettes for overworlds, title screen, monsters SuperPalettes: ; 729b9 (1c:69b9) - dr $729b9,$72c39 + dr $729b9,$72af9 +Pointer_72af9: ; 72af9 (1c:6af9) + dr $72af9,$72c39 ;RGB 31,29,31 ; PAL_ROUTE ;RGB 21,28,11 ;RGB 20,26,31 diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm index b3854b7b..528d355e 100755 --- a/engine/gamefreak.asm +++ b/engine/gamefreak.asm @@ -5,11 +5,11 @@ LoadShootingStarGraphics: ; 70000 (1c:4000) ld [rOBP1], a ; $ff49 call Func_3040 call Func_3061 - ld de, AnimationTileset2 + $30 ; $4757 ; star tile (top left quadrant) + ld de, AnimationTileset2 ; $4757 ; star tile (top left quadrant) ld hl, vChars1 + $200 ld bc, (BANK(AnimationTileset2) << 8) + $01 call CopyVideoData - ld de, AnimationTileset2 + $130 ; $481e ; star tile (bottom left quadrant) + ld de, AnimationTileset2 + $100 ; $481e ; star tile (bottom left quadrant) ld hl, vChars1 + $210 ld bc, (BANK(AnimationTileset2) << 8) + $01 call CopyVideoData diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index 8c7ca55f..0bd906c7 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -152,7 +152,7 @@ Func_7030e: ; 7030e (1c:430e) call GetPartyMonName call Func_70348 ld a, [wTrainerEngageDistance] - ld [wcf91], a + ld [wWhichPokemon], a callab Func_fce18 ; 3f:4e18 jr nc, .asm_70336 ld e,$22 diff --git a/engine/joypad.asm b/engine/joypad.asm index bca84b33..f73d77b2 100644 --- a/engine/joypad.asm +++ b/engine/joypad.asm @@ -43,7 +43,6 @@ _Joypad:: ; c02d (3:402d) cp A_BUTTON + B_BUTTON + SELECT + START ; soft reset jp z, TrySoftReset - ld b, a ld a, [hJoyLast] ld e, a xor b diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index eb23c80c..23e24b23 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -18,9 +18,10 @@ AnimateHealingMachine: ; 7048b (1c:448b) call Func_7055a ld a, $4 ld [wMusicHeaderPointer], a - ld a, $ff - ld [wc0ee], a - call PlaySound + call StopAllMusic + ;ld a, $ff + ;ld [wc0ee], a + ;call PlaySound .asm_704ba ld a, [wMusicHeaderPointer] and a @@ -40,7 +41,6 @@ AnimateHealingMachine: ; 7048b (1c:448b) ld [wc0f0], a jr nz, .asm_704e6 call StopAllMusic - call PlaySound ld a, $2 ; BANK(Music_PkmnHealed) ld [wc0ef], a .asm_704e6 diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 43d3ec9c..fc0a3a6c 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -38,8 +38,8 @@ EnterMapAnim: ; 70567 (1c:4567) ld [wd431], a .restoreDefaultMusic call PlayDefaultMusic - call Func_151d .done + call Func_151d jp RestoreFacingDirectionAndYScreenPos .dungeonWarpAnimation ld c, 50 @@ -393,8 +393,8 @@ Func_70816: ; 70816 (1c:4816) call DelayFrames ld hl, wd736 set 6, [hl] - ld de, RedSprite ; $4180 ld hl, vNPCSprites + ld de, RedSprite ; $4180 ld b, BANK(RedSprite) ld c, $c call CopyVideoData diff --git a/engine/palettes.asm b/engine/palettes.asm index 0624b61f..2536fefc 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -546,6 +546,8 @@ LoadSGB: ; 721f8 (1c:61f8) .onDMG ret .onSGB + ld a, $1 + ld [wOnSGB], a di call Func_72247 ei @@ -566,7 +568,7 @@ LoadSGB: ; 721f8 (1c:61f8) call Func_722d7 call ClearVram ld hl, MaskEnCancelPacket - jp SendSGBPacket + jp Func_721b4 Func_72247: ; 72247 (1c:6247) ld hl, PointerTable_7225b @@ -577,7 +579,7 @@ Func_72247: ; 72247 (1c:6247) push hl ld h, [hl] ld l, a - call SendSGBPacket + call Func_721b4 pop hl inc hl pop bc @@ -645,7 +647,7 @@ CheckSGB: ; 7226d (1c:626d) Func_722ce: ; 722ce (1c:62ce) ld hl, MltReq1Packet - call SendSGBPacket + call Func_721b4 jp Wait7000 Func_722d7: ; 722d7 (1c:62d7) @@ -682,7 +684,7 @@ Func_722d7: ; 722d7 (1c:62d7) ld a, $e3 ld [rLCDC], a ; $ff40 pop hl - call SendSGBPacket + call Func_721b4 xor a ld [rBGP], a ; $ff47 call Func_72520 @@ -717,9 +719,9 @@ Func_72328: ; 72328 (1c:6328) ret .asm_7233e push de - call SendSGBPacket + call Func_721b4 pop hl - jp SendSGBPacket + jp Func_721b4 Func_72346: ; 72346 (1c:6346) ld a,[hl] @@ -770,7 +772,7 @@ Func_72346: ; 72346 (1c:6346) ld a,$2 call Func_7240f ld a,$5 - call Func_7240f + call Func_724df pop hl ld a,[hli] @@ -827,7 +829,7 @@ Func_723fe:: ; 723fe (1c:63fe) add hl,hl add hl,hl add hl,hl - ld de,SuperPalettes ; not exactly sure if actually super palettes + ld de,Pointer_72af9 ; not exactly sure if actually super palettes add hl,de ld a,l ld e,a @@ -934,7 +936,7 @@ Func_724a2:: ; 724a2 (1c:64a2) ld h,a ld de,wdef6 add hl,de - ld de,wdee9 + ld de,wdeea ld c,$8 .loop ld a,[de] @@ -1036,9 +1038,9 @@ Func_72524:: ; 72524 (1c:6524) call Func_7240f ld a,$1 call Func_724a2 - ld a,[wdee5] - ld e,a ld a,[wdee6] + ld e,a + ld a,[wdee7] ld d,a xor a call Func_7240f @@ -1135,7 +1137,7 @@ Func_725be:: ; 725be (1c:65be) ret Pointer_725e2:: ; 725e2 (1c:65e2) - db $0c,$11,$66,$21,$66,$41,$66,$51,$61,$81,$1a,$66,$2d + db $0c,$11,$66,$21,$66,$41,$66,$51,$66,$61,$66,$81,$66,$a1,$66,$2d db $cf,$5b,$cc,$31,$67,$2c,$cf,$51,$67 Func_725fb: ; 725fb (1c:65fb) diff --git a/engine/town_map.asm b/engine/town_map.asm index 6b12c04b..535756b8 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -1,5 +1,5 @@ DisplayTownMap: ; 70eb7 (1c:4eb7) - ;call LoadTownMap + call LoadTownMap ld hl, wUpdateSpritesEnabled ld a, [hl] push af @@ -47,7 +47,7 @@ Func_70f08: ; 70f08 (1c:4f08) ld a, $4 ld [wcd5b], a ld hl, wOAMBuffer + $10 - call Func_71279 + call Func_71302 pop hl ld de, wcd6d .loop @@ -105,9 +105,9 @@ Func_70f08: ; 70f08 (1c:4f08) jp Func_70ef4 .asm_70f87 ld a,[hJoy5] - and D_DOWN | D_UP | B_BUTTON | A_BUTTON + and D_DOWN | D_UP ret z - callab PrintBeginningBattleText + callab Func_f0000 ret INCLUDE "data/town_map_order.asm" @@ -561,7 +561,7 @@ Func_7137a: ; 7137a (1c:537a) jr .asm_71384 .asm_7138a inc hl - jr .asm_71384 + jr .asm_71396 .asm_7138d ld hl, ExternalMapEntries ; $539c ld c, a @@ -569,7 +569,7 @@ Func_7137a: ; 7137a (1c:537a) add hl, bc add hl, bc add hl, bc -.asm_7130d +.asm_71396 ld a, [hli] ld [de], a ld a, [hli] @@ -2573,7 +2573,7 @@ TalkToTrainer:: ; 3168 (0:3168) call ReadTrainerHeaderInfo ; print after battle text jp PrintText .trainerNotYetFought ; 0x31ed - ld a, $1 + ld a, $4 call ReadTrainerHeaderInfo ; print before battle text call PrintText ld a, $a @@ -3770,8 +3770,8 @@ WaitForTextScrollButtonPress:: ; 3865 (0:3865) push de push bc callab TownMapSpriteBlinkingAnimation ; 1c:5753 - pop de - pop bc + pop bc + pop de .skipAnimation coord hl, 18, 16 call HandleDownArrowBlinkTiming @@ -5014,7 +5014,7 @@ SetMapTextPointer:: ; 3f54 (0:3f54) ret TextPredefs:: ; 3f67 (0:3f67) - ;dr $3f67,$4000 + dr $3f67,$4000 ; add_tx_pre CardKeySuccessText ; 01 ; add_tx_pre CardKeyFailText ; 02 ; add_tx_pre RedBedroomPC ; 03 diff --git a/home/audio.asm b/home/audio.asm index 991dcd01..94cf999c 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -76,13 +76,14 @@ Func_21c8:: ; 21c8 (0:21c8) Func_21e3:: ; 21e5 (0:21e5) ld c,$6 +.loop push bc push hl callba Music2_UpdateMusic ; 2:509d pop hl pop bc dec c - jr nz, Func_21e3 + jr nz, .loop ret ;Func_235f:: ; 235f (0:235f) diff --git a/home/overworld.asm b/home/overworld.asm index 42146e2f..4ae1d36a 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -25,8 +25,8 @@ EnterMap:: ; 01d7 (0:01d7) res 3, [hl] ld hl, wd72e res 4, [hl] - call IsSurfingPikachuInParty .didNotEnterUsingFlyWarpOrDungeonWarp + call IsSurfingPikachuInParty callba CheckForceBikeOrSurf ; handle currents in SF islands and forced bike riding in cycling road ld hl, wd732 bit 4, [hl] @@ -59,7 +59,7 @@ OverworldLoopLessDelay:: ; 0245 (0:0245) bit 3,[hl] res 3,[hl] jp nz,WarpFound2 - ld a,[wd730] + ld a,[wd732] and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp jp nz,HandleFlyWarpOrDungeonWarp ld a,[W_CUROPPONENT] @@ -173,8 +173,8 @@ OverworldLoopLessDelay:: ; 0245 (0:0245) jr z,.noDirectionButtonsPressed ld a,$01 ld [wSpriteStateData1 + 5],a -.handleDirectionButtonPress ld a,$1 +.handleDirectionButtonPress ld [wd52a],a ; new direction ld a,[wd730] bit 7,a ; are we simulating button presses? @@ -763,7 +763,7 @@ HandleFlyWarpOrDungeonWarp:: ; 0794 (0:0794) set 2, [hl] ; fly warp or dungeon warp res 5, [hl] ; forced to ride bike call LeaveMapAnim - call LoadPlayerSpriteGraphics + call Func_07c4 callbs SpecialWarpIn jp SpecialEnterMap @@ -1226,7 +1226,7 @@ CollisionCheckOnLand:: ; 0a1c (0:0a1c) ; if no sprite collision cp $f jr nz,.collision - call CheckForJumpingAndTilePairCollisions + call Func_154a jr nz,.collision ld a,[hJoyHeld] and $2 @@ -2182,8 +2182,8 @@ InitSprites:: ; 1006 (0:1006) ld a,[hli] ld [de],a ; store picture ID at C1X0 inc d - ld a,$04 - add e + ld a,e + add $4 ld e,a ld a,[hli] ld [de],a ; store Y position at C2X4 diff --git a/home/text.asm b/home/text.asm index b520d74f..c2c224e3 100644 --- a/home/text.asm +++ b/home/text.asm @@ -378,7 +378,7 @@ TextCommandProcessor:: ; 1919 (0:1919) push af set 1,a ld e,a - ld a,[$fff4] + ld a,[$fff9] xor e ld [wd358],a ld a,c diff --git a/yellow/main.asm b/yellow/main.asm index f5ea85d1..64eac381 100755 --- a/yellow/main.asm +++ b/yellow/main.asm @@ -18,7 +18,8 @@ SECTION "home",ROM0 INCLUDE "home.asm" SECTION "bank01",ROMX,BANK[$01] -INCLUDE "data/facing.asm" +;INCLUDE "data/facing.asm" + dr $4000,$4111 INCLUDE "engine/battle/safari_zone.asm" SetDefaultNamesBeforeTitlescreen:: ; 414b (1:414b) dr $414b,$442b @@ -39,23 +40,9 @@ _IsTilePassable:: ; 4aaa (1:4aaa) PrintWaitingText:: ; 4b89 (1:4b89) dr $4b89,$4bb7 _UpdateSprites:: ; 4bb7 (1:4bb7) - dr $4bb7,$5c22 -StartMenu_Pokedex:: ; 5c22 (1:5c22) - dr $5c22,$5c36 -StartMenu_Pokemon:: ; 5c36 (1:5c36) - dr $5c36,$5ce4 -SpecialEnterMap:: ; 5ce4 (1:5ce4) - dr $5ce4,$5ead -StartMenu_Item:: ; 5ead (1:5ead) - dr $5ead,$600a -StartMenu_TrainerInfo:: ; 600a (1:600a) - dr $600a,$6042 + dr $4bb7,$6042 SpecialWarpIn:: ; 6042 (1:6042) - dr $6042,$6195 -StartMenu_SaveReset:: ; 6195 (1:6195) - dr $6195,$61a8 -StartMenu_Option:: ; 61a8 (1:61a8) - dr $61a8,$68a6 + dr $6042,$68a6 SubtractAmountPaidFromMoney_:: ; 68a6 (1:68a6) dr $68a6,$68c9 HandleItemListSwapping:: ; 68c9 (1:68c9) @@ -412,14 +399,26 @@ DrawPartyMenu_:: ; 11875 (4:5875) dr $11875,$11886 RedrawPartyMenu_:: ; 11886 (4:5886) dr $11886,$11a97 - RedPicFront:: INCBIN "pic/ytrainer/red.pic" ShrinkPic1:: INCBIN "pic/trainer/shrink1.pic" ShrinkPic2:: INCBIN "pic/trainer/shrink2.pic" - dr $11c22,$11e98 +StartMenu_Pokedex:: ; 11c22 (4:5c22) + dr $11c22,$11c36 +StartMenu_Pokemon:: ; 11c36 (4:5c36) + dr $11c36,$11ce4 +SpecialEnterMap:: ; 11ce4 (4:5ce4) + dr $11ce4,$11e98 ErasePartyMenuCursors:: ; 11e98 (4:5e98) - dr $11e98,$121c5 + dr $11e98,$11ead +StartMenu_Item:: ; 11ead (4:5ead) + dr $11ead,$1200a +StartMenu_TrainerInfo:: ; 1200a (4:600a) + dr $1200a,$12195 +StartMenu_SaveReset:: ; 12195 (4:6195) + dr $12195,$121a8 +StartMenu_Option:: ; 121a8 (4:61a8) + dr $121a8,$121c5 SwitchPartyMon:: ; 121c5 (4:61c5) dr $121c5,$12365 |