Skip to content

Commit dd516de

Browse files
committed
Use more updated hardware constants
1 parent e5c8e79 commit dd516de

16 files changed

+118
-118
lines changed

color/animations.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SpriteifyPlayerPokemon:
1313
call CopyVideoData
1414

1515
ld a, 2
16-
ldh [rSVBK], a
16+
ldh [rWBK], a
1717
ld hl, W2_BgPaletteData
1818
ld de, W2_SprPaletteData
1919
ld bc, 8
@@ -23,5 +23,5 @@ SpriteifyPlayerPokemon:
2323
ld [W2_LastOBP0], a
2424

2525
xor a
26-
ldh [rSVBK], a
26+
ldh [rWBK], a
2727
ret

color/cable_club.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CableClub_DoBattleOrTrade_ColorHook:
2020

2121
LoadCableClubTextPaletteAndMap:
2222
ld a, 2
23-
ldh [rSVBK], a
23+
ldh [rWBK], a
2424

2525
call LoadCableClubTextPalette
2626

@@ -36,7 +36,7 @@ LoadCableClubTextPaletteAndMap:
3636
ld [W2_StaticPaletteMapChanged], a
3737

3838
xor a
39-
ldh [rSVBK], a
39+
ldh [rWBK], a
4040
ret
4141

4242
LoadCableClubTextPalette:

color/color.asm

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SECTION "bank1C_extension", ROMX
44
; Set all palettes to black at beginning of battle
55
SetPal_BattleBlack:
66
ld a, $02
7-
ldh [rSVBK], a
7+
ldh [rWBK], a
88

99
ld d, PAL_BLACK
1010
ld e, 7
@@ -25,7 +25,7 @@ SetPal_BattleBlack:
2525
ld [W2_ForceOBPUpdate], a
2626

2727
xor a
28-
ldh [rSVBK], a
28+
ldh [rWBK], a
2929
ret
3030

3131

@@ -47,11 +47,11 @@ SetPal_BattleAfterBlack:
4747
; Update palettes (AFTER frame delay, so the tilemap is updated after player/enemy
4848
; scroll in)
4949
ld a, 2
50-
ldh [rSVBK], a
50+
ldh [rWBK], a
5151
ld a, 1
5252
ld [W2_ForceBGPUpdate], a
5353
ld [W2_ForceOBPUpdate], a
54-
ldh [rSVBK], a
54+
ldh [rWBK], a
5555
ret
5656

5757
; Set proper palettes for pokemon/trainers. Called a lot during battle, like when the
@@ -61,11 +61,11 @@ SetPal_Battle:
6161

6262
; Update palettes (BEFORE frame delay, so lifebars get updated snappily)
6363
ld a, 2
64-
ldh [rSVBK], a
64+
ldh [rWBK], a
6565
ld a, 1
6666
ld [W2_ForceBGPUpdate], a
6767
ld [W2_ForceOBPUpdate], a
68-
ldh [rSVBK], a
68+
ldh [rWBK], a
6969

7070
; Wait 3 frames (if LCD is on) to allow tilemap updates to apply. Prevents garbage
7171
; from appearing after closing pokemon menu.
@@ -84,11 +84,11 @@ SetPal_Battle_Common:
8484

8585
; If transformed, don't trust the "DetermineBackSpritePaletteID" function.
8686
ld a, $02
87-
ldh [rSVBK], a
87+
ldh [rWBK], a
8888
ld a, [W2_BattleMonPalette]
8989
ld b, a
9090
xor a
91-
ldh [rSVBK], a
91+
ldh [rWBK], a
9292
jr .getEnemyMonPal
9393

9494
.getBattleMonPal
@@ -102,7 +102,7 @@ SetPal_Battle_Common:
102102
ld c, a
103103

104104
ld a, $02
105-
ldh [rSVBK], a
105+
ldh [rWBK], a
106106

107107
; Save the player mon's palette in case it transforms later
108108
ld a, b
@@ -206,7 +206,7 @@ ENDC
206206
ld [W2_StaticPaletteMapChanged], a
207207

208208
xor a
209-
ldh [rSVBK], a
209+
ldh [rWBK], a
210210

211211
ld a, SET_PAL_BATTLE
212212
ld [wDefaultPaletteCommand], a
@@ -240,7 +240,7 @@ FillBox:
240240
; Load town map
241241
SetPal_TownMap:
242242
ld a, 2
243-
ldh [rSVBK], a
243+
ldh [rWBK], a
244244

245245
ld d, PAL_TOWNMAP
246246
ld e, 0
@@ -263,7 +263,7 @@ SetPal_TownMap:
263263
ld [hl], 1
264264

265265
xor a
266-
ldh [rSVBK], a
266+
ldh [rWBK], a
267267
ret
268268

269269
; Status screen
@@ -277,7 +277,7 @@ SetPal_StatusScreen:
277277
ld b, a
278278

279279
ld a, 2
280-
ldh [rSVBK], a
280+
ldh [rWBK], a
281281

282282
push bc
283283

@@ -346,7 +346,7 @@ IF GEN_2_GRAPHICS
346346
ENDC
347347

348348
xor a
349-
ldh [rSVBK], a
349+
ldh [rWBK], a
350350
ret
351351

352352
; Show pokedex data
@@ -357,7 +357,7 @@ SetPal_Pokedex:
357357
ld e, 0
358358

359359
ld a, 2
360-
ldh [rSVBK], a
360+
ldh [rWBK], a
361361

362362
farcall LoadSGBPalette
363363

@@ -402,13 +402,13 @@ ENDC
402402
ld [W2_TileBasedPalettes], a
403403

404404
;xor a
405-
ldh [rSVBK], a
405+
ldh [rWBK], a
406406
ret
407407

408408
; Slots
409409
SetPal_Slots:
410410
ld a, 2
411-
ldh [rSVBK], a
411+
ldh [rWBK], a
412412

413413
ld d, PAL_SLOTS1
414414
ld e, 0
@@ -452,7 +452,7 @@ SetPal_Slots:
452452
call FarCopyData
453453

454454
xor a
455-
ldh [rSVBK], a
455+
ldh [rWBK], a
456456
457457
; Wait 3 frames to allow tilemap updates to apply.
458458
; Prevents garbage from appearing when the slots machine open.
@@ -466,7 +466,7 @@ SetPal_TitleScreen:
466466
ld e, 0
467467

468468
ld a, 2
469-
ldh [rSVBK], a
469+
ldh [rWBK], a
470470

471471
farcall LoadSGBPalette
472472

@@ -525,7 +525,7 @@ ENDC
525525
ld [W2_ForceBGPUpdate], a ; Palettes must be redrawn
526526

527527
;ld a, 1
528-
ldh [rSVBK], a
528+
ldh [rWBK], a
529529

530530
; This fixes the text at the bottom being the wrong color for a second or so.
531531
; It's a real hack, but the game's using two vram maps at once, and the color code
@@ -556,7 +556,7 @@ ENDC
556556
; Called during the intro
557557
SetPal_NidorinoIntro:
558558
ld a, 2
559-
ldh [rSVBK], a
559+
ldh [rWBK], a
560560

561561
IF GEN_2_GRAPHICS
562562
ld d, PAL_NIDORINO
@@ -575,13 +575,13 @@ ENDC
575575
ld [W2_ForceBGPUpdate], a ; Palettes must be redrawn
576576

577577
xor a
578-
ldh [rSVBK], a
578+
ldh [rWBK], a
579579
ret
580580

581581
; used mostly for menus and the Oak intro, pokedex screen
582582
SetPal_Generic:
583583
ld a, 2
584-
ldh [rSVBK], a
584+
ldh [rWBK], a
585585

586586
ld d, PAL_REDBAR ; Red lifebar color (for pokeballs)
587587
ld e, 0
@@ -605,13 +605,13 @@ SetPal_Generic:
605605
ld [W2_ForceBGPUpdate], a
606606

607607
;xor a
608-
ldh [rSVBK], a
608+
ldh [rWBK], a
609609
ret
610610

611611
; Loading a map. Called when first loading, and when transitioning between maps.
612612
SetPal_Overworld:
613613
ld a, 2
614-
ldh [rSVBK], a
614+
ldh [rWBK], a
615615
dec a ; ld a, 1
616616
ld [W2_TileBasedPalettes], a
617617

@@ -633,7 +633,7 @@ SetPal_Overworld:
633633
CALL_INDIRECT LoadOverworldSpritePalettes
634634

635635
xor a
636-
ldh [rSVBK], a
636+
ldh [rWBK], a
637637

638638
CALL_INDIRECT LoadTilesetPalette
639639

@@ -646,15 +646,15 @@ SetPal_Overworld:
646646
.doneDelay:
647647

648648
ld a, 2
649-
ldh [rSVBK], a
649+
ldh [rWBK], a
650650

651651
; Signal to refresh palettes
652652
ld a, 1
653653
ld [W2_ForceBGPUpdate], a
654654
ld [W2_ForceOBPUpdate], a
655655

656656
xor a
657-
ldh [rSVBK], a
657+
ldh [rWBK], a
658658

659659
ld a, SET_PAL_OVERWORLD
660660
ld [wDefaultPaletteCommand], a
@@ -663,7 +663,7 @@ SetPal_Overworld:
663663
; Open pokemon menu
664664
SetPal_PartyMenu:
665665
ld a, 2
666-
ldh [rSVBK], a
666+
ldh [rWBK], a
667667

668668
CALL_INDIRECT LoadOverworldSpritePalettes
669669

@@ -704,7 +704,7 @@ SetPal_PartyMenu:
704704
ld [W2_StaticPaletteMapChanged], a
705705
xor a
706706
ld [W2_TileBasedPalettes], a
707-
ldh [rSVBK], a
707+
ldh [rWBK], a
708708
ret
709709

710710

@@ -732,7 +732,7 @@ SetPal_PokemonWholeScreen:
732732
.loadPalette
733733
ld d, a
734734
ld a, 2
735-
ldh [rSVBK], a
735+
ldh [rWBK], a
736736

737737
ld e, 0
738738
farcall LoadSGBPalette
@@ -777,14 +777,14 @@ SetPal_PokemonWholeScreen:
777777
ld [W2_StaticPaletteMapChanged], a
778778

779779
xor a
780-
ldh [rSVBK], a
780+
ldh [rWBK], a
781781
ret
782782

783783

784784
; Called as the game starts up
785785
SetPal_GameFreakIntro:
786786
ld a, $02
787-
ldh [rSVBK], a
787+
ldh [rWBK], a
788788

789789
; Load "INTRO_GRAY" palette from map_palettes.asm
790790
ld hl, MapPalettes + INTRO_GRAY * 4
@@ -829,13 +829,13 @@ SetPal_GameFreakIntro:
829829
ld [W2_UseOBP1], a
830830

831831
xor a
832-
ldh [rSVBK], a
832+
ldh [rWBK], a
833833
ret
834834

835835
; Trainer card
836836
SetPal_TrainerCard:
837837
ld a, 2
838-
ldh [rSVBK], a
838+
ldh [rWBK], a
839839

840840
ld d, PAL_MEWMON
841841
ld e, 0
@@ -888,14 +888,14 @@ ENDC
888888

889889
ld a, 1
890890
ld [W2_ForceBGPUpdate], a ; Signal to update palettes
891-
ldh [rSVBK], a
891+
ldh [rWBK], a
892892
ret
893893

894894

895895
; Clear colors after titlescreen
896896
SetPal_OakIntro:
897897
ld a, 2
898-
ldh [rSVBK], a
898+
ldh [rWBK], a
899899

900900
ld bc, 20 * 18
901901
ld hl, W2_TilesetPaletteMap
@@ -914,21 +914,21 @@ SetPal_OakIntro:
914914
ld [W2_StaticPaletteMapChanged], a
915915

916916
xor a
917-
ldh [rSVBK], a
917+
ldh [rWBK], a
918918
ret
919919

920920
; Name entry
921921
; Deals with sprites for the pokemon naming screen
922922
SetPal_NameEntry:
923923
ld a, 2
924-
ldh [rSVBK], a
924+
ldh [rWBK], a
925925

926926
CALL_INDIRECT LoadOverworldSpritePalettes
927927

928928
CALL_INDIRECT ClearSpritePaletteMap
929929

930930
xor a
931-
ldh [rSVBK], a
931+
ldh [rWBK], a
932932
ret
933933

934934

color/draw_hud_pokeball_gfx.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LoadPartyPokeballGfx:
99
CALL_INDIRECT LoadOverworldSpritePalettes
1010

1111
ld a, 2
12-
ldh [rSVBK], a
12+
ldh [rWBK], a
1313

1414
; Set the palette the pokeball sprite uses
1515
ld hl, W2_SpritePaletteMap + $31
@@ -20,7 +20,7 @@ LoadPartyPokeballGfx:
2020
ld [hli], a
2121

2222
xor a
23-
ldh [rSVBK], a
23+
ldh [rWBK], a
2424

2525
jp LoadPartyPokeballGfx_orig
2626

0 commit comments

Comments
 (0)