mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Use BANK for hardcoded WRAM banks (except where bankswitches appear unnecessary).
This commit is contained in:
parent
501ec9b283
commit
9d0ba6bfd3
@ -23,7 +23,7 @@ Predef_StartBattle: ; 8c20f
|
||||
.done
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, wBGPals1
|
||||
@ -44,7 +44,7 @@ Predef_StartBattle: ; 8c20f
|
||||
ld [hLYOverrideEnd], a
|
||||
ld [hSCY], a
|
||||
|
||||
ld a, $1
|
||||
ld a, 1 ; unnecessary bankswitch?
|
||||
ld [rSVBK], a
|
||||
pop af
|
||||
ld [hVBlank], a
|
||||
@ -116,7 +116,7 @@ LoadTrainerBattlePokeballTiles:
|
||||
ConvertTrainerBattlePokeballTilesTo2bpp: ; 8c2cf
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
push hl
|
||||
ld hl, wDecompressScratch
|
||||
@ -647,7 +647,7 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
|
||||
.daytime
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5 ; WRAM5 = palettes
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
call .copypals
|
||||
push hl
|
||||
@ -729,7 +729,7 @@ PokeBallTransition:
|
||||
WipeLYOverrides: ; 8c6d8
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(LYOverrides)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, LYOverrides
|
||||
|
@ -9320,7 +9320,7 @@ InitBattleDisplay: ; 3fb6c
|
||||
.BlankBGMap: ; 3fbd6
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, wDecompressScratch
|
||||
@ -9381,7 +9381,7 @@ GetTrainerBackpic: ; 3fbff
|
||||
CopyBackpic: ; 3fc30
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
ld hl, vTiles0
|
||||
ld de, vTiles2 tile $31
|
||||
|
@ -1,7 +1,7 @@
|
||||
BattleIntroSlidingPics: ; 4e980
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(LYOverrides)
|
||||
ld [rSVBK], a
|
||||
call .subfunction1
|
||||
ld a, rSCX - $ff00
|
||||
|
@ -5,7 +5,7 @@ PlayBattleAnim: ; cc0d6
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
|
||||
ld a, 5
|
||||
ld a, BANK(ActiveAnimObjects)
|
||||
ld [rSVBK], a
|
||||
|
||||
call _PlayBattleAnim
|
||||
@ -163,7 +163,7 @@ BattleAnimRestoreHuds: ; cc1bb
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld a, BANK(CurBattleMon) ; alternatively: BANK(TempMon), BANK(PartyMon1), several others
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, UpdateBattleHuds
|
||||
@ -917,7 +917,7 @@ BattleAnimCmd_E7: ; cc5db (33:45db)
|
||||
BattleAnimCmd_Transform: ; cc5dc (33:45dc)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 1
|
||||
ld a, BANK(CurPartySpecies)
|
||||
ld [rSVBK], a
|
||||
ld a, [CurPartySpecies] ; CurPartySpecies
|
||||
push af
|
||||
@ -973,7 +973,7 @@ BattleAnimCmd_RaiseSub: ; cc640 (33:4640)
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 1
|
||||
ld a, 1 ; unnecessary bankswitch?
|
||||
ld [rSVBK], a
|
||||
xor a
|
||||
call GetSRAMBank
|
||||
@ -1047,7 +1047,7 @@ GetSubstitutePic: ; cc64c
|
||||
BattleAnimCmd_MinimizeOpp: ; cc6cf (33:46cf)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld a, 1 ; unnecessary bankswitch?
|
||||
ld [rSVBK], a
|
||||
xor a
|
||||
call GetSRAMBank
|
||||
@ -1103,7 +1103,7 @@ INCBIN "gfx/battle/minimize.2bpp"
|
||||
BattleAnimCmd_Minimize: ; cc735 (33:4735)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld a, 1 ; unnecessary bankswitch?
|
||||
ld [rSVBK], a
|
||||
xor a
|
||||
call GetSRAMBank
|
||||
@ -1118,7 +1118,7 @@ BattleAnimCmd_Minimize: ; cc735 (33:4735)
|
||||
BattleAnimCmd_DropSub: ; cc750 (33:4750)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld a, BANK(CurPartySpecies)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld a, [CurPartySpecies] ; CurPartySpecies
|
||||
@ -1143,7 +1143,7 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
|
||||
BattleAnimCmd_BeatUp: ; cc776 (33:4776)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld a, BANK(CurPartySpecies)
|
||||
ld [rSVBK], a
|
||||
ld a, [CurPartySpecies] ; CurPartySpecies
|
||||
push af
|
||||
@ -1254,7 +1254,7 @@ endr
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 1
|
||||
ld a, BANK(EnemyMon) ; BattleMon is in WRAM0, but EnemyMon is in WRAMX
|
||||
ld [rSVBK], a
|
||||
|
||||
ld a, [hBattleTurn]
|
||||
@ -1262,14 +1262,14 @@ endr
|
||||
jr nz, .enemy
|
||||
|
||||
ld a, $f0
|
||||
ld [CryTracks], a ; CryTracks
|
||||
ld a, [BattleMonSpecies] ; BattleMonSpecies
|
||||
ld [CryTracks], a
|
||||
ld a, [BattleMonSpecies]
|
||||
jr .done_cry_tracks
|
||||
|
||||
.enemy
|
||||
ld a, $0f
|
||||
ld [CryTracks], a ; CryTracks
|
||||
ld a, [EnemyMonSpecies] ; EnemyMon
|
||||
ld [CryTracks], a
|
||||
ld a, [EnemyMonSpecies]
|
||||
|
||||
.done_cry_tracks
|
||||
push hl
|
||||
@ -1431,7 +1431,7 @@ BattleAnim_SetBGPals: ; cc91a
|
||||
ret z
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, wBGPals2
|
||||
ld de, wBGPals1
|
||||
@ -1459,7 +1459,7 @@ BattleAnim_SetOBPals: ; cc94b
|
||||
ret z
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wOBPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, wOBPals2 palette PAL_BATTLE_OB_GRAY
|
||||
ld de, wOBPals1 palette PAL_BATTLE_OB_GRAY
|
||||
|
@ -2578,7 +2578,7 @@ BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
|
||||
ld h, a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld a, h
|
||||
push bc
|
||||
@ -2605,7 +2605,7 @@ BGEffects_LoadBGPal1_OBPal0: ; c8e7f (32:4e7f)
|
||||
ld h, a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld a, h
|
||||
push bc
|
||||
|
@ -428,9 +428,9 @@ GetBallAnimPal: ; cd249 (33:5249)
|
||||
ld hl, BallColors
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld a, BANK(CurItem)
|
||||
ld [rSVBK], a
|
||||
ld a, [CurItem] ; CurItem
|
||||
ld a, [CurItem]
|
||||
ld e, a
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
|
@ -1649,7 +1649,7 @@ CardFlip_InitAttrPals: ; e0c37 (38:4c37)
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, .palettes
|
||||
ld de, wBGPals1
|
||||
|
@ -394,7 +394,7 @@ LoadStatsScreenPals:
|
||||
add hl, bc
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld a, [hli]
|
||||
ld [wBGPals1 palette 0], a
|
||||
@ -504,7 +504,7 @@ GetPredefPal:
|
||||
LoadHLPaletteIntoDE:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wOBPals1)
|
||||
ld [rSVBK], a
|
||||
ld c, $8
|
||||
.loop
|
||||
@ -520,7 +520,7 @@ LoadHLPaletteIntoDE:
|
||||
LoadPalette_White_Col1_Col2_Black:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld a, LOW(palred 31 + palgreen 31 + palblue 31)
|
||||
@ -572,7 +572,7 @@ ResetBGPals:
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, wBGPals1
|
||||
@ -930,7 +930,7 @@ InitCGBPals::
|
||||
jr nz, .obpals_loop
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, wBGPals1
|
||||
call .LoadWhitePals
|
||||
@ -1251,7 +1251,7 @@ LoadMapPals:
|
||||
; Switch to palettes WRAM bank
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, wBGPals1
|
||||
ld b, 8
|
||||
|
@ -13,7 +13,7 @@ Credits:: ; 109847
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wPals)
|
||||
ld [rSVBK], a
|
||||
|
||||
call ClearBGPalettes
|
||||
|
@ -57,7 +57,7 @@ Copyright_GFPresents: ; e4579
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, IntroLogoGFX
|
||||
@ -319,7 +319,7 @@ GameFreakLogoScene4: ; e4776 (39:4776)
|
||||
add hl, de
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wOBPals2)
|
||||
ld [rSVBK], a
|
||||
ld a, [hli]
|
||||
ld [wOBPals2 + 12], a
|
||||
@ -352,7 +352,7 @@ INCBIN "gfx/splash/logo2.1bpp"
|
||||
CrystalIntro: ; e48ac
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 5
|
||||
ld a, BANK(wPals)
|
||||
ld [rSVBK], a
|
||||
ld a, [hInMenu]
|
||||
push af
|
||||
@ -480,7 +480,7 @@ IntroScene1: ; e495b (39:495b)
|
||||
call Intro_DecompressRequest2bpp_64Tiles
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_365ad
|
||||
ld de, wBGPals1
|
||||
@ -553,7 +553,7 @@ IntroScene3: ; e49fd (39:49fd)
|
||||
call Intro_DecompressRequest2bpp_64Tiles
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_e5edd
|
||||
ld de, wBGPals1
|
||||
@ -619,7 +619,7 @@ IntroScene5: ; e4a7a (39:4a7a)
|
||||
call Intro_DecompressRequest2bpp_64Tiles
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_365ad
|
||||
ld de, wBGPals1
|
||||
@ -725,7 +725,7 @@ IntroScene7: ; e4b3f (39:4b3f)
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, Palette_e5edd
|
||||
@ -884,7 +884,7 @@ IntroScene11: ; e4c86 (39:4c86)
|
||||
call Intro_DecompressRequest2bpp_64Tiles
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_365ad
|
||||
ld de, wBGPals1
|
||||
@ -1011,7 +1011,7 @@ IntroScene13: ; e4d6d (39:4d6d)
|
||||
call Intro_DecompressRequest2bpp_64Tiles
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_e5edd
|
||||
ld de, wBGPals1
|
||||
@ -1120,7 +1120,7 @@ IntroScene15: ; e4e40 (39:4e40)
|
||||
call Intro_LoadTilemap
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_e77dd
|
||||
ld de, wBGPals1
|
||||
@ -1194,7 +1194,7 @@ IntroScene17: ; e4ef5 (39:4ef5)
|
||||
call Intro_DecompressRequest2bpp_64Tiles
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_e6d6d
|
||||
ld de, wBGPals1
|
||||
@ -1268,7 +1268,7 @@ IntroScene19: ; e4f7e (39:4f7e)
|
||||
call Intro_LoadTilemap
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_e77dd
|
||||
ld de, wBGPals1
|
||||
@ -1438,7 +1438,7 @@ IntroScene26: ; e50bb (39:50bb)
|
||||
call Intro_DecompressRequest2bpp_64Tiles
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_e679d
|
||||
ld de, wBGPals1
|
||||
@ -1526,7 +1526,7 @@ Intro_Scene24_ApplyPaletteFade: ; e5172 (39:5172)
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
ld de, wBGPals2
|
||||
ld b, 8 ; number of BG pals
|
||||
@ -1617,7 +1617,7 @@ CrystalIntro_UnownFade: ; e5223 (39:5223)
|
||||
ld b, $0
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
|
||||
push hl
|
||||
@ -1722,7 +1722,7 @@ Intro_Scene20_AppearUnown: ; e5348 (39:5348)
|
||||
ld c, a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
|
||||
push bc
|
||||
@ -1791,7 +1791,7 @@ endr
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
|
||||
push hl
|
||||
@ -1846,7 +1846,7 @@ endr
|
||||
Intro_LoadTilemap: ; e541b (39:541b)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, wDecompressScratch
|
||||
@ -1946,7 +1946,7 @@ Intro_SetCGBPalUpdate: ; e549e (39:549e)
|
||||
Intro_ClearBGPals: ; e54a3 (39:54a3)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, wBGPals2
|
||||
@ -1965,7 +1965,7 @@ Intro_ClearBGPals: ; e54a3 (39:54a3)
|
||||
Intro_DecompressRequest2bpp_128Tiles: ; e54c2 (39:54c2)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
push de
|
||||
@ -1984,7 +1984,7 @@ Intro_DecompressRequest2bpp_128Tiles: ; e54c2 (39:54c2)
|
||||
Intro_DecompressRequest2bpp_255Tiles: ; e54de (39:54de)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
push de
|
||||
@ -2003,7 +2003,7 @@ Intro_DecompressRequest2bpp_255Tiles: ; e54de (39:54de)
|
||||
Intro_DecompressRequest2bpp_64Tiles: ; e54fa (39:54fa)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
push de
|
||||
@ -2022,7 +2022,7 @@ Intro_DecompressRequest2bpp_64Tiles: ; e54fa (39:54fa)
|
||||
Intro_ResetLYOverrides: ; e5516 (39:5516)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(LYOverrides)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, LYOverrides
|
||||
@ -2039,7 +2039,7 @@ Intro_ResetLYOverrides: ; e5516 (39:5516)
|
||||
Intro_PerspectiveScrollBG: ; e552f (39:552f)
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(LYOverrides)
|
||||
ld [rSVBK], a
|
||||
; Scroll the grass every frame.
|
||||
; Scroll the trees every other frame and at half speed.
|
||||
|
@ -155,7 +155,7 @@ Function819a7: ; 819a7
|
||||
ret z
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
ld hl, Palette_819f4
|
||||
ld de, wBGPals2
|
||||
@ -436,7 +436,7 @@ Function81c33: ; 81c33
|
||||
jr z, .asm_81c69
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
ld hl, wBGPals2
|
||||
ld de, wc608
|
||||
@ -1145,7 +1145,7 @@ Function82203: ; 82203
|
||||
Function8220f: ; 8220f
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld a, [wcf64]
|
||||
ld l, a
|
||||
@ -1198,7 +1198,7 @@ Function82236: ; 82236
|
||||
call Function821d8
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
ld hl, wBGPals2
|
||||
ld a, [wcf64]
|
||||
@ -1228,7 +1228,7 @@ Function82236: ; 82236
|
||||
Function822a3: ; 822a3
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
ld hl, wBGPals2
|
||||
ld a, [wcf64]
|
||||
|
@ -143,7 +143,7 @@ Mobile_ReloadMapPart: ; 104099
|
||||
.unreferenced_104101
|
||||
ld a, $1
|
||||
ld [rVBK], a
|
||||
ld a, $3
|
||||
ld a, BANK(w3_d800)
|
||||
ld [rSVBK], a
|
||||
ld hl, w3_d800
|
||||
call HDMATransferToWRAMBank3
|
||||
@ -221,7 +221,7 @@ CallInSafeGFXMode: ; 104177
|
||||
ld [hMapAnims], a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wScratchTileMap)
|
||||
ld [rSVBK], a
|
||||
ld a, [rVBK]
|
||||
push af
|
||||
@ -472,7 +472,7 @@ _Get2bpp:: ; 104284
|
||||
; switch to WRAM bank 6
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wScratchTileMap)
|
||||
ld [rSVBK], a
|
||||
|
||||
push bc
|
||||
@ -542,7 +542,7 @@ _Get1bpp:: ; 1042b2
|
||||
.bankswitch ; 1042d6
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wScratchTileMap)
|
||||
ld [rSVBK], a
|
||||
|
||||
push bc
|
||||
|
@ -198,7 +198,7 @@ INCBIN "gfx/overworld/heal_machine.2bpp"
|
||||
.go
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wOBPals2)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, wOBPals2 palette PAL_OW_TREE
|
||||
|
@ -16,7 +16,7 @@ Special_MagnetTrain: ; 8cc04
|
||||
ld h, a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wMagnetTrain)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld a, h
|
||||
@ -129,7 +129,7 @@ MagntTrain_LoadGFX_PlayMusic: ; 8ccc9
|
||||
ld [hSCY], a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld a, BANK(wPlayerGender)
|
||||
ld [rSVBK], a
|
||||
farcall GetPlayerIcon
|
||||
pop af
|
||||
@ -325,7 +325,7 @@ MagnetTrain_Jumptable: ; 8cdf7
|
||||
ld b, SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld a, BANK(wPlayerGender)
|
||||
ld [rSVBK], a
|
||||
ld a, [wPlayerGender]
|
||||
bit 0, a
|
||||
@ -429,7 +429,7 @@ MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae
|
||||
call DelayFrame
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld a, BANK(wEnvironment)
|
||||
ld [rSVBK], a
|
||||
ld a, [TimeOfDayPal]
|
||||
push af
|
||||
|
@ -26,7 +26,7 @@ LoadPoisonBGPals: ; cbcdd
|
||||
.cgb
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals2)
|
||||
ld [rSVBK], a
|
||||
ld hl, wBGPals2
|
||||
ld c, 4 palettes
|
||||
|
@ -154,7 +154,7 @@ UnownPrinter: ; 16be4
|
||||
.Load2bppToSRAM: ; 16cff
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld a, BANK(sScratch)
|
||||
|
@ -13,7 +13,7 @@ GBCOnlyScreen: ; 4ea82
|
||||
ld de, wd000
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 0
|
||||
ld a, 0 ; this is tantamount to selecting Bank 1
|
||||
ld [rSVBK], a
|
||||
call Decompress
|
||||
pop af
|
||||
|
@ -63,7 +63,7 @@ InitDisplayForRedCredits: ; 4e8c2
|
||||
ResetDisplayBetweenHallOfFameMons: ; 4e906
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
ld hl, wDecompressScratch
|
||||
ld bc, wScratchAttrMap - wDecompressScratch
|
||||
|
@ -79,7 +79,7 @@ LoadFonts_NoOAMUpdate:: ; 64bf
|
||||
HDMATransfer_FillBGMap0WithBlack: ; 64db
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld a, "<BLACK>" ; $60
|
||||
|
@ -1019,7 +1019,7 @@ CrystalIntroSequence: ; 620b
|
||||
StartTitleScreen: ; 6219
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
call .TitleScreen
|
||||
|
@ -586,7 +586,7 @@ Place2DMenuCursor: ; 24329
|
||||
_PushWindow:: ; 24374
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $7
|
||||
ld a, BANK(wWindowStack)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, wWindowStackPointer
|
||||
@ -691,7 +691,7 @@ _ExitMenu:: ; 243e8
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $7
|
||||
ld a, BANK(wWindowStack)
|
||||
ld [rSVBK], a
|
||||
|
||||
call GetWindowStackTop
|
||||
|
@ -279,7 +279,7 @@ PokeAnim_StereoCry: ; d0196
|
||||
PokeAnim_DeinitFrames: ; d01a9
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $2
|
||||
ld a, BANK(wPokeAnimCoord)
|
||||
ld [rSVBK], a
|
||||
call PokeAnim_PlaceGraphic
|
||||
farcall HDMATransferTileMapToWRAMBank3
|
||||
@ -876,7 +876,7 @@ PokeAnim_PlaceGraphic: ; d04bd
|
||||
PokeAnim_SetVBank1: ; d0504
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $2
|
||||
ld a, BANK(wPokeAnimCoord)
|
||||
ld [rSVBK], a
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
|
@ -2348,7 +2348,7 @@ Pokedex_BlackOutBG: ; 41401 (10:5401)
|
||||
; Make BG palettes black so that the BG becomes all black.
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
ld hl, wBGPals1
|
||||
ld bc, 8 palettes
|
||||
|
@ -47,8 +47,8 @@ _TimeOfDayPals:: ; 8c011
|
||||
; save wram bank
|
||||
ld a, [rSVBK]
|
||||
ld b, a
|
||||
; wram bank 5
|
||||
ld a, $5
|
||||
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
; push palette
|
||||
@ -78,8 +78,8 @@ _TimeOfDayPals:: ; 8c011
|
||||
; save wram bank
|
||||
ld a, [rSVBK]
|
||||
ld d, a
|
||||
; wram bank 5
|
||||
ld a, 5
|
||||
|
||||
ld a, BANK(wOBPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
; pop palette
|
||||
@ -173,7 +173,7 @@ Special_FadeBlackQuickly: ; 8c0b6
|
||||
FillWhiteBGColor: ; 8c0c1
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, wBGPals1
|
||||
|
@ -139,7 +139,7 @@ _TitleScreen: ; 10ed67
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
; WRAM bank 5
|
||||
ld a, 5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
; Update palette colors
|
||||
|
@ -63,7 +63,7 @@ UnusedTitleScreen: ; 10c000
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld a, BANK(wBGPals1)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, UnusedTitleBG_Palettes
|
||||
|
@ -206,7 +206,7 @@ GetMonBackpic: ; 5116c
|
||||
ld c, a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
push de
|
||||
|
||||
@ -327,7 +327,7 @@ GetTrainerPic: ; 5120d
|
||||
call AddNTimes
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
push de
|
||||
ld a, BANK(TrainerPicPointers)
|
||||
@ -358,7 +358,7 @@ DecompressPredef: ; 5125d
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
push de
|
||||
|
@ -16,7 +16,7 @@ GameTimer:: ; 209e
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 1
|
||||
ld a, BANK(GameTime)
|
||||
ld [rSVBK], a
|
||||
|
||||
call UpdateGameTimer
|
||||
|
@ -96,7 +96,7 @@ Init:: ; 17d
|
||||
ld [hCGB], a
|
||||
|
||||
call ClearWRAM
|
||||
ld a, 1
|
||||
ld a, BANK(wd000)
|
||||
ld [rSVBK], a
|
||||
call ClearVRAM
|
||||
call ClearSprites
|
||||
|
@ -1401,7 +1401,7 @@ LoadTilesetGFX:: ; 2821
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld a, BANK(wDecompressScratch)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld a, e
|
||||
|
@ -499,7 +499,7 @@ ClearWindowData:: ; 1fbf
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $7
|
||||
ld a, BANK(wWindowStack)
|
||||
ld [rSVBK], a
|
||||
|
||||
xor a
|
||||
|
@ -466,7 +466,7 @@ AnimateTileset:: ; 17d3
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 1
|
||||
ld a, BANK(TilesetAnim)
|
||||
ld [rSVBK], a
|
||||
|
||||
ld a, [rVBK]
|
||||
|
3
wram.asm
3
wram.asm
@ -2278,6 +2278,7 @@ StartSecond:: db ; d4b9
|
||||
wRTC:: ds 8 ; d4ba
|
||||
wDST:: db ; d4c2
|
||||
|
||||
GameTime::
|
||||
GameTimeCap:: db ; d4c3
|
||||
GameTimeHours:: dw ; d4c4
|
||||
GameTimeMinutes:: db ; d4c6
|
||||
@ -2879,6 +2880,7 @@ w3_dffc:: ds 4
|
||||
SECTION "GBC Video", WRAMX
|
||||
|
||||
; eight 4-color palettes each
|
||||
wPals::
|
||||
wBGPals1:: ds 8 palettes ; d000
|
||||
wOBPals1:: ds 8 palettes ; d040
|
||||
wBGPals2:: ds 8 palettes ; d080
|
||||
@ -2889,6 +2891,7 @@ LYOverridesEnd:: ; d190
|
||||
|
||||
ds 1
|
||||
|
||||
wMagnetTrain::
|
||||
wMagnetTrainDirection:: db
|
||||
wMagnetTrainInitPosition:: db
|
||||
wMagnetTrainHoldPosition:: db
|
||||
|
Loading…
Reference in New Issue
Block a user