mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-18 04:52:03 +00:00
match z_title.c (#2075)
This commit is contained in:
parent
37f0774778
commit
614c411058
3 changed files with 66 additions and 6 deletions
|
@ -7,8 +7,19 @@
|
|||
#include "global.h"
|
||||
#include "alloca.h"
|
||||
#include "versions.h"
|
||||
|
||||
#if PLATFORM_N64
|
||||
#include "n64dd.h"
|
||||
#endif
|
||||
|
||||
#include "assets/textures/nintendo_rogo_static/nintendo_rogo_static.h"
|
||||
|
||||
// TODO
|
||||
void func_800014E8_unknown(void);
|
||||
s32 func_801C8090_unknown(void);
|
||||
void func_801C7BC4_unknown(void);
|
||||
s32 func_801C7ED0_unknown(void);
|
||||
|
||||
#if OOT_DEBUG
|
||||
void ConsoleLogo_PrintBuildInfo(Gfx** gfxP) {
|
||||
Gfx* gfx;
|
||||
|
@ -33,10 +44,29 @@ void ConsoleLogo_PrintBuildInfo(Gfx** gfxP) {
|
|||
}
|
||||
#endif
|
||||
|
||||
// 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 ConsoleLogo_Calc(ConsoleLogoState* this) {
|
||||
#if PLATFORM_N64
|
||||
if ((this->coverAlpha == 0) && (this->visibleDuration != 0)) {
|
||||
this->unk_1D4--;
|
||||
this->visibleDuration--;
|
||||
if (this->unk_1D4 == 0) {
|
||||
this->unk_1D4 = 400;
|
||||
}
|
||||
} else {
|
||||
this->coverAlpha += this->addAlpha;
|
||||
if (this->coverAlpha <= 0) {
|
||||
this->coverAlpha = 0;
|
||||
this->addAlpha = 3;
|
||||
} else if (this->coverAlpha >= 255) {
|
||||
this->coverAlpha = 255;
|
||||
this->exit = true;
|
||||
}
|
||||
}
|
||||
this->uls = this->ult & 0x7F;
|
||||
this->ult++;
|
||||
#else
|
||||
this->exit = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConsoleLogo_SetupView(ConsoleLogoState* this, f32 x, f32 y, f32 z) {
|
||||
|
@ -154,13 +184,37 @@ void ConsoleLogo_Main(GameState* thisx) {
|
|||
void ConsoleLogo_Destroy(GameState* thisx) {
|
||||
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
|
||||
|
||||
#if PLATFORM_N64
|
||||
if (this->unk_1E0) {
|
||||
if (func_801C8090_unknown() != 0) {
|
||||
func_800D31A0();
|
||||
}
|
||||
func_801C7BC4_unknown();
|
||||
}
|
||||
#endif
|
||||
|
||||
Sram_InitSram(&this->state, &this->sramCtx);
|
||||
|
||||
#if PLATFORM_N64
|
||||
func_800014E8_unknown();
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConsoleLogo_Init(GameState* thisx) {
|
||||
u32 size = (uintptr_t)_nintendo_rogo_staticSegmentRomEnd - (uintptr_t)_nintendo_rogo_staticSegmentRomStart;
|
||||
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
|
||||
|
||||
#if PLATFORM_N64
|
||||
if ((B_80121AE0 != 0) && ((u8)B_80121AE1 != 0) && (B_80121AE2 == 0)) {
|
||||
if (func_801C7ED0_unknown() != 0) {
|
||||
func_800D31A0();
|
||||
}
|
||||
this->unk_1E0 = true;
|
||||
} else {
|
||||
this->unk_1E0 = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
this->staticSegment = GAME_STATE_ALLOC(&this->state, size, "../z_title.c", 611);
|
||||
PRINTF("z_title.c\n");
|
||||
ASSERT(this->staticSegment != NULL, "this->staticSegment != NULL", "../z_title.c", 614);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue