1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-12 10:54:44 +00:00

Merge commit 'd8f2e9abc6' into doc_pause_menu

This commit is contained in:
Dragorn421 2024-08-01 21:29:41 +02:00
commit 1a5eb5cd92
No known key found for this signature in database
GPG key ID: 381AEBAF3D429335
146 changed files with 5405 additions and 860 deletions

View file

@ -659,11 +659,12 @@ void PreRender_AntiAliasFilter(PreRender* this, s32 x, s32 y) {
}
}
// The background color is determined by averaging the penultimate minimum and maximum pixels, and subtracting the
// The background color is determined by adding the penultimate minimum and maximum pixels, and subtracting the
// ForeGround color:
// BackGround = (pMax + pMin) - (ForeGround) * 2
// BackGround = (pMax + pMin) - ForeGround
// OutputColor = cvg * ForeGround + (1.0 - cvg) * BackGround
// = ForeGround + (1.0 - cvg) * (BackGround - ForeGround)
invCvg = 7 - buffCvg[7];
outR = buffR[7] + ((s32)(invCvg * (pmaxR + pminR - (buffR[7] * 2)) + 4) >> 3);
outG = buffG[7] + ((s32)(invCvg * (pmaxG + pminG - (buffG[7] * 2)) + 4) >> 3);

View file

@ -35,7 +35,7 @@
* - End Screen
* This page informs you that there are no more pages to display.
*
* To navigate the pages, START and A may be used to advance to the next page, and L toggles whether to
* To navigate the pages, DPad-Right or A may be used to advance to the next page, and L toggles whether to
* automatically scroll to the next page after some time has passed.
* DPad-Up may be pressed to enable sending fault pages over osSyncPrintf as well as displaying them on-screen.
* DPad-Down disables sending fault pages over osSyncPrintf.
@ -911,6 +911,8 @@ void Fault_DrawMemDump(uintptr_t pc, uintptr_t sp, uintptr_t cLeftJump, uintptr_
} while (input->press.button == 0);
// Move to next page
//! @bug DPad-Right does not move to the next page, unlike when on any other page
// START moving to the next page is unique to this page.
if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->cur.button, BTN_A)) {
return;
}

View file

@ -462,6 +462,7 @@ void Graph_ThreadEntry(void* arg0) {
if (gameState == NULL) {
#if OOT_DEBUG
char faultMsg[0x50];
PRINTF("確保失敗\n"); // "Failure to secure"
sprintf(faultMsg, "CLASS SIZE= %d bytes", size);

View file

@ -6,7 +6,7 @@
// For retail BSS ordering, the block number of D_8015BD7C
// must be between 88 and 123 inclusive.
#pragma increment_block_number 30
#pragma increment_block_number 26
s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags);
s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange);

View file

@ -1,5 +1,8 @@
#include "global.h"
#include "terminal.h"
#include "z64frame_advance.h"
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
@ -7,6 +10,8 @@ typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);
typedef void (*ColChkVsFunc)(PlayState*, CollisionCheckContext*, Collider*, Collider*);
typedef s32 (*ColChkLineFunc)(PlayState*, CollisionCheckContext*, Collider*, Vec3f*, Vec3f*);
#define SAC_ENABLE (1 << 0)
// For retail BSS ordering, the block number of sparkInit in CollisionCheck_BlueBlood
// must be between 183 and 255 inclusive.
#pragma increment_block_number 50
@ -2358,10 +2363,6 @@ void CollisionCheck_ATTrisVsACTris(PlayState* play, CollisionCheckContext* colCh
}
}
#if OOT_DEBUG
static s8 sBssDummy7;
#endif
void CollisionCheck_ATTrisVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static Vec3f hitPos;

View file

@ -115,7 +115,7 @@ void* sUnusedEntranceCsList[] = {
gDekuTreeIntroCs, gJabuJabuIntroCs, gDcOpeningCs, gMinuetCs, gIceCavernSerenadeCs, gTowerBarrierCs,
};
#pragma increment_block_number 254
#pragma increment_block_number 248
// Stores the frame the relevant cam data was last applied on
u16 gCamAtSplinePointsAppliedFrame;
@ -2229,11 +2229,15 @@ void CutsceneHandler_RunScript(PlayState* play, CutsceneContext* csCtx) {
csCtx->curFrame++;
if (OOT_DEBUG && R_USE_DEBUG_CUTSCENE) {
#if OOT_DEBUG
if (R_USE_DEBUG_CUTSCENE) {
Cutscene_ProcessScript(play, csCtx, gDebugCutsceneScript);
} else {
Cutscene_ProcessScript(play, csCtx, play->csCtx.script);
}
#else
Cutscene_ProcessScript(play, csCtx, play->csCtx.script);
#endif
}
}

View file

@ -1,5 +1,7 @@
#include "global.h"
#include "z64frame_advance.h"
EffectContext sEffectContext;
EffectInfo sEffectInfoTable[] = {

View file

@ -1,6 +1,8 @@
#include "global.h"
#include "terminal.h"
#include "z64frame_advance.h"
EffectSsInfo sEffectSsInfo = { 0 }; // "EffectSS2Info"
void EffectSs_InitInfo(PlayState* play, s32 tableSize) {

View file

@ -1,4 +1,9 @@
#include "global.h"
#include "z64frame_advance.h"
#include "stdbool.h"
#include "padmgr.h"
#include "macros.h"
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) {
frameAdvCtx->timer = 0;

View file

@ -1,3 +1,5 @@
#include "z64game_over.h"
#include "global.h"
void GameOver_Init(PlayState* play) {

View file

@ -1,13 +1,16 @@
#include "global.h"
#include "ultra64.h"
#include "terminal.h"
#include "z64frame_advance.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
// For retail BSS ordering, the block number of sLensFlareUnused must be lower
// than the extern variables declared in the header (e.g. gLightningStrike)
// while the block number of sNGameOverLightNode must be higher.
#pragma increment_block_number 78
#pragma increment_block_number 70
typedef enum {
/* 0x00 */ LIGHTNING_BOLT_START,
@ -2069,30 +2072,30 @@ void Environment_PlaySceneSequence(PlayState* play) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, ((void)0, gSaveContext.forcedSeqId));
}
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
} else if (play->sequenceCtx.seqId == NA_BGM_NO_MUSIC) {
if (play->sequenceCtx.natureAmbienceId == NATURE_ID_NONE) {
} else if (play->sceneSequences.seqId == NA_BGM_NO_MUSIC) {
if (play->sceneSequences.natureAmbienceId == NATURE_ID_NONE) {
return;
}
if (((void)0, gSaveContext.natureAmbienceId) != play->sequenceCtx.natureAmbienceId) {
Audio_PlayNatureAmbienceSequence(play->sequenceCtx.natureAmbienceId);
if (((void)0, gSaveContext.natureAmbienceId) != play->sceneSequences.natureAmbienceId) {
Audio_PlayNatureAmbienceSequence(play->sceneSequences.natureAmbienceId);
}
} else if (play->sequenceCtx.natureAmbienceId == NATURE_ID_NONE) {
} else if (play->sceneSequences.natureAmbienceId == NATURE_ID_NONE) {
// "BGM Configuration"
PRINTF("\n\n\nBGM設定game_play->sound_info.BGM=[%d] old_bgm=[%d]\n\n", play->sequenceCtx.seqId,
PRINTF("\n\n\nBGM設定game_play->sound_info.BGM=[%d] old_bgm=[%d]\n\n", play->sceneSequences.seqId,
((void)0, gSaveContext.seqId));
if (((void)0, gSaveContext.seqId) != play->sequenceCtx.seqId) {
Audio_PlaySceneSequence(play->sequenceCtx.seqId);
if (((void)0, gSaveContext.seqId) != play->sceneSequences.seqId) {
Audio_PlaySceneSequence(play->sceneSequences.seqId);
}
} else if (((void)0, gSaveContext.save.dayTime) >= CLOCK_TIME(7, 0) &&
((void)0, gSaveContext.save.dayTime) <= CLOCK_TIME(17, 10)) {
if (((void)0, gSaveContext.seqId) != play->sequenceCtx.seqId) {
Audio_PlaySceneSequence(play->sequenceCtx.seqId);
if (((void)0, gSaveContext.seqId) != play->sceneSequences.seqId) {
Audio_PlaySceneSequence(play->sceneSequences.seqId);
}
play->envCtx.timeSeqState = TIMESEQ_FADE_DAY_BGM;
} else {
if (((void)0, gSaveContext.natureAmbienceId) != play->sequenceCtx.natureAmbienceId) {
Audio_PlayNatureAmbienceSequence(play->sequenceCtx.natureAmbienceId);
if (((void)0, gSaveContext.natureAmbienceId) != play->sceneSequences.natureAmbienceId) {
Audio_PlayNatureAmbienceSequence(play->sceneSequences.natureAmbienceId);
}
if (((void)0, gSaveContext.save.dayTime) > CLOCK_TIME(17, 10) &&
@ -2108,8 +2111,8 @@ void Environment_PlaySceneSequence(PlayState* play) {
PRINTF("\n-----------------\n", ((void)0, gSaveContext.forcedSeqId));
PRINTF("\n 強制BGM=[%d]", ((void)0, gSaveContext.forcedSeqId)); // "Forced BGM"
PRINTF("\n =[%d]", play->sequenceCtx.seqId);
PRINTF("\n エンブ=[%d]", play->sequenceCtx.natureAmbienceId);
PRINTF("\n =[%d]", play->sceneSequences.seqId);
PRINTF("\n エンブ=[%d]", play->sceneSequences.natureAmbienceId);
PRINTF("\n status=[%d]", play->envCtx.timeSeqState);
Audio_SetEnvReverb(play->roomCtx.curRoom.echo);
@ -2123,7 +2126,7 @@ void Environment_PlayTimeBasedSequence(PlayState* play) {
if (play->envCtx.precipitation[PRECIP_RAIN_MAX] == 0 && play->envCtx.precipitation[PRECIP_SOS_MAX] == 0) {
PRINTF("\n\n\nNa_StartMorinigBgm\n\n");
Audio_PlayMorningSceneSequence(play->sequenceCtx.seqId);
Audio_PlayMorningSceneSequence(play->sceneSequences.seqId);
}
play->envCtx.timeSeqState++;
@ -2149,7 +2152,7 @@ void Environment_PlayTimeBasedSequence(PlayState* play) {
case TIMESEQ_EARLY_NIGHT_CRITTERS:
if (play->envCtx.precipitation[PRECIP_RAIN_MAX] == 0 && play->envCtx.precipitation[PRECIP_SOS_MAX] == 0) {
Audio_PlayNatureAmbienceSequence(play->sequenceCtx.natureAmbienceId);
Audio_PlayNatureAmbienceSequence(play->sceneSequences.natureAmbienceId);
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_CRITTER_0, CHANNEL_IO_PORT_1, 1);
}
@ -2586,10 +2589,10 @@ s32 Environment_IsForcedSequenceDisabled(void) {
}
void Environment_PlayStormNatureAmbience(PlayState* play) {
if (play->sequenceCtx.natureAmbienceId == NATURE_ID_NONE) {
if (play->sceneSequences.natureAmbienceId == NATURE_ID_NONE) {
Audio_PlayNatureAmbienceSequence(NATURE_ID_MARKET_NIGHT);
} else {
Audio_PlayNatureAmbienceSequence(play->sequenceCtx.natureAmbienceId);
Audio_PlayNatureAmbienceSequence(play->sceneSequences.natureAmbienceId);
}
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_RAIN, CHANNEL_IO_PORT_1, 1);

View file

@ -2,6 +2,8 @@
#include "quake.h"
#include "terminal.h"
#include "z64frame_advance.h"
#if OOT_DEBUG
void* gDebugCutsceneScript = NULL;
UNK_TYPE D_8012D1F4 = 0; // unused
@ -451,8 +453,8 @@ void Play_Init(GameState* thisx) {
Interface_SetSceneRestrictions(this);
Environment_PlaySceneSequence(this);
gSaveContext.seqId = this->sequenceCtx.seqId;
gSaveContext.natureAmbienceId = this->sequenceCtx.natureAmbienceId;
gSaveContext.seqId = this->sceneSequences.seqId;
gSaveContext.natureAmbienceId = this->sceneSequences.natureAmbienceId;
func_8002DF18(this, GET_PLAYER(this));
AnimTaskQueue_Update(this, &this->animTaskQueue);
gSaveContext.respawnFlag = 0;

View file

@ -1785,7 +1785,7 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
// Note: the viewport x and y values are overwritten below, before usage
static Vp viewport = { (PAUSE_EQUIP_PLAYER_WIDTH / 2) << 2, (PAUSE_EQUIP_PLAYER_HEIGHT / 2) << 2, G_MAXZ / 2, 0,
(PAUSE_EQUIP_PLAYER_WIDTH / 2) << 2, (PAUSE_EQUIP_PLAYER_HEIGHT / 2) << 2, G_MAXZ / 2, 0 };
static Lights1 lights1 = gdSPDefLights1(80, 80, 80, 255, 255, 255, 84, 84, 172);
static Lights1 lights1 = gdSPDefLights1(80, 80, 80, 255, 255, 255, 84, 84, -84);
static Vec3f lightDir = { 89.8f, 0.0f, 89.8f };
u8 playerSwordAndShield[2];
Gfx* opaRef;

View file

@ -409,8 +409,8 @@ BAD_RETURN(s32) Scene_CommandUndefined9(PlayState* play, SceneCmd* cmd) {
}
BAD_RETURN(s32) Scene_CommandSoundSettings(PlayState* play, SceneCmd* cmd) {
play->sequenceCtx.seqId = cmd->soundSettings.seqId;
play->sequenceCtx.natureAmbienceId = cmd->soundSettings.natureAmbienceId;
play->sceneSequences.seqId = cmd->soundSettings.seqId;
play->sceneSequences.natureAmbienceId = cmd->soundSettings.natureAmbienceId;
if (gSaveContext.seqId == (u8)NA_BGM_DISABLED) {
SEQCMD_RESET_AUDIO_HEAP(0, cmd->soundSettings.specId);

View file

@ -1,6 +1,8 @@
#include "global.h"
#include "quake.h"
#include "z64frame_advance.h"
#include "assets/scenes/indoors/miharigoya/miharigoya_scene.h"
#include "assets/scenes/indoors/souko/souko_scene.h"

View file

@ -1,3 +1,5 @@
#include "z64sfx_source.h"
#include "global.h"
void SfxSource_InitAll(PlayState* play) {

View file

@ -380,6 +380,7 @@ s32 View_ApplyPerspective(View* view) {
if (QREG(88) & 2) {
s32 i;
MtxF mf;
Matrix_MtxToMtxF(view->viewingPtr, &mf);
PRINTF("viewing\n");