summaryrefslogtreecommitdiff
path: root/src/engine/gfx/default_palettes.asm
diff options
context:
space:
mode:
authorDaniel Harding <33dannye@gmail.com>2021-11-15 13:31:15 -0600
committerGitHub <noreply@github.com>2021-11-15 13:31:15 -0600
commitf516a91f5fa02a741631c77b9097598f466d1328 (patch)
treebac2ee5e3fad02983b061580f5c085baecb5439a /src/engine/gfx/default_palettes.asm
parent15e986d374fdd11ed0f412fbdc9b858d4c4b9f50 (diff)
parent1fd16cd27fcd4f432bfc09fc5b7a262798b72430 (diff)
Merge pull request #114 from ElectroDeoxys/masterHEADmaster
Some more bank splitting
Diffstat (limited to 'src/engine/gfx/default_palettes.asm')
-rw-r--r--src/engine/gfx/default_palettes.asm33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/engine/gfx/default_palettes.asm b/src/engine/gfx/default_palettes.asm
new file mode 100644
index 0000000..f479997
--- /dev/null
+++ b/src/engine/gfx/default_palettes.asm
@@ -0,0 +1,33 @@
+Func_12871:
+ call ZeroObjectPositions
+ ld a, $01
+ ld [wVBlankOAMCopyToggle], a
+ call Set_OBJ_8x8
+ call SetDefaultPalettes
+ xor a
+ ldh [hSCX], a
+ ldh [hSCY], a
+ ldh [hWX], a
+ ldh [hWY], a
+ call SetWindowOff
+ ret
+
+; same as SetDefaultConsolePalettes
+; but forces all wBGP, wOBP0 and wOBP1
+; to be the default
+SetDefaultPalettes:
+ push hl
+ push bc
+ push de
+ ld a, %11100100
+ ld [wBGP], a
+ ld [wOBP0], a
+ ld [wOBP1], a
+ ld a, 4
+ ld [wTextBoxFrameType], a
+ bank1call SetDefaultConsolePalettes
+ call FlushAllPalettes
+ pop de
+ pop bc
+ pop hl
+ ret