Merge branch 'master' into z_en_tk

This commit is contained in:
glank
2020-03-21 12:31:29 +01:00
72 changed files with 994 additions and 2402 deletions
+68 -1
View File
@@ -1,5 +1,72 @@
#include <ultra64.h>
#include <global.h>
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8006C360/func_8006C360.s")
u16 D_8011F3F0[60][9] =
{
{ 0x0000, 0x7124, 0x7127, 0x7126, 0x7125, 0x7127, 0x7124, 0x7125, 0x7127 },
{ 0x0000, 0x7128, 0x7129, 0x7128, 0x7128, 0x7128, 0x7128, 0x712A, 0x712B },
{ 0x0000, 0x7128, 0x712B, 0x7128, 0x7128, 0x7129, 0x7128, 0x712B, 0x7128 },
{ 0x0000, 0x7128, 0x7129, 0x7128, 0x7128, 0x7128, 0x7128, 0x712A, 0x712B },
{ 0x0000, 0x7128, 0x7129, 0x712B, 0x7128, 0x7128, 0x7128, 0x7129, 0x7128 },
{ 0x0000, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712F },
{ 0x0000, 0x712C, 0x712C, 0x712C, 0x712E, 0x712C, 0x712C, 0x712F, 0x712F },
{ 0x0000, 0x712C, 0x712C, 0x712C, 0x712F, 0x712C, 0x712C, 0x712F, 0x712F },
{ 0x0000, 0x7130, 0x7132, 0x7133, 0x7130, 0x7130, 0x7131, 0x7132, 0x7131 },
{ 0x0000, 0x7134, 0x7137, 0x7135, 0x7134, 0x7136, 0x7135, 0x7134, 0x7135 },
{ 0x0000, 0x7138, 0x713A, 0x7138, 0x7139, 0x713A, 0x7138, 0x7139, 0x713B },
{ 0x0000, 0x7144, 0x7146, 0x7144, 0x7146, 0x7147, 0x7145, 0x7145, 0x7147 },
{ 0x0000, 0x7148, 0x7149, 0x7149, 0x714A, 0x714A, 0x714B, 0x7149, 0x714B },
{ 0x0000, 0x714C, 0x714D, 0x714C, 0x714C, 0x714E, 0x714C, 0x714E, 0x714F },
{ 0x0000, 0x7150, 0x7153, 0x7152, 0x7150, 0x7151, 0x7153, 0x7153, 0x7151 },
{ 0x0000, 0x7155, 0x7156, 0x7157, 0x7154, 0x7156, 0x7156, 0x7156, 0x7156 },
{ 0x0000, 0x715A, 0x7159, 0x715B, 0x715A, 0x715A, 0x7158, 0x7158, 0x715B },
{ 0x0000, 0x715E, 0x715D, 0x715D, 0x715F, 0x715E, 0x715C, 0x715C, 0x715D },
{ 0x0000, 0x7163, 0x7162, 0x7160, 0x7163, 0x7160, 0x7161, 0x7161, 0x7160 },
{ 0x0000, 0x7164, 0x7166, 0x7164, 0x7167, 0x7164, 0x7164, 0x7164, 0x7167 },
{ 0x0000, 0x716B, 0x7169, 0x7168, 0x716B, 0x716A, 0x716B, 0x716B, 0x716A },
{ 0x0000, 0x716C, 0x716D, 0x716F, 0x716C, 0x716E, 0x716E, 0x716E, 0x716F },
{ 0x0000, 0x7171, 0x7173, 0x7170, 0x7172, 0x0000, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x7176, 0x7177, 0x7174, 0x7174, 0x7175, 0x7174, 0x7174, 0x7177 },
{ 0x0000, 0x7178, 0x7179, 0x7179, 0x717B, 0x717A, 0x717B, 0x717A, 0x717B },
{ 0x0000, 0x717D, 0x717C, 0x717C, 0x717D, 0x717F, 0x717C, 0x717E, 0x717D },
{ 0x0000, 0x7183, 0x7181, 0x7180, 0x7183, 0x7182, 0x7183, 0x7181, 0x7183 },
{ 0x0000, 0x7184, 0x7186, 0x7185, 0x7186, 0x7184, 0x7187, 0x7186, 0x7184 },
{ 0x0000, 0x71A4, 0x71A6, 0x71A5, 0x0000, 0x71A6, 0x71A6, 0x71A6, 0x71A7 },
{ 0x0000, 0x7188, 0x7188, 0x7189, 0x7188, 0x7189, 0x718B, 0x718A, 0x7189 },
{ 0x0000, 0x718C, 0x718C, 0x718D, 0x718C, 0x718E, 0x718F, 0x718D, 0x718C },
{ 0x0000, 0x7190, 0x7190, 0x7191, 0x7192, 0x7191, 0x7193, 0x7190, 0x7191 },
{ 0x0000, 0x7196, 0x7194, 0x7195, 0x7196, 0x7197, 0x7194, 0x7196, 0x7195 },
{ 0x0000, 0x7199, 0x719A, 0x7198, 0x7198, 0x719A, 0x719A, 0x719B, 0x7198 },
{ 0x0000, 0x719D, 0x719C, 0x719E, 0x719D, 0x719D, 0x719C, 0x719F, 0x719E },
{ 0x0000, 0x71A1, 0x71A0, 0x71A1, 0x71A2, 0x71A1, 0x71A2, 0x71A3, 0x71A2 },
{ 0x0000, 0x711C, 0x711E, 0x711C, 0x711F, 0x711E, 0x711C, 0x711D, 0x711F },
{ 0x0000, 0x7104, 0x7105, 0x7107, 0x7107, 0x7105, 0x7106, 0x7107, 0x7107 },
{ 0x0000, 0x7107, 0x7105, 0x7107, 0x7107, 0x7106, 0x7107, 0x7107, 0x7105 },
{ 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 },
{ 0x0000, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7111, 0x7113 },
{ 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 },
{ 0x0000, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7113 },
{ 0x0000, 0x7101, 0x7100, 0x7102, 0x7103, 0x7101, 0x7100, 0x7102, 0x7103 },
{ 0x0000, 0x7100, 0x7102, 0x7100, 0x7100, 0x7100, 0x7100, 0x7100, 0x7102 },
{ 0x0000, 0x710A, 0x7109, 0x7109, 0x710A, 0x710B, 0x7108, 0x7109, 0x710B },
{ 0x0000, 0x7117, 0x7112, 0x7113, 0x7110, 0x710C, 0x7117, 0x710E, 0x7112 },
{ 0x0000, 0x710D, 0x710F, 0x710C, 0x7112, 0x710D, 0x710C, 0x710C, 0x710F },
{ 0x0000, 0x710A, 0x7109, 0x711A, 0x710A, 0x7109, 0x7108, 0x710B, 0x7109 },
{ 0x0000, 0x710C, 0x710F, 0x7113, 0x7110, 0x710D, 0x7112, 0x7116, 0x710D },
{ 0x0000, 0x7115, 0x7114, 0x7114, 0x7115, 0x7114, 0x7114, 0x7116, 0x7117 },
{ 0x0000, 0x7113, 0x710F, 0x7113, 0x7110, 0x710C, 0x711A, 0x710D, 0x7112 },
{ 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 },
{ 0x0000, 0x7112, 0x710E, 0x7112, 0x710E, 0x710D, 0x7112, 0x710E, 0x710F },
{ 0x0000, 0x7142, 0x7141, 0x7142, 0x7143, 0x7140, 0x7140, 0x7141, 0x7143 },
{ 0x0000, 0x713C, 0x713D, 0x713D, 0x713E, 0x713E, 0x713F, 0x713D, 0x713F },
{ 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 },
{ 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 },
{ 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x7105, 0x7105, 0x7107, 0x7107 },
{ 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x710C, 0x7105, 0x7107, 0x7107 },
};
u16 func_8006C360(GlobalContext* globalCtx, u32 idx)
{
u8 mask = func_8008F080(globalCtx);
return D_8011F3F0[idx][mask];
}
-50
View File
@@ -1,50 +0,0 @@
#include <ultra64.h>
#include <global.h>
extern u32 osResetType;
/*
void func_8007BE60(u32* a0)
{
u32 var1;
//*a0 = 0;
if (osResetType == 0)
{
a0[1] = 0;
a0[2] = 0;
a0[3] = 0;
}
else
{
var1 = a0[3] + a0[5];
a0[1]++;
a0[2] = (var1 < a0[5]) + a0[2] + a0[4];
a0[3] = var1;
}
a0[5] = 0;
a0[4] = 0;
}
*/
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8007BE60/func_8007BE60.s")
typedef struct
{
/* 0x00 */ u32 unk_00;
/* 0x04 */ char unk_04[0x0C];
/* 0x10 */ OSTime unk_10;
} struct_8007BED4;
void func_8007BED4(struct_8007BED4* arg0)
{
arg0->unk_00 = 1;
arg0->unk_10 = osGetTime();
}
u32 func_8007BF08(struct_8007BED4* arg0)
{
return arg0->unk_00;
}
-5
View File
@@ -1,5 +0,0 @@
#include <ultra64.h>
#include <global.h>
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8007BF10/func_8007BF10.s")
+4 -4
View File
@@ -7,7 +7,7 @@ u32 gScreenWidth = SCREEN_WIDTH;
u32 gScreenHeight = SCREEN_HEIGHT;
u32 gSystemHeapSize = 0;
u8* gAppNmiBufferPtr;
PreNmiBuff* gAppNmiBufferPtr;
SchedContext gSchedContext;
PadMgr gPadMgr;
IrqMgr gIrqMgr;
@@ -50,8 +50,8 @@ void Main(void* arg0)
osSyncPrintf("mainproc 実行開始\n"); //Start running
gScreenWidth = SCREEN_WIDTH;
gScreenHeight = SCREEN_HEIGHT;
gAppNmiBufferPtr = osAppNmiBuffer;
func_8007BE60(gAppNmiBufferPtr);
gAppNmiBufferPtr = (PreNmiBuff*)osAppNmiBuffer;
PreNmiBuff_Init(gAppNmiBufferPtr);
Fault_Start();
SysCfb_Init(0);
sysHeap = (u32)gSystemHeap;
@@ -112,7 +112,7 @@ void Main(void* arg0)
if (*msg == OS_SC_PRE_NMI_MSG)
{
osSyncPrintf("main.c: リセットされたみたいだよ\n"); //Looks like it's been reset
func_8007BED4(gAppNmiBufferPtr);
PreNmiBuff_SetReset(gAppNmiBufferPtr);
}
}
+4 -4
View File
@@ -1,21 +1,21 @@
#include <global.h>
u32 func_800D2DF0()
u32 SysUcode_GetUCodeBoot()
{
return &D_80009320;
}
u32 func_800D2DFC()
u32 SysUcode_GetUcodeBootSize()
{
return (u32)&D_800093F0 - (u32)&D_80009320;
}
u32 func_800D2E14()
u32 SysUcode_GetUcode()
{
return D_8012DBA0;
}
u32 func_800D2E20()
u32 SysUcode_GetUcodeData()
{
return D_8012DBA4;
}
+1 -1
View File
@@ -6,7 +6,7 @@ void TitleSetup_InitImpl(GameState* gameState)
osSyncPrintf("ゼルダ共通データ初期化\n");
SaveContext_Init();
gameState->running = false;
gameState->init = func_80800878; gameState->size = sizeof(TitleContext);
gameState->init = Title_Init; gameState->size = sizeof(TitleContext);
}
void TitleSetup_Destroy(GameState* gameState)
+295 -6
View File
@@ -1,20 +1,309 @@
#include <ultra64.h>
#include <global.h>
#include <z64.h>
#include <color.h>
#include <regs.h>
#include <PR/os_cont.h>
#pragma GLOBAL_ASM("asm/non_matchings/code/z_debug/func_800636C0.s")
typedef struct
{
u8 x;
u8 y;
u8 colorId;
char text[0x15];
} PrintTextBuffer;
void func_8006375C(UNK_TYPE arg0, UNK_TYPE arg1, UNK_TYPE arg2)
typedef struct
{
u16 push;
u16 held;
} InputCombo;
GameInfo* gGameInfo;
int D_8015FA94; //no known symbols
PrintTextBuffer D_8015FA98[0x16];
s16 D_8011E0B0 = 0; //PrintTextBuffer index
Color_RGBA8 printTextColors[] = {
{ 0xFF, 0xFF, 0x20, 0xC0 },
{ 0xFF, 0x96, 0x80, 0xC0 },
{ 0x80, 0x60, 0x00, 0x40 },
{ 0xC0, 0x80, 0x10, 0x80 },
{ 0xFF, 0xC0, 0x20, 0x80 },
{ 0xE6, 0xE6, 0xDC, 0x40 },
{ 0x80, 0x96, 0xFF, 0x80 },
{ 0x80, 0xFF, 0x20, 0x80 },
};
InputCombo inputCombos[REG_GROUPS] = {
{ L_TRIG, U_CBUTTONS },
{ L_TRIG, L_CBUTTONS },
{ L_TRIG, D_CBUTTONS },
{ L_TRIG, A_BUTTON },
{ R_TRIG, D_CBUTTONS },
{ L_TRIG, R_CBUTTONS },
{ L_TRIG, R_TRIG },
{ L_TRIG, L_JPAD },
{ L_TRIG, R_JPAD },
{ L_TRIG, U_JPAD },
{ L_TRIG, B_BUTTON },
{ L_TRIG, Z_TRIG },
{ L_TRIG, D_JPAD },
{ R_TRIG, A_BUTTON },
{ R_TRIG, B_BUTTON },
{ R_TRIG, Z_TRIG },
{ R_TRIG, L_TRIG },
{ R_TRIG, U_CBUTTONS },
{ R_TRIG, R_CBUTTONS },
{ R_TRIG, L_JPAD },
{ R_TRIG, L_CBUTTONS },
{ R_TRIG, START_BUTTON },
{ L_TRIG, START_BUTTON },
{ R_TRIG, R_JPAD },
{ R_TRIG, U_JPAD },
{ START_BUTTON, R_TRIG },
{ START_BUTTON, A_BUTTON },
{ START_BUTTON, B_BUTTON },
{ START_BUTTON, R_CBUTTONS },
};
char regChar[] = " SOPQMYDUIZCNKXcsiWAVHGmnBdkb";
//initialize GameInfo
void func_800636C0()
{
s32 i;
gGameInfo = (GameInfo*)SystemArena_MallocDebug(sizeof(GameInfo), "../z_debug.c", 260);
gGameInfo->regPage = 0;
gGameInfo->regGroup = 0;
gGameInfo->regCur = 0;
gGameInfo->dpadLast = 0;
gGameInfo->repeat = 0;
for (i = 0; i < ARRAY_COUNT(gGameInfo->data); i++)
{
gGameInfo->data[i] = 0;
}
}
//Called when free movement is active.
//8011D394 to enable camera debugger
void func_8006375C(s32 arg0, s32 arg1, float* d_80855320)
{
}
#ifdef NON_MATCHING //regalloc
//Copy Camera Debugger Text
void func_8006376C(u8 x, u8 y, u8 colorId, const char* text)
{
PrintTextBuffer* buf;
char* bufText;
s16 i; //v1
buf = &D_8015FA98[D_8011E0B0];
if (D_8011E0B0 < 0x16) {
buf->x = x;
buf->y = y;
buf->colorId = colorId;
i = 0;
bufText = buf->text + 1;
if (*buf->text = *text++) {
do if (i++ > 0x14) {
break;
} while (*bufText++ = *text++);
}
*bufText = '\0';
D_8011E0B0++;
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_debug/func_8006376C.s")
#endif
#pragma GLOBAL_ASM("asm/non_matchings/code/z_debug/func_80063828.s")
//Draw Text
void func_80063828(GfxPrint* gfxPrint)
{
s32 i;
Color_RGBA8* color;
PrintTextBuffer* buffer;
char* text;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_debug/func_8006390C.s")
i = 0;
if (D_8011E0B0 > 0)
{
do
{
buffer = &D_8015FA98[i];
text = buffer->text;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_debug/func_80063C04.s")
color = &printTextColors[buffer->colorId];
GfxPrint_SetColor(gfxPrint, color->r, color->g, color->b, color->a);
GfxPrint_SetPos(gfxPrint, buffer->x, buffer->y);
GfxPrint_Printf(gfxPrint, "%s", text);
i += 1;
} while (i < D_8011E0B0);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_debug/func_80063D7C.s")
//Edit REG
void func_8006390C(Input* input) {
s32 dpad;
s32 regGroup;
s32 increment;
InputCombo* input_combo;
s32 i;
regGroup = (gGameInfo->regGroup * REG_PAGES + gGameInfo->regPage) * REG_PER_PAGE - REG_PER_PAGE;
dpad = input->raw.pad & 0xF00;
if (!~(input->raw.pad | ~L_TRIG) ||
!~(input->raw.pad | ~R_TRIG) ||
!~(input->raw.pad | ~START_BUTTON)) {
input_combo = inputCombos;
for (i = 0; i < REG_GROUPS; i++)
{
if (~(~input_combo->push | input->raw.pad) ||
~(~input_combo->held | input->padPressed)) {
input_combo++;
}
else
break;
}
if (i < REG_GROUPS) {
if (i == gGameInfo->regGroup) {
gGameInfo->regPage = (gGameInfo->regPage + 1) % (REG_PAGES + 1);
return;
}
gGameInfo->regGroup = i;
gGameInfo->regPage = 0;
}
}
else {
switch (gGameInfo->regPage - 1)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
if (dpad == gGameInfo->dpadLast) {
gGameInfo->repeat--;
if (gGameInfo->repeat < 0) {
gGameInfo->repeat = 1;
}
else {
dpad ^= gGameInfo->dpadLast;
}
}
else {
gGameInfo->repeat = 0x10;
gGameInfo->dpadLast = dpad;
}
increment =
(dpad & R_JPAD) ? (
!~(input->raw.pad | ~(A_BUTTON | B_BUTTON)) ? 1000 :
!~(input->raw.pad | ~A_BUTTON) ? 100 :
!~(input->raw.pad | ~B_BUTTON) ? 10 : 1) :
(dpad & L_JPAD) ? (
!~(input->raw.pad | ~(A_BUTTON | B_BUTTON)) ? -1000 :
!~(input->raw.pad | ~A_BUTTON) ? -100 :
!~(input->raw.pad | ~B_BUTTON) ? -10 : -1) :
0;
gGameInfo->data[gGameInfo->regCur + regGroup] += increment;
if (dpad & U_JPAD) {
gGameInfo->regCur--;
if (gGameInfo->regCur < 0) {
gGameInfo->regCur = REG_PER_PAGE - 1;
}
}
else if (dpad & D_JPAD) {
gGameInfo->regCur++;
if (gGameInfo->regCur >= REG_PER_PAGE) {
gGameInfo->regCur = 0;
}
}
if (iREG(0)) {
iREG(0) = 0;
func_800AA000(0, iREG(1), iREG(2), iREG(3));
}
}
}
}
//Draw Memory Viewer
void func_80063C04(GfxPrint* gfxPrint)
{
s32 i;
s32 page;
s32 regGroup;
s32 test; //removing affects stack
char name[3];
page = (gGameInfo->regPage * REG_PER_PAGE) - REG_PER_PAGE;
regGroup = (gGameInfo->regGroup * REG_PAGES + gGameInfo->regPage) * REG_PER_PAGE - REG_PER_PAGE;
//set up register name string
name[0] = 'R';
name[1] = regChar[gGameInfo->regGroup]; //r_group type char
name[2] = '\0';
GfxPrint_SetColor(gfxPrint, 0, 0x80, 0x80, 0x80);
for (i = 0; i != REG_PER_PAGE; i++)
{
if (i == gGameInfo->regCur)
{
GfxPrint_SetColor(gfxPrint, 0, 0xff, 0xff, 0xff);
}
GfxPrint_SetPos(gfxPrint, 3, i + 5);
GfxPrint_Printf(gfxPrint, "%s%02d%6d", &name, page + i, gGameInfo->data[i + regGroup]);
if (i == gGameInfo->regCur)
{
GfxPrint_SetColor(gfxPrint, 0, 0x80, 0x80, 0x80);
}
}
}
void func_80063D7C(GraphicsContext* gfxCtx) {
Gfx* sp7C;
Gfx* sp78;
Gfx* tempRet;
void* unk2[6];
GfxPrint gfxPrint;
void* unk[2];
Gfx* dlFrame[4]; //stores state of GfxCtx next ptrs
func_800C6AC4(&dlFrame, gfxCtx, "../z_debug.c", 628);
GfxPrint_Ctor(&gfxPrint);
sp78 = gfxCtx->polyOpa.p;
tempRet = func_800C6C20(gfxCtx->polyOpa.p);
gSPDisplayList(gfxCtx->overlay.p++, tempRet);
GfxPrint_Open(&gfxPrint, tempRet);
if ((OREG(0) == 1) || (OREG(0) == 8)) {
func_80063828(&gfxPrint);
}
if (gGameInfo->regPage != 0) {
func_80063C04(&gfxPrint);
}
D_8011E0B0 = 0;
sp7C = GfxPrint_Close(&gfxPrint);
gSPEndDisplayList(sp7C++);
func_800C6C28(sp78, sp7C);
gfxCtx->polyOpa.p = sp7C;
if (0);
func_800C6B54(&dlFrame, gfxCtx, "../z_debug.c", 664);
GfxPrint_Dtor(&gfxPrint);
}
+10 -19
View File
@@ -1,20 +1,17 @@
#include <ultra64.h>
#include <global.h>
#ifdef NON_MATCHING
void Lib_MemSet(void* dest, size_t size, u8 val)
void Lib_MemSet(u8* dest, size_t size, u8 val)
{
u8* destu = dest;
u32 i;
u32 i = 0;
for (i = 0; i < size; i++)
{
*destu++ = val;
}
// TODO: Convert this to while/for if possible
if (i == size) return;
do {
*dest++ = val;
i++;
} while (i != size);
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_lib/Lib_MemSet.s")
#endif
f32 Math_Coss(s16 angle)
{
@@ -559,15 +556,12 @@ f32 func_800784D8(f32* pValue, f32 target, f32 scale, f32 maxStep, f32 minStep)
return step;
}
#ifdef NON_MATCHING
// regalloc differences
s16 Math_SmoothScaleMaxMinS(s16* pValue, s16 target, s16 invScale, s16 maxStep, s16 minStep)
{
s16 step = 0;
s16 diff = (target - *pValue);
s32 baseStep;
s16 step;
baseStep = diff / invScale;
s32 baseStep = diff / invScale;
if (*pValue != target)
{
@@ -604,9 +598,6 @@ s16 Math_SmoothScaleMaxMinS(s16* pValue, s16 target, s16 invScale, s16 maxStep,
return diff;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_lib/Math_SmoothScaleMaxMinS.s")
#endif
void Math_SmoothScaleMaxS(s16* pValue, s16 target, s16 invScale, s16 maxStep)
{
+23
View File
@@ -0,0 +1,23 @@
#include <ultra64.h>
#include <global.h>
#include <sched.h>
void MsgEvent_SendNullTask()
{
u32 pad[4];
OSScTask task;
OSMesgQueue queue;
OSMesg msg;
u32 pad2[1];
task.next = NULL;
task.flags = OS_SC_RCP_MASK;
task.msgQ = &queue;
task.msg = NULL;
task.framebuffer = NULL;
task.list.t.type = M_NULTASK;
osCreateMesgQueue(task.msgQ, &msg, 1);
osSendMesg(&gSchedContext.cmdQ, &task, OS_MESG_BLOCK);
func_800C95F8(&gSchedContext); // osScKickEntryMsg
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
}
+35
View File
@@ -0,0 +1,35 @@
#include <ultra64.h>
#include <global.h>
#define COLD_RESET 0
#define NMI 1
void PreNmiBuff_Init(PreNmiBuff* this)
{
this->resetting = false;
if (osResetType == COLD_RESET)
{
this->resetCount = 0;
this->duration = 0;
}
else
{
this->resetCount++;
this->duration += this->resetTime;
}
this->resetTime = 0;
}
void PreNmiBuff_SetReset(PreNmiBuff* this)
{
this->resetting = true;
this->resetTime = osGetTime();
}
u32 PreNmiBuff_IsResetting(PreNmiBuff* this)
{
return this->resetting;
}
+4 -4
View File
@@ -426,8 +426,8 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags)
gfxCtx->polyOpa.p = spA8;
}
// gSPLoadUcode(gfxCtx->polyOpa.p++, func_800D2E14(), func_800D2E20())?
gSPLoadUcodeEx(gfxCtx->polyOpa.p++, func_800D2E14(), func_800D2E20(), 0x800);
// gSPLoadUcode(gfxCtx->polyOpa.p++, SysUcode_GetUcode(), SysUcode_GetUcodeData())?
gSPLoadUcodeEx(gfxCtx->polyOpa.p++, SysUcode_GetUcode(), SysUcode_GetUcodeData(), 0x800);
}
}
@@ -542,8 +542,8 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags)
gfxCtx->polyOpa.p = spA8;
}
// gSPLoadUcode(gfxCtx->polyOpa.p++, func_800D2E14(), func_800D2E20())?
gSPLoadUcodeEx(gfxCtx->polyOpa.p++, func_800D2E14(), func_800D2E20(), 0x800);
// gSPLoadUcode(gfxCtx->polyOpa.p++, SysUcode_GetUcode(), SysUcode_GetUcodeData())?
gSPLoadUcodeEx(gfxCtx->polyOpa.p++, SysUcode_GetUcode(), SysUcode_GetUcodeData(), 0x800);
}
}
@@ -45,7 +45,7 @@ static ColliderCylinderInit colliderInit =
0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00,
0x0032, 0x000A, 0x0000,
0x0000, 0x0000, 0x0000
0x0000, 0x0000, 0x0000,
};
// array of entrance table entries to grotto destinations
@@ -53,7 +53,7 @@ static s16 entrances[] = {
0x036D, 0x003F, 0x0598, 0x059C,
0x05A0, 0x05A4, 0x05A8, 0x05AC,
0x05B0, 0x05B4, 0x05B8, 0x05BC,
0x05C0, 0x05C4, 0x05FC
0x05C0, 0x05C4, 0x05FC,
};
// display list
@@ -1,14 +1,19 @@
/*
* File: z_en_lightbox.c
* Overlay: ovl_En_Lightbox
* Description:
*/
#include "z_en_lightbox.h"
#define ROOM 0x00
#define FLAGS 0x00000010
void EnLightbox_Init(EnLightbox* this, GlobalContext* globalCtx);
void EnLightbox_Destroy(EnLightbox* this, GlobalContext* globalCtx);
void EnLightbox_Update(EnLightbox* this, GlobalContext* globalCtx);
void EnLightbox_Draw(EnLightbox* this, GlobalContext* globalCtx);
static void EnLightbox_Init(EnLightbox* this, GlobalContext* globalCtx);
static void EnLightbox_Destroy(EnLightbox* this, GlobalContext* globalCtx);
static void EnLightbox_Update(EnLightbox* this, GlobalContext* globalCtx);
static void EnLightbox_Draw(EnLightbox* this, GlobalContext* globalCtx);
/*
const ActorInit En_Lightbox_InitVars =
{
ACTOR_EN_LIGHTBOX,
@@ -22,11 +27,105 @@ const ActorInit En_Lightbox_InitVars =
(ActorFunc)EnLightbox_Update,
(ActorFunc)EnLightbox_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Lightbox/EnLightbox_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Lightbox/EnLightbox_Destroy.s")
extern u32 D_06000B70;
extern u32 D_06001F10;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Lightbox/EnLightbox_Update.s")
static void EnLightbox_Init(EnLightbox* this, GlobalContext* globalCtx)
{
u32 local_c = 0;
Actor* thisx = &this->dyna.actor;
s32 pad[4];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Lightbox/EnLightbox_Draw.s")
switch(thisx->params){
case 0:
Actor_SetScale(thisx, 0.025f);
break;
case 1:
Actor_SetScale(thisx, 0.05f);
break;
case 2:
Actor_SetScale(thisx, 0.075f);
break;
case 3:
Actor_SetScale(thisx, 0.1f);
default:
break;
}
thisx->posRot2.pos = thisx->posRot.pos;
thisx->sub_98.unk_10 = 0x1E;
thisx->sub_98.unk_12 = 0x32;
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 6.0f);
this->dyna.unk_160 = 0;
this->dyna.unk_15C = 0;
thisx->unk_1F = 0;
thisx->gravity = -2.0f;
DynaPolyInfo_Alloc(&D_06001F10, &local_c);
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
}
static void EnLightbox_Destroy(EnLightbox* this, GlobalContext* globalCtx)
{
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
}
static void EnLightbox_Update(EnLightbox* this, GlobalContext* globalCtx)
{
Actor* thisx = &this->dyna.actor;
if (this->dyna.unk_162 != 0)
{
if (func_8002F5A0(thisx, globalCtx))
{
this->dyna.unk_162 = 0;
}
}
else
{
if (func_8002F410(thisx, globalCtx))
{
this->dyna.unk_162++;
}
else
{
if (thisx->speedXZ)
{
if (thisx->bgCheckFlags & 8)
{
thisx->posRot.rot.y = (thisx->posRot.rot.y + thisx->unk_7E) - thisx->posRot.rot.y;
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->unk_E4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
thisx->speedXZ *= 0.7f;
thisx->bgCheckFlags &= ~0x8;
}
}
if ((thisx->bgCheckFlags & 1) == 0)
{
Math_ApproxF(&thisx->speedXZ, 0, IREG(57) / 100.0f);
}
else
{
Math_ApproxF(&thisx->speedXZ, 0, IREG(58) / 100.0f);
if ((thisx->bgCheckFlags & 2) && (thisx->velocity.y < IREG(59) / 100.0f))
{
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->unk_E4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
thisx->velocity.y *= IREG(60) / 100.0f;
thisx->bgCheckFlags &= ~0x1;
}
else
{
func_8002F580(thisx, globalCtx);
}
}
}
}
Actor_MoveForward(thisx);
func_8002E4B4(globalCtx, thisx, thisx->sub_98.unk_12, thisx->sub_98.unk_10, thisx->sub_98.unk_10, 0x1D);
thisx->posRot2.pos = thisx->posRot.pos;
}
static void EnLightbox_Draw(EnLightbox* this, GlobalContext* globalCtx)
{
Draw_DListOpa(globalCtx, &D_06000B70);
}
@@ -6,8 +6,7 @@
typedef struct
{
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x18];
/* 0x0000 */ DynaPolyActor dyna;
} EnLightbox; // size = 0x0164
extern const ActorInit En_Lightbox_InitVars;
@@ -1,14 +1,22 @@
/*
* File: z_obj_bombiwa.c
* Overlay: ovl_Obj_Bombiwa
* Description: Round, brown, breakable boulder
*/
#include "z_obj_bombiwa.h"
#define ROOM 0x00
#define FLAGS 0x00000000
void ObjBombiwa_Init(ObjBombiwa* this, GlobalContext* globalCtx);
void ObjBombiwa_Destroy(ObjBombiwa* this, GlobalContext* globalCtx);
void ObjBombiwa_Update(ObjBombiwa* this, GlobalContext* globalCtx);
void ObjBombiwa_Draw(ObjBombiwa* this, GlobalContext* globalCtx);
static void ObjBombiwa_Init(ObjBombiwa* this, GlobalContext* globalCtx);
static void ObjBombiwa_Destroy(ObjBombiwa* this, GlobalContext* globalCtx);
static void ObjBombiwa_Update(ObjBombiwa* this, GlobalContext* globalCtx);
static void ObjBombiwa_Draw(ObjBombiwa* this, GlobalContext* globalCtx);
static void ObjBombiwa_InitCollision(ObjBombiwa* this, GlobalContext* globalCtx);
static void ObjBombiwa_Break(ObjBombiwa* this, GlobalContext* globalCtx);
/*
const ActorInit Obj_Bombiwa_InitVars =
{
ACTOR_OBJ_BOMBIWA,
@@ -22,18 +30,133 @@ const ActorInit Obj_Bombiwa_InitVars =
(ActorFunc)ObjBombiwa_Update,
(ActorFunc)ObjBombiwa_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Bombiwa/func_80B915F0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Bombiwa/ObjBombiwa_Init.s")
static ColliderCylinderInit colliderInit =
{
0x0C, 0x00, 0x0D, 0x39,
0x20, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00000000, 0x00, 0x00,
0x00, 0x00, 0x4FC1FFFE,
0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x01, 0x00,
0x0037, 0x0046, 0x0000,
0x0000, 0x0000, 0x0000,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Bombiwa/ObjBombiwa_Destroy.s")
static u32 damageChart[] =
{
0x0000000C, 0x003CFF00,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Bombiwa/func_80B91738.s")
static InitChainEntry initChain[] =
{
ICHAIN_VEC3F_DIV1000(scale, 0x64, ICHAIN_CONTINUE),
ICHAIN_F32(unk_F4, 0x7D0, ICHAIN_CONTINUE),
ICHAIN_F32(unk_F8, 0x15E, ICHAIN_CONTINUE),
ICHAIN_F32(unk_FC, 0x3E8, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Bombiwa/ObjBombiwa_Update.s")
static s16 effectScales[] =
{
17, 14, 10, 8, 7, 5, 3, 2,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Bombiwa/ObjBombiwa_Draw.s")
extern Gfx* D_060009E0; //dlist
static void ObjBombiwa_InitCollision(ObjBombiwa* this, GlobalContext* globalCtx)
{
ObjBombiwa* thisLocal = this;
ActorCollider_AllocCylinder(globalCtx, &thisLocal->collider);
ActorCollider_InitCylinder(globalCtx, &thisLocal->collider, &thisLocal->actor, &colliderInit);
ActorCollider_Cylinder_Update(&thisLocal->actor, &thisLocal->collider);
}
static void ObjBombiwa_Init(ObjBombiwa* this, GlobalContext* globalCtx)
{
Actor_ProcessInitChain(&this->actor, initChain);
ObjBombiwa_InitCollision(this, globalCtx);
if ((Flags_GetSwitch(globalCtx, this->actor.params & 0x3F) != 0))
{
Actor_Kill(&this->actor);
}
else
{
func_80061ED4(&this->actor.sub_98.damageChart, NULL, damageChart);
if (this->actor.shape.rot.y == 0)
{
s16 rand = (s16) Math_Rand_ZeroFloat(65536.0f);
this->actor.posRot.rot.y = rand;
this->actor.shape.rot.y = rand;
}
this->actor.shape.unk_08 = -200.0f;
this->actor.posRot.pos.y = this->actor.initPosRot.pos.y + 20.0f;
}
}
static void ObjBombiwa_Destroy(ObjBombiwa* this, GlobalContext* globalCtx)
{
ActorCollider_FreeCylinder(globalCtx, &this->collider);
}
static void ObjBombiwa_Break(ObjBombiwa *this, GlobalContext *globalCtx)
{
Vec3f temp_s2;
Vec3f temp_s3;
Gfx** dlist;
s16 u0;
s16 scale;
s32 i;
dlist = &D_060009E0;
for (i = 0; i < ARRAY_COUNT(effectScales); i++)
{
temp_s2.x = ((Math_Rand_ZeroOne() - 0.5f) * 10.0f) + this->actor.initPosRot.pos.x;
temp_s2.y = ((Math_Rand_ZeroOne() * 5.0f) + this->actor.initPosRot.pos.y) + 8.0f;
temp_s2.z = ((Math_Rand_ZeroOne() - 0.5f) * 10.0f) + this->actor.initPosRot.pos.z;
temp_s3.x = (Math_Rand_ZeroOne() - 0.5f) * 15.0f;
temp_s3.y = (Math_Rand_ZeroOne() * 16.0f) + 5.0f;
temp_s3.z = (Math_Rand_ZeroOne() - 0.5f) * 15.0f;
scale = effectScales[i];
u0 = (scale >= 11) ? 37 : 33;
Effect_SpawnFragment(globalCtx, &temp_s2, &temp_s3, &temp_s2, -400, u0, 10, 2, 0, scale, 1, 0, 80, -1, OBJECT_BOMBIWA, dlist);
}
func_80033480(globalCtx, &this->actor.posRot.pos, 60.0f, 8, 100, 160, 1);
}
static void ObjBombiwa_Update(ObjBombiwa* this, GlobalContext* globalCtx)
{
SubGlobalContext11E60* sub_11E60;
ColliderCylinderMain* collider;
if (func_80033684(globalCtx, &this->actor) != NULL ||
((this->collider.base.collideFlags & 2) != 0 &&
(this->collider.body.colliding->toucher.flags & 0x40000040) != 0))
{
ObjBombiwa_Break(this, globalCtx);
Flags_SetSwitch(globalCtx, this->actor.params & 0x3F);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 80, NA_SE_EV_WALL_BROKEN);
if (((this->actor.params >> 0xF) & 1) != 0)
{
func_80078884(NA_SE_SY_CORRECT_CHIME);
}
Actor_Kill(&this->actor);
}
else
{
this->collider.base.collideFlags &= ~0x2;
if (this->actor.xzDistanceFromLink < 800.0f)
{
sub_11E60 = &globalCtx->sub_11E60;
collider = &this->collider;
Actor_CollisionCheck_SetAC(globalCtx, sub_11E60, collider);
Actor_CollisionCheck_SetOT(globalCtx, sub_11E60, collider);
}
}
}
static void ObjBombiwa_Draw(ObjBombiwa* this, GlobalContext* globalCtx)
{
Draw_DListOpa(globalCtx, &D_060009E0);
}
@@ -7,7 +7,7 @@
typedef struct
{
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x4C];
/* 0x014C */ ColliderCylinderMain collider;
} ObjBombiwa; // size = 0x0198
extern const ActorInit Obj_Bombiwa_InitVars;
+198 -12
View File
@@ -6,23 +6,209 @@
#include <ultra64.h>
#include <global.h>
#include <alloca.h>
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_title/func_80800000.s")
extern Gfx D_01002720[];
extern u8 D_01001800[];
extern u8 D_01000000[];
void func_80800128(TitleContext* this)
void Title_PrintBuildInfo(Gfx** gfxp)
{
this->unk_1E1 = 1;
Gfx* g;
GfxPrint* printer;
g = *gfxp;
g = func_8009411C(g);
printer = alloca(0x30);
GfxPrint_Ctor(printer);
GfxPrint_Open(printer, g);
GfxPrint_SetColor(printer, 0xFF, 0x9B, 0xFF, 0xFF);
GfxPrint_SetPos(printer, 9, 21);
GfxPrint_Printf(printer, "NOT MARIO CLUB VERSION");
GfxPrint_SetColor(printer, 0xFF, 0xFF, 0xFF, 0xFF);
GfxPrint_SetPos(printer, 7, 23);
GfxPrint_Printf(printer, "[Creator:%s]", gBuildTeam);
GfxPrint_SetPos(printer, 7, 24);
GfxPrint_Printf(printer, "[Date:%s]", gBuildDate);
g = GfxPrint_Close(printer);
GfxPrint_Dtor(printer);
*gfxp = g;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_title/func_80800134.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_title/func_808001C8.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_title/func_8080073C.s")
void func_80800858(TitleContext* this)
// Note: In other rom versions this function also updates unk_1D4, coverAlpha, addAlpha, visibleDuration to calculate the fade-in/fade-out + the duration of the n64 logo animation
void Title_Calc(TitleContext* this)
{
func_800A9AD0(this, &this->unk_1D0);
this->exit = 1;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_title/func_80800878.s")
void Title_InitView(TitleContext* this, f32 x, f32 y, f32 z)
{
View* view;
Vec3f v1;
Vec3f v2;
Vec3f v3;
view = &this->view;
v3.z = 0;
v3.x = 0;
v2.z = 0;
v2.y = 0;
v2.x = 0;
v1.x = x;
v1.y = y;
v1.z = z;
v3.y = 1.0;
func_800AA460(view, 30.0f, 10.0f, 12800.0f);
func_800AA358(view, &v1, &v2, &v3);
func_800AAA50(view, 0xF);
}
void Title_Draw(TitleContext* this)
{
static s16 sTitleRotY = 0;
static u32 D_808009A4 = 0;
static Lights1 sTitleLights = gdSPDefLights1(0x64, 0x64, 0x64, 0xFF, 0xFF, 0xFF, 0x45, 0x45, 0x45);
u16 y;
u16 idx;
char pad1[0x4];
Vec3f v3;
Vec3f v1;
Vec3f v2;
char pad2[0x8];
GraphicsContext* gfxCtx = this->state.gfxCtx;
Gfx* gfxArr[4];
func_800C6AC4(&gfxArr, this->state.gfxCtx, "../z_title.c", 395);
v3.x = 69;
v3.y = 69;
v3.z = 69;
v2.x = -4949.148;
v2.y = 4002.5417;
v1.x = 0;
v1.y = 0;
v1.z = 0;
v2.z = 1119.0837;
func_8002EABC(&v1, &v2, &v3, this->state.gfxCtx);
gSPSetLights1(gfxCtx->polyOpa.p++, sTitleLights);
Title_InitView(this, 0, 150.0, 300.0);
func_80093D18(this->state.gfxCtx);
Matrix_Translate(-53.0, -5.0, 0, MTXMODE_NEW);
Matrix_Scale(1.0, 1.0, 1.0, MTXMODE_APPLY);
Matrix_RotateXYZ(0, sTitleRotY, 0, MTXMODE_APPLY);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(this->state.gfxCtx, "../z_title.c", 424), G_MTX_LOAD);
gSPDisplayList(gfxCtx->polyOpa.p++, &D_01002720);
func_800944C4(this->state.gfxCtx);
gDPPipeSync(gfxCtx->polyOpa.p++);
gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_2CYCLE);
gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_XLU_SURF2, G_RM_OPA_CI | CVG_DST_WRAP);
gDPSetCombineLERP(gfxCtx->polyOpa.p++, TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0);
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 170, 255, 255, 255);
gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 255, 128);
gDPLoadMultiBlock(gfxCtx->polyOpa.p++,
&D_01001800,
0x100,
1,
G_IM_FMT_I,
G_IM_SIZ_8b,
32, 32,
0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
5, 5,
2, 11);
for (idx = 0, y = 94; idx < 16; idx++, y += 2)
{
gDPLoadTextureBlock(gfxCtx->polyOpa.p++,
&D_01000000[0x180 * idx],
G_IM_FMT_I,
G_IM_SIZ_8b,
192, 2,
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);
gDPSetTileSize(gfxCtx->polyOpa.p++, 1, this->uls, (this->ult & 0x7F) - idx*4, 0, 0);
gSPTextureRectangle(gfxCtx->polyOpa.p++, 388, y << 2, 1156, (y+2)<<2, G_TX_RENDERTILE, 0, 0, 1024, 1024);
}
func_8007672C(this->state.gfxCtx, 0, 0, 0, (s16)this->coverAlpha, 2);
sTitleRotY += 300;
func_800C6B54(&gfxArr, this->state.gfxCtx, "../z_title.c", 483);
}
void Title_Update(TitleContext* this)
{
GraphicsContext* gfxCtx = this->state.gfxCtx;
u32 pad;
Gfx* gfxArr[4];
u32 pad2;
Gfx* gfx[2];
func_800C6AC4(&gfxArr, this->state.gfxCtx, "../z_title.c", 494);
gSPSegment(gfxCtx->polyOpa.p++, 0, NULL);
gSPSegment(gfxCtx->polyOpa.p++, 1, this->staticSegment);
func_80095248(this->state.gfxCtx, 0, 0, 0);
Title_Calc(this);
Title_Draw(this);
if (D_8012DBC0)
{
gfx[0] = gfxCtx->polyOpa.p;
Title_PrintBuildInfo(&gfx);
gfxCtx->polyOpa.p = gfx[0];
}
if (this->exit)
{
gSaveContext.seq_index = -1;
gSaveContext.night_sfx = -1;
gSaveContext.game_mode = 1;
this->state.running = false;
this->state.init = Opening_Init; this->state.size = sizeof(OpeningContext);
}
func_800C6B54(&gfxArr, this->state.gfxCtx, "../z_title.c", 541);
}
void Title_Destroy(TitleContext* this)
{
func_800A9AD0(this, &this->sram);
}
void Title_Init(TitleContext* this)
{
u32 size = (u32)_nintendo_rogo_staticSegmentRomEnd - (u32)_nintendo_rogo_staticSegmentRomStart;
u32 pad;
this->staticSegment = Game_Alloc(&this->state, size, "../z_title.c", 611);
osSyncPrintf("z_title.c\n");
if (this->staticSegment == NULL)
{
__assert("this->staticSegment != NULL", "../z_title.c", 614);
}
DmaMgr_SendRequest1(this->staticSegment, (u32)_nintendo_rogo_staticSegmentRomStart, size, "../z_title.c", 615);
R_UPDATE_RATE = 1;
Matrix_Init(&this->state);
func_800AA278(&this->view, this->state.gfxCtx);
this->state.main = Title_Update;
this->state.destroy = Title_Destroy;
this->exit = false;
gSaveContext.file_num = 0xFF;
func_800A9CD4(&this->state, &this->sram);
this->ult = 0;
this->unk_1D4 = 0x14;
this->coverAlpha = 0xFF;
this->addAlpha = -3;
this->visibleDuration = 0x3C;
}