mirror of https://github.com/zeldaret/tmc.git
Match sub_080ADDD8
This commit is contained in:
parent
430bcd5493
commit
eb2cf39bcf
|
@ -1,39 +0,0 @@
|
||||||
.syntax unified
|
|
||||||
push {lr}
|
|
||||||
adds r2, r1, #0
|
|
||||||
lsls r1, r0, #1
|
|
||||||
adds r1, r1, r0
|
|
||||||
lsls r1, r1, #2
|
|
||||||
ldr r0, _080ADDFC @ =gUnk_02024494
|
|
||||||
adds r3, r1, r0
|
|
||||||
ldr r0, _080ADE00 @ =0x00FFFFFC
|
|
||||||
ands r0, r2
|
|
||||||
ldr r1, _080ADE04 @ =gGlobalGfxAndPalettes
|
|
||||||
adds r0, r0, r1
|
|
||||||
str r0, [r3, #8]
|
|
||||||
movs r0, #1
|
|
||||||
ands r0, r2
|
|
||||||
cmp r0, #0
|
|
||||||
beq _080ADE0C
|
|
||||||
ldr r0, _080ADE08 @ =0x0000FFFF
|
|
||||||
b _080ADE14
|
|
||||||
.align 2, 0
|
|
||||||
_080ADDFC: .4byte gUnk_02024494
|
|
||||||
_080ADE00: .4byte 0x00FFFFFC
|
|
||||||
_080ADE04: .4byte gGlobalGfxAndPalettes
|
|
||||||
_080ADE08: .4byte 0x0000FFFF
|
|
||||||
_080ADE0C:
|
|
||||||
movs r0, #0xfe
|
|
||||||
lsls r0, r0, #0x17
|
|
||||||
ands r0, r2
|
|
||||||
lsrs r0, r0, #0x14
|
|
||||||
_080ADE14:
|
|
||||||
strh r0, [r3, #6]
|
|
||||||
ldrb r0, [r3]
|
|
||||||
movs r1, #0xf
|
|
||||||
ands r1, r0
|
|
||||||
movs r0, #0x30
|
|
||||||
orrs r1, r0
|
|
||||||
strb r1, [r3]
|
|
||||||
pop {pc}
|
|
||||||
.syntax divided
|
|
11
src/vram.c
11
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];
|
GfxSlot* slot = &gGFXSlots.slots[index];
|
||||||
|
u32 temp;
|
||||||
slot->palettePointer = gGlobalGfxAndPalettes + (paletteIndex & 0xfffffc);
|
slot->palettePointer = gGlobalGfxAndPalettes + (paletteIndex & 0xfffffc);
|
||||||
if ((paletteIndex & 1) != 0) {
|
if ((paletteIndex & 1) != 0) {
|
||||||
slot->paletteIndex = 0xffff;
|
temp = 0xffff;
|
||||||
} else {
|
} else {
|
||||||
// TODO some cast here?
|
// @ TODO probably a bitfield
|
||||||
slot->paletteIndex = ((paletteIndex)&0x7f00) >> 4;
|
temp = ((paletteIndex)&0x7f000000) >> 0x14;
|
||||||
}
|
}
|
||||||
|
slot->paletteIndex = temp;
|
||||||
slot->vramStatus = GFX_VRAM_3;
|
slot->vramStatus = GFX_VRAM_3;
|
||||||
}
|
}
|
||||||
END_NONMATCH
|
|
||||||
|
|
||||||
void sub_080ADE24(void) {
|
void sub_080ADE24(void) {
|
||||||
u32 index;
|
u32 index;
|
||||||
|
|
Loading…
Reference in New Issue