summaryrefslogtreecommitdiff
path: root/src/vram.c
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-06-29 14:16:31 +0300
committerTal Hayon <talhayon1@gmail.com>2022-06-29 14:16:31 +0300
commiteb2cf39bcf574f075853963a37bf0bfd2e89faed (patch)
treee8fbbf488b5d5033fc7503f2baf3120ef8da51f1 /src/vram.c
parent430bcd5493f71c0576aa92f4e7722e74c892d9d2 (diff)
Match sub_080ADDD8
Diffstat (limited to 'src/vram.c')
-rw-r--r--src/vram.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vram.c b/src/vram.c
index 916a90e7..77a4f325 100644
--- a/src/vram.c
+++ b/src/vram.c
@@ -64,18 +64,19 @@ void sub_080ADD70(void) {
}
}
-NONMATCH("asm/non_matching/vram/sub_080ADDD8.inc", void sub_080ADDD8(u32 index, u32 paletteIndex)) {
+void sub_080ADDD8(u32 index, u32 paletteIndex) {
GfxSlot* slot = &gGFXSlots.slots[index];
+ u32 temp;
slot->palettePointer = gGlobalGfxAndPalettes + (paletteIndex & 0xfffffc);
if ((paletteIndex & 1) != 0) {
- slot->paletteIndex = 0xffff;
+ temp = 0xffff;
} else {
- // TODO some cast here?
- slot->paletteIndex = ((paletteIndex)&0x7f00) >> 4;
+ // @ TODO probably a bitfield
+ temp = ((paletteIndex)&0x7f000000) >> 0x14;
}
+ slot->paletteIndex = temp;
slot->vramStatus = GFX_VRAM_3;
}
-END_NONMATCH
void sub_080ADE24(void) {
u32 index;