mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-03 18:03:40 -04:00
Import data + bss (#1676)
* extract gfxprint font data as blobs * Remove font from fault_drawer out name * audio heap bss * audio sequence bss * audio session config bss * Move code_801D1E80 down in the spec * Gfxprint don't just include generated c file
This commit is contained in:
@@ -1396,6 +1396,9 @@ typedef struct {
|
||||
/* 0xC */ u8 newMedium;
|
||||
} StorageChange; // size = 0x10
|
||||
|
||||
s32 D_801FD120;
|
||||
static s32 sBssPad[3];
|
||||
|
||||
void AudioHeap_ChangeStorage(StorageChange* change, Sample* sample) {
|
||||
if ((sample != NULL) && ((sample->medium == change->newMedium) || (D_801FD120 != 1)) &&
|
||||
((sample->medium == MEDIUM_RAM) || (D_801FD120 != 0))) {
|
||||
|
||||
@@ -24,6 +24,14 @@
|
||||
AudioSeq_ProcessSeqCmd((SEQCMD_OP_SET_SEQPLAYER_VOLUME << 28) | ((u8)(seqPlayerIndex) << 24) | \
|
||||
((u8)(duration) << 16) | ((u8)((volume)*127.0f)));
|
||||
|
||||
SeqRequest sSeqRequests[5][5];
|
||||
u8 sNumSeqRequests[5];
|
||||
u32 sAudioSeqCmds[0x100];
|
||||
ActiveSequence gActiveSeqs[5];
|
||||
u8 sResetAudioHeapTimer;
|
||||
u16 sResetAudioHeapFadeReverbVolume;
|
||||
u16 sResetAudioHeapFadeReverbVolumeStep;
|
||||
|
||||
u8 sSeqCmdWritePos = 0;
|
||||
u8 sSeqCmdReadPos = 0;
|
||||
u8 sStartSeqDisabled = 0;
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
#include "global.h"
|
||||
#include "buffers.h"
|
||||
|
||||
static s32 sBssPad[36];
|
||||
AudioContext gAudioCtx;
|
||||
AudioCustomUpdateFunction gAudioCustomUpdateFunction;
|
||||
AudioCustomSeqFunction gAudioCustomSeqFunction;
|
||||
AudioCustomReverbFunction gAudioCustomReverbFunction;
|
||||
AudioCustomSynthFunction gAudioCustomSynthFunction;
|
||||
static s32 sBssPad2[3];
|
||||
|
||||
const s16 gAudioTatumInit[] = {
|
||||
0x1C00, // unused
|
||||
TATUMS_PER_BEAT, // gTatumsPerBeat
|
||||
|
||||
+17
-7
@@ -7,11 +7,21 @@
|
||||
#define GFXP_FLAG_ENLARGE (1 << 6)
|
||||
#define GFXP_FLAG_OPEN (1 << 7)
|
||||
|
||||
//! TODO: Need to extract
|
||||
extern u16 sGfxPrintFontTLUT[64];
|
||||
extern u16 sGfxPrintRainbowTLUT[16];
|
||||
extern u8 sGfxPrintRainbowData[8];
|
||||
extern u8 sGfxPrintFontData[2048];
|
||||
u64 sGfxPrintFontTLUT[] = {
|
||||
#include "assets/boot/gfxprint/gfx_print_font_tlut.rgba16.inc.c"
|
||||
};
|
||||
|
||||
u64 sGfxPrintRainbowTLUT[] = {
|
||||
#include "assets/boot/gfxprint/gfx_print_rainbow_tlut.rgba16.inc.c"
|
||||
};
|
||||
|
||||
u8 sGfxPrintRainbowFont[] = {
|
||||
#include "assets/boot/gfxprint/sGfxPrintRainbowFont.bin.inc.c"
|
||||
};
|
||||
|
||||
u8 sGfxPrintFont[] = {
|
||||
#include "assets/boot/gfxprint/sGfxPrintFont.bin.inc.c"
|
||||
};
|
||||
|
||||
void GfxPrint_Setup(GfxPrint* this) {
|
||||
s32 width = 16;
|
||||
@@ -24,7 +34,7 @@ void GfxPrint_Setup(GfxPrint* this) {
|
||||
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
|
||||
G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2);
|
||||
gDPSetCombineMode(this->dList++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
gDPLoadTextureBlock_4b(this->dList++, sGfxPrintFontData, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
gDPLoadTextureBlock_4b(this->dList++, sGfxPrintFont, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gDPLoadTLUT(this->dList++, 64, 256, sGfxPrintFontTLUT);
|
||||
|
||||
@@ -36,7 +46,7 @@ void GfxPrint_Setup(GfxPrint* this) {
|
||||
|
||||
gDPSetColor(this->dList++, G_SETPRIMCOLOR, this->color.rgba);
|
||||
|
||||
gDPLoadMultiTile_4b(this->dList++, sGfxPrintRainbowData, 0, 1, G_IM_FMT_CI, 2, 8, 0, 0, 1, 7, 4,
|
||||
gDPLoadMultiTile_4b(this->dList++, sGfxPrintRainbowFont, 0, 1, G_IM_FMT_CI, 2, 8, 0, 0, 1, 7, 4,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 1, 3, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gDPLoadTLUT(this->dList++, 16, 320, sGfxPrintRainbowTLUT);
|
||||
|
||||
Reference in New Issue
Block a user