ref: d44f55b337b4b6e6e00ef698f656e17655694d24
parent: a7932c7d4acc1d43139d40d31077e37b2ab055f1
author: Snesrev <[email protected]>
date: Sun Oct 2 18:54:12 EDT 2022
Remove GetFontPtr()
--- a/load_gfx.c
+++ b/load_gfx.c
@@ -323,9 +323,7 @@
-1, -1, -1, -1, -1,
};
static const uint8 kMirrorWarp_LoadNext_NmiLoad[15] = {0, 14, 15, 16, 17, 0, 0, 0, 0, 0, 0, 18, 19, 20, 0};
-const uint16 *GetFontPtr() {
- return kFontData;
-}
+
static const uint8 *GetCompSpritePtr(int i) {
return kSprGfx + *(uint32 *)(kSprGfx + i * 4);
}
@@ -934,7 +932,7 @@
}
void TransferFontToVRAM() { // 80e556
- memcpy(&g_zenv.vram[0x7000], GetFontPtr(), 0x800 * sizeof(uint16));
+ memcpy(&g_zenv.vram[0x7000], kFontData, 0x800 * sizeof(uint16));
}
void Do3To4High(uint16 *vram_ptr, const uint8 *decomp_addr) { // 80e5af
--- a/load_gfx.h
+++ b/load_gfx.h
@@ -13,7 +13,6 @@
extern uint16 kGlovesColor[2];
-const uint16 *GetFontPtr();
void ApplyPaletteFilter_bounce();
void PaletteFilter_Range(int from, int to);
void PaletteFilter_IncrCountdown();
--- a/messaging.c
+++ b/messaging.c
@@ -2573,7 +2573,7 @@
vwf_arr[i + 1] = arrval + width;
uint16 r10 = (c & 0x70) * 2 + (c & 0xf);
uint16 r0 = arrval * 2;
- const uint16 *const kTextBits = GetFontPtr();
+ const uint16 *const kTextBits = kFontData;
const uint16 *src2 = kTextBits + r10 * 8;
uint8 *mbuf = (uint8 *)messaging_buf;
for (int i = 0; i != 16; i += 2) {
--- a/select_file.c
+++ b/select_file.c
@@ -169,7 +169,7 @@
Decomp_spr(&g_ram[0x14000], 0x5f);
Do3To4High(&g_zenv.vram[0x5400], &g_ram[0x14000]);
- memcpy(&g_zenv.vram[0x7000], GetFontPtr(), 0x800 * sizeof(uint16));
+ TransferFontToVRAM();
Decomp_spr(&g_ram[0x14000], 0x6b);
memcpy(&g_zenv.vram[0x7800], &g_ram[0x14000], 0x300 * sizeof(uint16));