summaryrefslogtreecommitdiff
path: root/home.asm
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2017-06-05 19:23:07 -0700
committerMarcus Huderle <huderlem@gmail.com>2017-06-05 19:23:07 -0700
commit323cfe148b972642a93b598828a2ed3f16af8893 (patch)
tree2269ce8b27c7e1c1b6c97d8b4a82a133e5413a58 /home.asm
parent6f42978aa6fb4cce84c68f0baeb53feb927feff0 (diff)
Some palette incbins
Diffstat (limited to 'home.asm')
-rwxr-xr-xhome.asm17
1 files changed, 12 insertions, 5 deletions
diff --git a/home.asm b/home.asm
index a1e3273..f9cf5da 100755
--- a/home.asm
+++ b/home.asm
@@ -2936,10 +2936,17 @@ Func_122e:
ld [MBC5RomBank], a
jr .asm_1238
-Func_1266:
+LoadPalettes:
+; Loads either BG or OAM palette data
+; de = pointer to palette data
+; first byte is number of colors to load
+; second byte determines BG or OAM palette data
+; third and fourth byte are a pointer to actual color data
+; fifth byte is Bank of actual color data
+; $00 marks the end of the list
ld h, d
ld l, e
-.asm_1268
+.loop
ld a, [hli]
and a
ret z
@@ -2968,18 +2975,18 @@ Func_1266:
ld l, c
ld a, [$ff94]
ld b, a
-.asm_1291
+.loadColor
ld a, [hli]
ld [de], a
ld a, [hli]
ld [de], a
dec b
- jr nz, .asm_1291
+ jr nz, .loadColor
pop hl
pop af
ld [hLoadedROMBank], a
ld [MBC5RomBank], a
- jr .asm_1268
+ jr .loop
INCLUDE "home/sgb.asm"
INCLUDE "home/serial.asm"