mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-31 17:31:43 -04:00
Decompile z_kanfont
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
void func_800F4F40(UNK_TYPE a0, UNK_TYPE a1, UNK_TYPE a2) {
|
||||
|
||||
}
|
||||
|
||||
void func_800F4F54(s800F4F54* a0, u8 a1, UNK_TYPE a2) {
|
||||
u32 arg0 = (u32)a0 + a0->unk167F8 * (15 * 1024) + a2 + 19056;
|
||||
u32 arg1 = ((a1 * 128) - 4096) + (u32)&D_00ACC000;
|
||||
func_80080C90(arg0, arg1, 128);
|
||||
}
|
||||
|
||||
void func_800F4FC0(UNK_TYPE a0, u16 a1) {
|
||||
func_80080C90(a0 + 30720, (a1 * 128 + 20480) + (u32)&D_00AC4000, 128);
|
||||
}
|
||||
|
||||
void func_800F5004(UNK_TYPE a0) {
|
||||
u8* s0 = D_801BDB30;
|
||||
u32 s1 = a0 + 30848;
|
||||
u32 v1;
|
||||
|
||||
while (1) {
|
||||
v1 = (*s0)*128;
|
||||
if (*s0 == 0) {
|
||||
v1 = 0;
|
||||
}
|
||||
func_80080C90(s1, v1 + (u32)&D_00AC4000, 128);
|
||||
s1 += 128;
|
||||
if (*s0 == 140) break;
|
||||
s0++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
void Kanfont_Nop800F4F40(GlobalContext* ctxt, UNK_TYPE param_2, UNK_TYPE param_3) {}
|
||||
|
||||
void Kanfont_LoadAsciiChar(GlobalContext* ctxt, u8 character, s32 iParm3) {
|
||||
Dmamgr_SendRequestAndWait((u32)ctxt->msgContext.font.unk0[(ctxt->msgContext).unk11EF0] + iParm3,
|
||||
(u32)&nes_font_static_vrom_start + character * 0x80 - 0x1000,
|
||||
0x80);
|
||||
}
|
||||
|
||||
void Kanfont_LoadMessageBoxEnd(Font* font, u16 type) {
|
||||
Dmamgr_SendRequestAndWait((u32)font->unk7800, type * 0x80 + (u32)&message_static_vrom_start + 0x5000, 0x80);
|
||||
}
|
||||
|
||||
void Kanfont_LoadOrderedFont(Font* font) {
|
||||
u32 loadOffset;
|
||||
s32 codePointIndex = 0;
|
||||
u32 writeLocation;
|
||||
|
||||
while (1) {
|
||||
writeLocation = (u32)&font->unk7800[codePointIndex + 1];
|
||||
loadOffset = kanfontOrdering[codePointIndex] * 128;
|
||||
if (kanfontOrdering[codePointIndex] == 0) {
|
||||
loadOffset = 0;
|
||||
}
|
||||
Dmamgr_SendRequestAndWait(writeLocation, (u32)&nes_font_static_vrom_start + loadOffset, 0x80);
|
||||
if (kanfontOrdering[codePointIndex] == 140) break;
|
||||
codePointIndex++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user