sub_80094EC

This commit is contained in:
PikalaxALT 2017-11-07 21:45:44 -05:00
parent fce326fbd4
commit 59eb766f47
4 changed files with 29 additions and 75 deletions

View file

@ -5,62 +5,6 @@
.text
thumb_func_start sub_80094EC
sub_80094EC: @ 80094EC
push {r4-r6,lr}
mov r6, r8
push {r6}
mov r8, r0
adds r6, r1, 0
adds r4, r2, 0
adds r5, r3, 0
lsls r0, 24
lsrs r0, 24
mov r8, r0
lsls r6, 24
lsrs r6, 24
lsls r4, 24
lsrs r4, 24
lsls r5, 24
lsrs r5, 24
ldr r0, =gLinkTestDigitsPal
mov r2, r8
lsls r1, r2, 4
movs r2, 0x20
bl LoadPalette
ldr r2, =0x040000d4
ldr r0, =gLinkTestDigitsGfx
str r0, [r2]
lsls r0, r5, 14
movs r1, 0xC0
lsls r1, 19
adds r0, r1
str r0, [r2, 0x4]
ldr r0, =0x80000110
str r0, [r2, 0x8]
ldr r0, [r2, 0x8]
ldr r0, =gUnknown_03003130
str r4, [r0]
mov r1, r8
str r1, [r0, 0x4]
movs r1, 0
str r1, [r0, 0x8]
ldr r0, =gUnknown_082ED1D0
adds r6, r0
ldrb r0, [r6]
lsls r4, 8
lsls r5, 2
orrs r4, r5
adds r1, r4, 0
bl SetGpuReg
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_80094EC
thumb_func_start sub_8009570
sub_8009570: @ 8009570
push {r4,lr}

View file

@ -5,26 +5,7 @@
.section .rodata
.string "{HIGHLIGHT TRANSPARENT}{COLOR WHITE}$"
.align 2
g2BlankTilesGfx:: @ 82ED168
.incbin "graphics/interface/blank_1x2.4bpp"
gUnknown_082ED1A8:: @ 82ED1A8
.4byte gUnknown_020228C4
.4byte 0x000000C8
.4byte gUnknown_020228C4
.4byte 0x000000C8
.4byte gUnknown_020228C4
.4byte 0x00000064
.4byte gUnknown_020228C4
.4byte 0x000000DC
.4byte gUnknown_020228C4
.4byte 0x00000028
gUnknown_082ED1D0:: @ 82ED1D0
.byte 0x8, 0xA, 0xC, 0xE
gASCIIGameFreakInc:: @ 82ED1D4
.ascii "GameFreak inc."

View file

@ -132,6 +132,7 @@ extern const struct BlockRequest sBlockRequestLookupTable[5];
extern struct Link gLink;
extern u16 gRecvCmds[CMD_LENGTH][MAX_LINK_PLAYERS];
extern u8 gUnknown_020228C4[BLOCK_BUFFER_SIZE]; // gBlockSendBuffer
extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE];
extern u16 gLinkType;
extern u32 gLinkStatus;

View file

@ -67,6 +67,24 @@ const u8 gWirelessLinkDisplayGfx[] = INCBIN_U8("graphics/interface/wireless_link
const u8 gWirelessLinkDisplayTilemap[] = INCBIN_U8("graphics/interface/wireless_link_display.bin.lz");
const u16 gLinkTestDigitsPal[] = INCBIN_U16("graphics/interface/link_test_digits.gbapal");
const u16 gLinkTestDigitsGfx[] = INCBIN_U16("graphics/interface/link_test_digits.4bpp");
const u8 unkstring_82ed160[] = _("{HIGHLIGHT TRANSPARENT}{COLOR WHITE}");
const u16 g2BlankTilesGfx[] = INCBIN_U16("graphics/interface/blank_1x2.4bpp");
const struct {
void *data;
u16 size;
} gUnknown_082ED1A8[] = {
{gUnknown_020228C4, 200},
{gUnknown_020228C4, 200},
{gUnknown_020228C4, 100},
{gUnknown_020228C4, 220},
{gUnknown_020228C4, 40}
};
const u8 gUnknown_082ED1D0[] = {
REG_OFFSET_BG0CNT,
REG_OFFSET_BG1CNT,
REG_OFFSET_BG2CNT,
REG_OFFSET_BG3CNT
};
// .text
@ -113,3 +131,13 @@ void sub_8009414(u8 a0, u8 a1, u8 a2, u8 a3, u16 a4)
SetGpuReg(REG_OFFSET_BG0HOFS + a1 * 4, 0);
SetGpuReg(REG_OFFSET_BG0VOFS + a1 * 4, 0);
}
void sub_80094EC(u8 a0, u8 a1, u8 a2, u8 a3)
{
LoadPalette(gLinkTestDigitsPal, a0 * 16, 0x20);
DmaCopy16(3, gLinkTestDigitsGfx, (u16 *)BG_CHAR_ADDR(a3), sizeof gLinkTestDigitsGfx);
gUnknown_03003130[0] = a2;
gUnknown_03003130[1] = a0;
gUnknown_03003130[2] = 0;
SetGpuReg(gUnknown_082ED1D0[a1], BGCNT_SCREENBASE(a2) | BGCNT_CHARBASE(a3));
}