@@ -4,7 +4,7 @@ SECTION "bank1C_extension", ROMX
4
4
; Set all palettes to black at beginning of battle
5
5
SetPal_BattleBlack:
6
6
ld a , $ 02
7
- ldh [ rSVBK ], a
7
+ ldh [ rWBK ], a
8
8
9
9
ld d , PAL_BLACK
10
10
ld e , 7
@@ -25,7 +25,7 @@ SetPal_BattleBlack:
25
25
ld [ W2_ForceOBPUpdate ], a
26
26
27
27
xor a
28
- ldh [ rSVBK ], a
28
+ ldh [ rWBK ], a
29
29
ret
30
30
31
31
@@ -47,11 +47,11 @@ SetPal_BattleAfterBlack:
47
47
; Update palettes (AFTER frame delay, so the tilemap is updated after player/enemy
48
48
; scroll in)
49
49
ld a , 2
50
- ldh [ rSVBK ], a
50
+ ldh [ rWBK ], a
51
51
ld a , 1
52
52
ld [ W2_ForceBGPUpdate ], a
53
53
ld [ W2_ForceOBPUpdate ], a
54
- ldh [ rSVBK ], a
54
+ ldh [ rWBK ], a
55
55
ret
56
56
57
57
; Set proper palettes for pokemon/trainers. Called a lot during battle, like when the
@@ -61,11 +61,11 @@ SetPal_Battle:
61
61
62
62
; Update palettes (BEFORE frame delay, so lifebars get updated snappily)
63
63
ld a , 2
64
- ldh [ rSVBK ], a
64
+ ldh [ rWBK ], a
65
65
ld a , 1
66
66
ld [ W2_ForceBGPUpdate ], a
67
67
ld [ W2_ForceOBPUpdate ], a
68
- ldh [ rSVBK ], a
68
+ ldh [ rWBK ], a
69
69
70
70
; Wait 3 frames (if LCD is on) to allow tilemap updates to apply. Prevents garbage
71
71
; from appearing after closing pokemon menu.
@@ -84,11 +84,11 @@ SetPal_Battle_Common:
84
84
85
85
; If transformed, don't trust the "DetermineBackSpritePaletteID" function.
86
86
ld a , $ 02
87
- ldh [ rSVBK ], a
87
+ ldh [ rWBK ], a
88
88
ld a , [ W2_BattleMonPalette ]
89
89
ld b , a
90
90
xor a
91
- ldh [ rSVBK ], a
91
+ ldh [ rWBK ], a
92
92
jr .getEnemyMonPal
93
93
94
94
.getBattleMonPal
@@ -102,7 +102,7 @@ SetPal_Battle_Common:
102
102
ld c , a
103
103
104
104
ld a , $ 02
105
- ldh [ rSVBK ], a
105
+ ldh [ rWBK ], a
106
106
107
107
; Save the player mon's palette in case it transforms later
108
108
ld a , b
206
206
ld [ W2_StaticPaletteMapChanged ], a
207
207
208
208
xor a
209
- ldh [ rSVBK ], a
209
+ ldh [ rWBK ], a
210
210
211
211
ld a , SET_PAL_BATTLE
212
212
ld [ wDefaultPaletteCommand ], a
@@ -240,7 +240,7 @@ FillBox:
240
240
; Load town map
241
241
SetPal_TownMap:
242
242
ld a , 2
243
- ldh [ rSVBK ], a
243
+ ldh [ rWBK ], a
244
244
245
245
ld d , PAL_TOWNMAP
246
246
ld e , 0
@@ -263,7 +263,7 @@ SetPal_TownMap:
263
263
ld [ hl ], 1
264
264
265
265
xor a
266
- ldh [ rSVBK ], a
266
+ ldh [ rWBK ], a
267
267
ret
268
268
269
269
; Status screen
@@ -277,7 +277,7 @@ SetPal_StatusScreen:
277
277
ld b , a
278
278
279
279
ld a , 2
280
- ldh [ rSVBK ], a
280
+ ldh [ rWBK ], a
281
281
282
282
push bc
283
283
@@ -346,7 +346,7 @@ IF GEN_2_GRAPHICS
346
346
ENDC
347
347
348
348
xor a
349
- ldh [ rSVBK ], a
349
+ ldh [ rWBK ], a
350
350
ret
351
351
352
352
; Show pokedex data
@@ -357,7 +357,7 @@ SetPal_Pokedex:
357
357
ld e , 0
358
358
359
359
ld a , 2
360
- ldh [ rSVBK ], a
360
+ ldh [ rWBK ], a
361
361
362
362
farcall LoadSGBPalette
363
363
@@ -402,13 +402,13 @@ ENDC
402
402
ld [ W2_TileBasedPalettes ], a
403
403
404
404
;xor a
405
- ldh [ rSVBK ], a
405
+ ldh [ rWBK ], a
406
406
ret
407
407
408
408
; Slots
409
409
SetPal_Slots:
410
410
ld a , 2
411
- ldh [ rSVBK ], a
411
+ ldh [ rWBK ], a
412
412
413
413
ld d , PAL_SLOTS1
414
414
ld e , 0
@@ -452,7 +452,7 @@ SetPal_Slots:
452
452
call FarCopyData
453
453
454
454
xor a
455
- ldh [ rSVBK ], a
455
+ ldh [ rWBK ], a
456
456
457
457
; Wait 3 frames to allow tilemap updates to apply.
458
458
; Prevents garbage from appearing when the slots machine open.
@@ -466,7 +466,7 @@ SetPal_TitleScreen:
466
466
ld e , 0
467
467
468
468
ld a , 2
469
- ldh [ rSVBK ], a
469
+ ldh [ rWBK ], a
470
470
471
471
farcall LoadSGBPalette
472
472
525
525
ld [ W2_ForceBGPUpdate ], a ; Palettes must be redrawn
526
526
527
527
;ld a, 1
528
- ldh [ rSVBK ], a
528
+ ldh [ rWBK ], a
529
529
530
530
; This fixes the text at the bottom being the wrong color for a second or so.
531
531
; It's a real hack, but the game's using two vram maps at once, and the color code
556
556
; Called during the intro
557
557
SetPal_NidorinoIntro:
558
558
ld a , 2
559
- ldh [ rSVBK ], a
559
+ ldh [ rWBK ], a
560
560
561
561
IF GEN_2_GRAPHICS
562
562
ld d , PAL_NIDORINO
@@ -575,13 +575,13 @@ ENDC
575
575
ld [ W2_ForceBGPUpdate ], a ; Palettes must be redrawn
576
576
577
577
xor a
578
- ldh [ rSVBK ], a
578
+ ldh [ rWBK ], a
579
579
ret
580
580
581
581
; used mostly for menus and the Oak intro, pokedex screen
582
582
SetPal_Generic:
583
583
ld a , 2
584
- ldh [ rSVBK ], a
584
+ ldh [ rWBK ], a
585
585
586
586
ld d , PAL_REDBAR ; Red lifebar color (for pokeballs)
587
587
ld e , 0
@@ -605,13 +605,13 @@ SetPal_Generic:
605
605
ld [ W2_ForceBGPUpdate ], a
606
606
607
607
;xor a
608
- ldh [ rSVBK ], a
608
+ ldh [ rWBK ], a
609
609
ret
610
610
611
611
; Loading a map. Called when first loading, and when transitioning between maps.
612
612
SetPal_Overworld:
613
613
ld a , 2
614
- ldh [ rSVBK ], a
614
+ ldh [ rWBK ], a
615
615
dec a ; ld a, 1
616
616
ld [ W2_TileBasedPalettes ], a
617
617
@@ -633,7 +633,7 @@ SetPal_Overworld:
633
633
CALL_INDIRECT LoadOverworldSpritePalettes
634
634
635
635
xor a
636
- ldh [ rSVBK ], a
636
+ ldh [ rWBK ], a
637
637
638
638
CALL_INDIRECT LoadTilesetPalette
639
639
@@ -646,15 +646,15 @@ SetPal_Overworld:
646
646
.doneDelay:
647
647
648
648
ld a , 2
649
- ldh [ rSVBK ], a
649
+ ldh [ rWBK ], a
650
650
651
651
; Signal to refresh palettes
652
652
ld a , 1
653
653
ld [ W2_ForceBGPUpdate ], a
654
654
ld [ W2_ForceOBPUpdate ], a
655
655
656
656
xor a
657
- ldh [ rSVBK ], a
657
+ ldh [ rWBK ], a
658
658
659
659
ld a , SET_PAL_OVERWORLD
660
660
ld [ wDefaultPaletteCommand ], a
@@ -663,7 +663,7 @@ SetPal_Overworld:
663
663
; Open pokemon menu
664
664
SetPal_PartyMenu:
665
665
ld a , 2
666
- ldh [ rSVBK ], a
666
+ ldh [ rWBK ], a
667
667
668
668
CALL_INDIRECT LoadOverworldSpritePalettes
669
669
@@ -704,7 +704,7 @@ SetPal_PartyMenu:
704
704
ld [ W2_StaticPaletteMapChanged ], a
705
705
xor a
706
706
ld [ W2_TileBasedPalettes ], a
707
- ldh [ rSVBK ], a
707
+ ldh [ rWBK ], a
708
708
ret
709
709
710
710
@@ -732,7 +732,7 @@ SetPal_PokemonWholeScreen:
732
732
.loadPalette
733
733
ld d , a
734
734
ld a , 2
735
- ldh [ rSVBK ], a
735
+ ldh [ rWBK ], a
736
736
737
737
ld e , 0
738
738
farcall LoadSGBPalette
@@ -777,14 +777,14 @@ SetPal_PokemonWholeScreen:
777
777
ld [ W2_StaticPaletteMapChanged ], a
778
778
779
779
xor a
780
- ldh [ rSVBK ], a
780
+ ldh [ rWBK ], a
781
781
ret
782
782
783
783
784
784
; Called as the game starts up
785
785
SetPal_GameFreakIntro:
786
786
ld a , $ 02
787
- ldh [ rSVBK ], a
787
+ ldh [ rWBK ], a
788
788
789
789
; Load "INTRO_GRAY" palette from map_palettes.asm
790
790
ld hl , MapPalettes + INTRO_GRAY * 4
@@ -829,13 +829,13 @@ SetPal_GameFreakIntro:
829
829
ld [ W2_UseOBP1 ], a
830
830
831
831
xor a
832
- ldh [ rSVBK ], a
832
+ ldh [ rWBK ], a
833
833
ret
834
834
835
835
; Trainer card
836
836
SetPal_TrainerCard:
837
837
ld a , 2
838
- ldh [ rSVBK ], a
838
+ ldh [ rWBK ], a
839
839
840
840
ld d , PAL_MEWMON
841
841
ld e , 0
@@ -888,14 +888,14 @@ ENDC
888
888
889
889
ld a , 1
890
890
ld [ W2_ForceBGPUpdate ], a ; Signal to update palettes
891
- ldh [ rSVBK ], a
891
+ ldh [ rWBK ], a
892
892
ret
893
893
894
894
895
895
; Clear colors after titlescreen
896
896
SetPal_OakIntro:
897
897
ld a , 2
898
- ldh [ rSVBK ], a
898
+ ldh [ rWBK ], a
899
899
900
900
ld bc , 20 * 18
901
901
ld hl , W2_TilesetPaletteMap
@@ -914,21 +914,21 @@ SetPal_OakIntro:
914
914
ld [ W2_StaticPaletteMapChanged ], a
915
915
916
916
xor a
917
- ldh [ rSVBK ], a
917
+ ldh [ rWBK ], a
918
918
ret
919
919
920
920
; Name entry
921
921
; Deals with sprites for the pokemon naming screen
922
922
SetPal_NameEntry:
923
923
ld a , 2
924
- ldh [ rSVBK ], a
924
+ ldh [ rWBK ], a
925
925
926
926
CALL_INDIRECT LoadOverworldSpritePalettes
927
927
928
928
CALL_INDIRECT ClearSpritePaletteMap
929
929
930
930
xor a
931
- ldh [ rSVBK ], a
931
+ ldh [ rWBK ], a
932
932
ret
933
933
934
934
0 commit comments