mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-09-07 20:00:35 -04:00
Apply clang-format to files (#5273)
This commit is contained in:
@@ -7,7 +7,7 @@ StackEntry sIdleThreadInfo;
|
||||
u8 sBootThreadStack[0x400];
|
||||
|
||||
void cleararena(void) {
|
||||
//bzero(_dmadataSegmentStart, osMemSize - OS_K0_TO_PHYSICAL(_dmadataSegmentStart));
|
||||
// bzero(_dmadataSegmentStart, osMemSize - OS_K0_TO_PHYSICAL(_dmadataSegmentStart));
|
||||
}
|
||||
|
||||
void bootproc(void) {
|
||||
|
||||
+5
-4
@@ -23,12 +23,13 @@ void Main_ThreadEntry(void* arg) {
|
||||
DmaMgr_Init();
|
||||
osSyncPrintf("codeセグメントロード中...");
|
||||
time = osGetTime();
|
||||
//DmaMgr_SendRequest1(_codeSegmentStart, (uintptr_t)_codeSegmentRomStart, _codeSegmentRomEnd - _codeSegmentRomStart,
|
||||
//"../idle.c", 238);
|
||||
// DmaMgr_SendRequest1(_codeSegmentStart, (uintptr_t)_codeSegmentRomStart, _codeSegmentRomEnd -
|
||||
// _codeSegmentRomStart,
|
||||
//"../idle.c", 238);
|
||||
time -= osGetTime();
|
||||
osSyncPrintf("\rcodeセグメントロード中...完了\n");
|
||||
osSyncPrintf("転送時間 %6.3f\n");
|
||||
//bzero(_codeSegmentBssStart, _codeSegmentBssEnd - _codeSegmentBssStart);
|
||||
// bzero(_codeSegmentBssStart, _codeSegmentBssEnd - _codeSegmentBssStart);
|
||||
osSyncPrintf("codeセグメントBSSクリア完了\n");
|
||||
Main(arg);
|
||||
osSyncPrintf("mainx 実行終了\n");
|
||||
@@ -41,7 +42,7 @@ void Idle_ThreadEntry(void* arg) {
|
||||
osSyncPrintf("MAKEOPTION: %s\n", gBuildMakeOption);
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
osSyncPrintf("RAMサイズは %d キロバイトです(osMemSize/osGetMemSize)\n", (s32)osMemSize / 1024);
|
||||
//osSyncPrintf("_bootSegmentEnd(%08x) 以降のRAM領域はクリアされました(boot)\n", _bootSegmentEnd);
|
||||
// osSyncPrintf("_bootSegmentEnd(%08x) 以降のRAM領域はクリアされました(boot)\n", _bootSegmentEnd);
|
||||
osSyncPrintf("Zバッファのサイズは %d キロバイトです\n", 0x96);
|
||||
osSyncPrintf("ダイナミックバッファのサイズは %d キロバイトです\n", 0x92);
|
||||
osSyncPrintf("FIFOバッファのサイズは %d キロバイトです\n", 0x60);
|
||||
|
||||
@@ -40,7 +40,7 @@ void* is_proutSyncPrintf(void* arg, const char* str, u32 count) {
|
||||
s32 start;
|
||||
s32 end;
|
||||
|
||||
//OTRLogString(str);
|
||||
// OTRLogString(str);
|
||||
|
||||
osEPiReadIo(sISVHandle, (u32)&gISVDbgPrnAdrs->magic, &data);
|
||||
if (data != ASCII_TO_U32('I', 'S', '6', '4')) {
|
||||
|
||||
@@ -93,7 +93,6 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, uintptr_t ram, size_t size) {
|
||||
ram += buffSize;
|
||||
}
|
||||
|
||||
|
||||
ioMsg.hdr.pri = OS_MESG_PRI_NORMAL;
|
||||
ioMsg.hdr.retQueue = &queue;
|
||||
ioMsg.devAddr = rom;
|
||||
@@ -331,7 +330,8 @@ void DmaMgr_ThreadEntry(void* arg0) {
|
||||
osSyncPrintf("DMAマネージャスレッド実行終了\n");
|
||||
}
|
||||
|
||||
s32 DmaMgr_SendRequestImpl(DmaRequest* req, uintptr_t ram, uintptr_t vrom, size_t size, u32 unk, OSMesgQueue* queue, OSMesg msg) {
|
||||
s32 DmaMgr_SendRequestImpl(DmaRequest* req, uintptr_t ram, uintptr_t vrom, size_t size, u32 unk, OSMesgQueue* queue,
|
||||
OSMesg msg) {
|
||||
static s32 sDmaMgrQueueFullLogged = 0;
|
||||
|
||||
if ((1 && (ram == 0)) || (osMemSize < ram + size + 0x80000000) || (vrom & 1) || (vrom > 0x4000000) || (size == 0) ||
|
||||
@@ -383,8 +383,8 @@ void DmaMgr_Init(void) {
|
||||
s32 idx;
|
||||
DmaEntry* iter;
|
||||
|
||||
//DmaMgr_DmaRomToRam((uintptr_t)_dmadataSegmentRomStart, (uintptr_t)_dmadataSegmentStart,
|
||||
//(uintptr_t)(_dmadataSegmentRomEnd - _dmadataSegmentRomStart));
|
||||
// DmaMgr_DmaRomToRam((uintptr_t)_dmadataSegmentRomStart, (uintptr_t)_dmadataSegmentStart,
|
||||
//(uintptr_t)(_dmadataSegmentRomEnd - _dmadataSegmentRomStart));
|
||||
osSyncPrintf("dma_rom_ad[]\n");
|
||||
|
||||
sDmaMgrIsRomCompressed = false;
|
||||
@@ -425,8 +425,8 @@ void DmaMgr_Init(void) {
|
||||
osStartThread(&sDmaMgrThread);
|
||||
}
|
||||
|
||||
s32 DmaMgr_SendRequest2(DmaRequest* req, uintptr_t ram, uintptr_t vrom, size_t size, u32 unk5, OSMesgQueue* queue, OSMesg msg,
|
||||
const char* file, s32 line) {
|
||||
s32 DmaMgr_SendRequest2(DmaRequest* req, uintptr_t ram, uintptr_t vrom, size_t size, u32 unk5, OSMesgQueue* queue,
|
||||
OSMesg msg, const char* file, s32 line) {
|
||||
#if 0
|
||||
req->filename = file;
|
||||
req->line = line;
|
||||
@@ -435,7 +435,7 @@ s32 DmaMgr_SendRequest2(DmaRequest* req, uintptr_t ram, uintptr_t vrom, size_t s
|
||||
}
|
||||
|
||||
s32 DmaMgr_SendRequest1(void* ram0, uintptr_t vrom, size_t size, const char* file, s32 line) {
|
||||
//printf("DmaMgr_SendRequest1 called...\n");
|
||||
// printf("DmaMgr_SendRequest1 called...\n");
|
||||
return 0;
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
u8* gAudioHeap;
|
||||
u8* gSystemHeap;
|
||||
|
||||
void Heaps_Alloc(void)
|
||||
{
|
||||
void Heaps_Alloc(void) {
|
||||
#ifdef _MSC_VER
|
||||
gAudioHeap = (u8*)_aligned_malloc(AUDIO_HEAP_SIZE, 0x10);
|
||||
gSystemHeap = (u8*)_aligned_malloc(SYSTEM_HEAP_SIZE, 0x10);
|
||||
@@ -31,8 +30,7 @@ void Heaps_Alloc(void)
|
||||
assert(gSystemHeap != NULL);
|
||||
}
|
||||
|
||||
void Heaps_Free(void)
|
||||
{
|
||||
void Heaps_Free(void) {
|
||||
#ifdef _MSC_VER
|
||||
_aligned_free(gAudioHeap);
|
||||
_aligned_free(gSystemHeap);
|
||||
|
||||
@@ -17,7 +17,7 @@ void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf,
|
||||
}
|
||||
|
||||
void PreRender_Init(PreRender* this) {
|
||||
memset(this,0, sizeof(PreRender));
|
||||
memset(this, 0, sizeof(PreRender));
|
||||
ListAlloc_Init(&this->alloc);
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ void func_800C1F20(PreRender* this, Gfx** gfxp) {
|
||||
LOG_CHECK_NULL_POINTER("this->fbuf", this->fbuf);
|
||||
|
||||
if ((this->fbufSave != NULL) && (this->fbuf != NULL)) {
|
||||
func_800C1AE8(this, gfxp, this->fbuf, this->fbufSave);
|
||||
func_800C1AE8(this, gfxp, this->fbuf, this->fbufSave);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -138,5 +138,5 @@ void THA_Ct(TwoHeadArena* tha, void* ptr, size_t size) {
|
||||
}
|
||||
|
||||
void THA_Dt(TwoHeadArena* tha) {
|
||||
memset(tha,0, sizeof(TwoHeadArena));
|
||||
memset(tha, 0, sizeof(TwoHeadArena));
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
// SOH [General] This file corresponds to decomp's "__osMalloc_gc.c", there's currently no file corresponding to decomp's "__osMalloc_n64.c"
|
||||
// SOH [General] This file corresponds to decomp's "__osMalloc_gc.c", there's currently no file corresponding to
|
||||
// decomp's "__osMalloc_n64.c"
|
||||
|
||||
// #region SOH [General] We currently don't set OOT_DEBUG when building so set it here manually
|
||||
#define OOT_DEBUG 1
|
||||
@@ -180,7 +181,7 @@ ArenaNode* ArenaImpl_GetLastBlock(Arena* arena) {
|
||||
}
|
||||
|
||||
void __osMallocInit(Arena* arena, void* start, size_t size) {
|
||||
memset(arena,0, sizeof(Arena));
|
||||
memset(arena, 0, sizeof(Arena));
|
||||
ArenaImpl_LockInit(arena);
|
||||
__osMallocAddBlock(arena, start, size);
|
||||
arena->isInit = true;
|
||||
@@ -649,7 +650,8 @@ void* __osRealloc(Arena* arena, void* ptr, size_t newSize) {
|
||||
} else if (node->size < newSize) {
|
||||
next = NODE_GET_NEXT(node);
|
||||
sizeDiff = newSize - node->size;
|
||||
if ((uintptr_t)next == ((uintptr_t)node + node->size + sizeof(ArenaNode)) && next->isFree && next->size >= sizeDiff) {
|
||||
if ((uintptr_t)next == ((uintptr_t)node + node->size + sizeof(ArenaNode)) && next->isFree &&
|
||||
next->size >= sizeDiff) {
|
||||
// "Merge because there is a free block after the current memory block"
|
||||
osSyncPrintf("現メモリブロックの後ろにフリーブロックがあるので結合します\n");
|
||||
next->size -= sizeDiff;
|
||||
@@ -879,8 +881,7 @@ s32 __osCheckArena(Arena* arena) {
|
||||
if (NODE_IS_VALID(iter)) {
|
||||
#if OOT_DEBUG
|
||||
// "Oops!! (%08x %08x)"
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "おおっと!! (%08x %08x)\n" VT_RST, iter,
|
||||
iter->magic);
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "おおっと!! (%08x %08x)\n" VT_RST, iter, iter->magic);
|
||||
#else
|
||||
// "Oops!! (%08x %08x)"
|
||||
osSyncPrintf("おおっと!! (%08x %08x)\n", iter, iter->magic);
|
||||
|
||||
+28
-27
@@ -55,27 +55,27 @@ void AudioMgr_ThreadEntry(void* arg0) {
|
||||
AudioMgr* audioMgr = (AudioMgr*)arg0;
|
||||
s16* msg = NULL;
|
||||
|
||||
//while (true) {
|
||||
osRecvMesg(&audioMgr->unk_74, (OSMesg*)&msg, OS_MESG_BLOCK);
|
||||
AudioMgr_HandleRetrace(audioMgr);
|
||||
/*switch (*msg) {
|
||||
case OS_SC_RETRACE_MSG:
|
||||
AudioMgr_HandleRetrace(audioMgr);
|
||||
while (audioMgr->unk_74.validCount != 0) {
|
||||
osRecvMesg(&audioMgr->unk_74, (OSMesg*)&msg, OS_MESG_BLOCK);
|
||||
switch (*msg) {
|
||||
case OS_SC_RETRACE_MSG:
|
||||
break;
|
||||
case OS_SC_PRE_NMI_MSG:
|
||||
AudioMgr_HandlePRENMI(audioMgr);
|
||||
break;
|
||||
}
|
||||
// while (true) {
|
||||
osRecvMesg(&audioMgr->unk_74, (OSMesg*)&msg, OS_MESG_BLOCK);
|
||||
AudioMgr_HandleRetrace(audioMgr);
|
||||
/*switch (*msg) {
|
||||
case OS_SC_RETRACE_MSG:
|
||||
AudioMgr_HandleRetrace(audioMgr);
|
||||
while (audioMgr->unk_74.validCount != 0) {
|
||||
osRecvMesg(&audioMgr->unk_74, (OSMesg*)&msg, OS_MESG_BLOCK);
|
||||
switch (*msg) {
|
||||
case OS_SC_RETRACE_MSG:
|
||||
break;
|
||||
case OS_SC_PRE_NMI_MSG:
|
||||
AudioMgr_HandlePRENMI(audioMgr);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case OS_SC_PRE_NMI_MSG:
|
||||
AudioMgr_HandlePRENMI(audioMgr);
|
||||
break;
|
||||
}*/
|
||||
}
|
||||
break;
|
||||
case OS_SC_PRE_NMI_MSG:
|
||||
AudioMgr_HandlePRENMI(audioMgr);
|
||||
break;
|
||||
}*/
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ void AudioMgr_Unlock(AudioMgr* audioMgr) {
|
||||
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr) {
|
||||
// AudioPlayer_Init();
|
||||
|
||||
memset(audioMgr,0, sizeof(AudioMgr));
|
||||
memset(audioMgr, 0, sizeof(AudioMgr));
|
||||
|
||||
audioMgr->sched = sched;
|
||||
audioMgr->irqMgr = irqMgr;
|
||||
@@ -98,7 +98,7 @@ void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedCon
|
||||
|
||||
osSendMesgPtr(&audioMgr->unk_AC, NULL, OS_MESG_BLOCK);
|
||||
|
||||
static bool hasInitialized = false;
|
||||
static bool hasInitialized = false;
|
||||
|
||||
if (!hasInitialized) {
|
||||
IrqMgrClient irqClient;
|
||||
@@ -108,17 +108,18 @@ void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedCon
|
||||
AudioLoad_SetDmaHandler(DmaMgr_DmaHandler);
|
||||
Audio_InitSound();
|
||||
osSendMesgPtr(&audioMgr->unk_C8, NULL, OS_MESG_BLOCK);
|
||||
|
||||
Audio_SetGameVolume(SEQ_PLAYER_BGM_MAIN, ((float)CVarGetInteger(CVAR_SETTING("Volume.MainMusic"), 100) / 100.0f));
|
||||
|
||||
Audio_SetGameVolume(SEQ_PLAYER_BGM_MAIN,
|
||||
((float)CVarGetInteger(CVAR_SETTING("Volume.MainMusic"), 100) / 100.0f));
|
||||
Audio_SetGameVolume(SEQ_PLAYER_BGM_SUB, ((float)CVarGetInteger(CVAR_SETTING("Volume.SubMusic"), 100) / 100.0f));
|
||||
Audio_SetGameVolume(SEQ_PLAYER_FANFARE, ((float)CVarGetInteger(CVAR_SETTING("Volume.Fanfare"), 100) / 100.0f));
|
||||
Audio_SetGameVolume(SEQ_PLAYER_SFX, ((float)CVarGetInteger(CVAR_SETTING("Volume.SFX"), 100) / 100.0f));
|
||||
|
||||
// Removed due to crash
|
||||
//IrqMgr_AddClient(audioMgr->irqMgr, &irqClient, &audioMgr->unk_74);
|
||||
// IrqMgr_AddClient(audioMgr->irqMgr, &irqClient, &audioMgr->unk_74);
|
||||
hasInitialized = true;
|
||||
}
|
||||
|
||||
//osCreateThread(&audioMgr->unk_E8, id, AudioMgr_ThreadEntry, audioMgr, stack, pri);
|
||||
//osStartThread(&audioMgr->unk_E8);
|
||||
// osCreateThread(&audioMgr->unk_E8, id, AudioMgr_ThreadEntry, audioMgr, stack, pri);
|
||||
// osStartThread(&audioMgr->unk_E8);
|
||||
}
|
||||
|
||||
@@ -544,10 +544,10 @@ u8 gDefaultShortNoteGateTimeTable[] = {
|
||||
};
|
||||
|
||||
AdsrEnvelope gDefaultEnvelope[] = {
|
||||
{ BE16SWAP_CONST(1), BE16SWAP_CONST(32000) },
|
||||
{ BE16SWAP_CONST(1), BE16SWAP_CONST(32000) },
|
||||
{ BE16SWAP_CONST(1000), BE16SWAP_CONST(32000) },
|
||||
{ BE16SWAP_CONST(-1), BE16SWAP_CONST(0) },
|
||||
{ BE16SWAP_CONST(0), BE16SWAP_CONST(0) },
|
||||
{ BE16SWAP_CONST(-1), BE16SWAP_CONST(0) },
|
||||
{ BE16SWAP_CONST(0), BE16SWAP_CONST(0) },
|
||||
};
|
||||
|
||||
NoteSubEu gZeroNoteSub = { 0 };
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
|
||||
#define ROUND(num) floorf((num) * 100) / 100;
|
||||
#define ROUND(num) floorf((num)*100) / 100;
|
||||
|
||||
void Audio_SequenceChannelProcessSound(SequenceChannel* channel, s32 recalculateVolume, s32 b) {
|
||||
f32 channelVolume;
|
||||
|
||||
@@ -1201,8 +1201,7 @@ void AudioHeap_DiscardSampleCacheEntry(SampleCacheEntry* entry) {
|
||||
}
|
||||
}
|
||||
|
||||
void AudioHeap_UnapplySampleCache(SampleCacheEntry* entry, SoundFontSample* sample)
|
||||
{
|
||||
void AudioHeap_UnapplySampleCache(SampleCacheEntry* entry, SoundFontSample* sample) {
|
||||
}
|
||||
|
||||
SampleCacheEntry* AudioHeap_AllocPersistentSampleCacheEntry(size_t size) {
|
||||
|
||||
+61
-83
@@ -53,9 +53,8 @@ void AudioLoad_SyncDmaUnkMedium(uintptr_t devAddr, u8* addr, size_t size, s32 un
|
||||
s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, uintptr_t devAddr, uintptr_t ramAddr, size_t size,
|
||||
OSMesgQueue* reqQueue, s32 medium, const char* dmaFuncType);
|
||||
void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, OSMesgQueue* retQueue);
|
||||
AudioAsyncLoad* AudioLoad_StartAsyncLoadUnkMedium(s32 unkMediumParam, uintptr_t devAddr, uintptr_t ramAddr,
|
||||
size_t size, s32 medium,
|
||||
s32 nChunks, OSMesgQueue* retQueue, s32 retMsg);
|
||||
AudioAsyncLoad* AudioLoad_StartAsyncLoadUnkMedium(s32 unkMediumParam, uintptr_t devAddr, uintptr_t ramAddr, size_t size,
|
||||
s32 medium, s32 nChunks, OSMesgQueue* retQueue, s32 retMsg);
|
||||
AudioAsyncLoad* AudioLoad_StartAsyncLoad(uintptr_t devAddr, uintptr_t ramAddr, size_t size, s32 medium, s32 nChunks,
|
||||
OSMesgQueue* retQueue, s32 retMsg);
|
||||
void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, size_t size);
|
||||
@@ -420,8 +419,7 @@ void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 arg1) {
|
||||
s32 AudioLoad_SyncLoadSample(SoundFontSample* sample, s32 fontId) {
|
||||
void* sampleAddr;
|
||||
|
||||
if (sample->unk_bit25 == 1)
|
||||
{
|
||||
if (sample->unk_bit25 == 1) {
|
||||
if (sample->medium != MEDIUM_RAM) {
|
||||
sampleAddr = AudioHeap_AllocSampleCache(sample->size, fontId, (void*)sample->sampleAddr, sample->medium,
|
||||
CACHE_PERSISTENT);
|
||||
@@ -591,11 +589,10 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
|
||||
seqData2.cachePolicy = authCachePolicy;
|
||||
}
|
||||
|
||||
for (int i = 0; i < seqData2.numFonts; i++)
|
||||
{
|
||||
for (int i = 0; i < seqData2.numFonts; i++) {
|
||||
fontId = seqData2.fonts[i];
|
||||
AudioLoad_SyncLoadFont(fontId); // NOTE: If this is commented out, then enemies will play child link sounds...
|
||||
//numFonts--;
|
||||
// numFonts--;
|
||||
}
|
||||
|
||||
seqData = AudioLoad_SyncLoadSeq(seqId);
|
||||
@@ -619,24 +616,21 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
|
||||
// Fix for barinade boss fight starting music multiple times
|
||||
// this is not noticeable if the sequence is authentic, since the "Boss Battle"
|
||||
// sequence begins with some silence
|
||||
if (gPlayState != NULL &&
|
||||
gPlayState->sceneNum == SCENE_JABU_JABU_BOSS &&
|
||||
playerIdx == SEQ_PLAYER_BGM_MAIN &&
|
||||
if (gPlayState != NULL && gPlayState->sceneNum == SCENE_JABU_JABU_BOSS && playerIdx == SEQ_PLAYER_BGM_MAIN &&
|
||||
seqId != NA_BGM_BOSS) {
|
||||
|
||||
|
||||
seqPlayer->delay = 10;
|
||||
}
|
||||
|
||||
|
||||
AudioSeq_SkipForwardSequence(seqPlayer);
|
||||
//! @bug missing return (but the return value is not used so it's not UB)
|
||||
|
||||
|
||||
// Keep track of the previous sequence/scene so we don't repeat notifications
|
||||
static uint16_t previousSeqId = UINT16_MAX;
|
||||
static int16_t previousSceneNum = INT16_MAX;
|
||||
if (CVarGetInteger(CVAR_AUDIO("SeqNameOverlay"), 0) &&
|
||||
playerIdx == SEQ_PLAYER_BGM_MAIN &&
|
||||
if (CVarGetInteger(CVAR_AUDIO("SeqNameOverlay"), 0) && playerIdx == SEQ_PLAYER_BGM_MAIN &&
|
||||
(seqId != previousSeqId || (gPlayState != NULL && gPlayState->sceneNum != previousSceneNum))) {
|
||||
|
||||
|
||||
previousSeqId = seqId;
|
||||
if (gPlayState != NULL) {
|
||||
previousSceneNum = gPlayState->sceneNum;
|
||||
@@ -679,7 +673,7 @@ uintptr_t AudioLoad_TrySyncLoadSampleBank(u32 sampleBankId, u32* outMedium, s32
|
||||
return ret;
|
||||
}
|
||||
|
||||
//cachePolicy = sampleBankTable->entries[sampleBankId].cachePolicy;
|
||||
// cachePolicy = sampleBankTable->entries[sampleBankId].cachePolicy;
|
||||
if (/* cachePolicy == 4 || */ noLoad == true) {
|
||||
*outMedium = sampleBankTable->entries[sampleBankId].medium;
|
||||
return sampleBankTable->entries[realTableId].romAddr;
|
||||
@@ -714,16 +708,16 @@ SoundFontData* AudioLoad_SyncLoadFont(u32 fontId) {
|
||||
|
||||
relocInfo.sampleBankId1 = sampleBankId1;
|
||||
relocInfo.sampleBankId2 = sampleBankId2;
|
||||
//if (sampleBankId1 != 0xFF) {
|
||||
//relocInfo.baseAddr1 = AudioLoad_TrySyncLoadSampleBank(sampleBankId1, &relocInfo.medium1, false);
|
||||
// if (sampleBankId1 != 0xFF) {
|
||||
// relocInfo.baseAddr1 = AudioLoad_TrySyncLoadSampleBank(sampleBankId1, &relocInfo.medium1, false);
|
||||
//} else {
|
||||
relocInfo.baseAddr1 = 0;
|
||||
relocInfo.baseAddr1 = 0;
|
||||
//}
|
||||
|
||||
//if (sampleBankId2 != 0xFF) {
|
||||
//relocInfo.baseAddr2 = AudioLoad_TrySyncLoadSampleBank(sampleBankId2, &relocInfo.medium2, false);
|
||||
// if (sampleBankId2 != 0xFF) {
|
||||
// relocInfo.baseAddr2 = AudioLoad_TrySyncLoadSampleBank(sampleBankId2, &relocInfo.medium2, false);
|
||||
//} else {
|
||||
relocInfo.baseAddr2 = 0;
|
||||
relocInfo.baseAddr2 = 0;
|
||||
//}
|
||||
|
||||
ret = AudioLoad_SyncLoad(FONT_TABLE, fontId, &didAllocate);
|
||||
@@ -757,31 +751,26 @@ uintptr_t AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) {
|
||||
char* seqData = 0;
|
||||
SoundFont* fnt;
|
||||
|
||||
if (tableType == SEQUENCE_TABLE)
|
||||
{
|
||||
if (tableType == SEQUENCE_TABLE) {
|
||||
SequenceData sData = ResourceMgr_LoadSeqByName(sequenceMap[id]);
|
||||
seqData = sData.seqData;
|
||||
size = sData.seqDataSize;
|
||||
medium = sData.medium;
|
||||
cachePolicy = sData.cachePolicy;
|
||||
romAddr = 0;
|
||||
}
|
||||
else if (tableType == FONT_TABLE)
|
||||
{
|
||||
} else if (tableType == FONT_TABLE) {
|
||||
fnt = ResourceMgr_LoadAudioSoundFont(fontMap[id]);
|
||||
size = sizeof(SoundFont);
|
||||
medium = 2;
|
||||
cachePolicy = 0;
|
||||
romAddr = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//table = AudioLoad_GetLoadTable(tableType);
|
||||
//size = table->entries[realId].size;
|
||||
//size = ALIGN16(size);
|
||||
//medium = table->entries[id].medium;
|
||||
//cachePolicy = table->entries[id].cachePolicy;
|
||||
//romAddr = table->entries[realId].romAddr;
|
||||
} else {
|
||||
// table = AudioLoad_GetLoadTable(tableType);
|
||||
// size = table->entries[realId].size;
|
||||
// size = ALIGN16(size);
|
||||
// medium = table->entries[id].medium;
|
||||
// cachePolicy = table->entries[id].cachePolicy;
|
||||
// romAddr = table->entries[realId].romAddr;
|
||||
}
|
||||
|
||||
switch (cachePolicy) {
|
||||
@@ -820,9 +809,8 @@ uintptr_t AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) {
|
||||
AudioLoad_SyncDma(seqData, ret, size, medium);
|
||||
} else if (tableType == FONT_TABLE) {
|
||||
AudioLoad_SyncDma(fnt, ret, size, medium);
|
||||
}
|
||||
else {
|
||||
//AudioLoad_SyncDma(romAddr, ret, size, medium);
|
||||
} else {
|
||||
// AudioLoad_SyncDma(romAddr, ret, size, medium);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -846,18 +834,17 @@ uintptr_t AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
u32 AudioLoad_GetRealTableIndex(s32 tableType, u32 id)
|
||||
{
|
||||
u32 AudioLoad_GetRealTableIndex(s32 tableType, u32 id) {
|
||||
if ((tableType == SEQUENCE_TABLE || tableType == FONT_TABLE)) {
|
||||
return id;
|
||||
}
|
||||
|
||||
//AudioTable* table = AudioLoad_GetLoadTable(tableType);
|
||||
// AudioTable* table = AudioLoad_GetLoadTable(tableType);
|
||||
|
||||
// If the size is 0, then this entry actually redirects to another entry.
|
||||
// The rom address is actually an index into the same table where the "real" data is.
|
||||
//if (table->entries[id].size == 0) {
|
||||
//id = table->entries[id].romAddr;
|
||||
// if (table->entries[id].size == 0) {
|
||||
// id = table->entries[id].romAddr;
|
||||
//}
|
||||
|
||||
return id;
|
||||
@@ -921,15 +908,12 @@ void AudioLoad_RelocateFont(s32 fontId, SoundFontData* mem, RelocInfo* relocInfo
|
||||
#define BASE_OFFSET(x) (void*)((u32)(x) + (u32)(mem))
|
||||
|
||||
reloc2 = ptrs[0];
|
||||
if ((numDrums != 0))
|
||||
{
|
||||
if ((numDrums != 0)) {
|
||||
ptrs[0] = BASE_OFFSET(reloc2);
|
||||
for (i = 0; i < numDrums; i++)
|
||||
{
|
||||
for (i = 0; i < numDrums; i++) {
|
||||
drum = sf->drums[i];
|
||||
|
||||
if (!drum->loaded)
|
||||
{
|
||||
if (!drum->loaded) {
|
||||
AudioLoad_RelocateSample(&sf->drums[i]->sound, mem, relocInfo, fontOffsets[fontId]);
|
||||
drum->loaded = 1;
|
||||
}
|
||||
@@ -956,8 +940,7 @@ void AudioLoad_RelocateFont(s32 fontId, SoundFontData* mem, RelocInfo* relocInfo
|
||||
inst = sf->instruments[i];
|
||||
|
||||
if (inst != NULL && !inst->loaded) {
|
||||
if (inst->normalRangeLo != 0)
|
||||
{
|
||||
if (inst->normalRangeLo != 0) {
|
||||
AudioLoad_RelocateSample(&inst->lowNotesSound, mem, relocInfo, fontOffsets[fontId]);
|
||||
}
|
||||
AudioLoad_RelocateSample(&inst->normalNotesSound, mem, relocInfo, fontOffsets[fontId]);
|
||||
@@ -976,7 +959,7 @@ void AudioLoad_RelocateFont(s32 fontId, SoundFontData* mem, RelocInfo* relocInfo
|
||||
void AudioLoad_SyncDma(uintptr_t devAddr, u8* addr, size_t size, s32 medium) {
|
||||
OSMesgQueue* msgQueue = &gAudioContext.syncDmaQueue;
|
||||
OSIoMesg* ioMesg = &gAudioContext.syncDmaIoMesg;
|
||||
//size = ALIGN16(size);
|
||||
// size = ALIGN16(size);
|
||||
|
||||
Audio_InvalDCache(addr, size);
|
||||
|
||||
@@ -1257,9 +1240,9 @@ void AudioLoad_InitSwapFont(void) {
|
||||
|
||||
#undef BASE_ROM_OFFSET
|
||||
|
||||
int strcmp_sort( const void *str1, const void *str2 ) {
|
||||
char *const *pp1 = str1;
|
||||
char *const *pp2 = str2;
|
||||
int strcmp_sort(const void* str1, const void* str2) {
|
||||
char* const* pp1 = str1;
|
||||
char* const* pp2 = str2;
|
||||
return strcmp(*pp1, *pp2);
|
||||
}
|
||||
|
||||
@@ -1335,11 +1318,11 @@ void AudioLoad_Init(void* heap, size_t heapSize) {
|
||||
gAudioContext.aiBuffers[i] = AudioHeap_AllocZeroed(&gAudioContext.audioInitPool, AIBUF_LEN * sizeof(s16));
|
||||
}
|
||||
|
||||
//gAudioContext.sequenceTable = (AudioTable*)gSequenceTable;
|
||||
//gAudioContext.soundFontTable = (AudioTable*)gSoundFontTable;
|
||||
//gAudioContext.sampleBankTable = (AudioTable*)gSampleBankTable;
|
||||
//gAudioContext.sequenceFontTable = gSequenceFontTable;
|
||||
//gAudioContext.numSequences = gAudioContext.sequenceTable->numEntries;
|
||||
// gAudioContext.sequenceTable = (AudioTable*)gSequenceTable;
|
||||
// gAudioContext.soundFontTable = (AudioTable*)gSoundFontTable;
|
||||
// gAudioContext.sampleBankTable = (AudioTable*)gSampleBankTable;
|
||||
// gAudioContext.sequenceFontTable = gSequenceFontTable;
|
||||
// gAudioContext.numSequences = gAudioContext.sequenceTable->numEntries;
|
||||
|
||||
gAudioContext.audioResetSpecIdToLoad = 0;
|
||||
gAudioContext.resetStatus = 1;
|
||||
@@ -1350,12 +1333,11 @@ void AudioLoad_Init(void* heap, size_t heapSize) {
|
||||
int customSeqListSize = 0;
|
||||
char** seqList = ResourceMgr_ListFiles("audio/sequences*", &seqListSize);
|
||||
char** customSeqList = ResourceMgr_ListFiles("custom/music/*", &customSeqListSize);
|
||||
sequenceMapSize = (size_t)(AudioCollection_SequenceMapSize() + customSeqListSize);
|
||||
sequenceMapSize = (size_t)(AudioCollection_SequenceMapSize() + customSeqListSize);
|
||||
sequenceMap = malloc(sequenceMapSize * sizeof(char*));
|
||||
gAudioContext.seqLoadStatus = malloc(sequenceMapSize * sizeof(char*));
|
||||
|
||||
for (size_t i = 0; i < seqListSize; i++)
|
||||
{
|
||||
for (size_t i = 0; i < seqListSize; i++) {
|
||||
SequenceData sDat = ResourceMgr_LoadSeqByName(seqList[i]);
|
||||
|
||||
char* str = malloc(strlen(seqList[i]) + 1);
|
||||
@@ -1370,10 +1352,11 @@ void AudioLoad_Init(void* heap, size_t heapSize) {
|
||||
int startingSeqNum = MAX_AUTHENTIC_SEQID; // 109 is the highest vanilla sequence
|
||||
qsort(customSeqList, customSeqListSize, sizeof(char*), strcmp_sort);
|
||||
|
||||
// Because AudioCollection's sequenceMap actually has more than sequences (including instruments from 130-135 and sfx in the 2000s, 6000s, 10000s, 14000s, 18000s, and 26000s),
|
||||
// it's better here to keep track of the next empty seqNum in AudioCollection instead of just skipping past the instruments at 130 with a higher MAX_AUTHENTIC_SEQID,
|
||||
// especially if those others could be added to in the future. However, this really needs to be streamlined with specific ranges in AudioCollection for types, or unifying
|
||||
// AudioCollection and the various maps in here
|
||||
// Because AudioCollection's sequenceMap actually has more than sequences (including instruments from 130-135 and
|
||||
// sfx in the 2000s, 6000s, 10000s, 14000s, 18000s, and 26000s), it's better here to keep track of the next empty
|
||||
// seqNum in AudioCollection instead of just skipping past the instruments at 130 with a higher MAX_AUTHENTIC_SEQID,
|
||||
// especially if those others could be added to in the future. However, this really needs to be streamlined with
|
||||
// specific ranges in AudioCollection for types, or unifying AudioCollection and the various maps in here
|
||||
int seqNum = startingSeqNum;
|
||||
|
||||
for (size_t i = startingSeqNum; i < startingSeqNum + customSeqListSize; i++) {
|
||||
@@ -1398,8 +1381,7 @@ void AudioLoad_Init(void* heap, size_t heapSize) {
|
||||
int fntListSize = 0;
|
||||
char** fntList = ResourceMgr_ListFiles("audio/fonts*", &fntListSize);
|
||||
|
||||
for (int i = 0; i < fntListSize; i++)
|
||||
{
|
||||
for (int i = 0; i < fntListSize; i++) {
|
||||
SoundFont* sf = ResourceMgr_LoadAudioSoundFont(fntList[i]);
|
||||
|
||||
char* str = malloc(strlen(fntList[i]) + 1);
|
||||
@@ -1408,11 +1390,10 @@ void AudioLoad_Init(void* heap, size_t heapSize) {
|
||||
fontMap[sf->fntIndex] = str;
|
||||
}
|
||||
|
||||
numFonts = fntListSize;
|
||||
|
||||
free(fntList);
|
||||
gAudioContext.soundFonts = AudioHeap_Alloc(&gAudioContext.audioInitPool, numFonts * sizeof(SoundFont));
|
||||
numFonts = fntListSize;
|
||||
|
||||
free(fntList);
|
||||
gAudioContext.soundFonts = AudioHeap_Alloc(&gAudioContext.audioInitPool, numFonts * sizeof(SoundFont));
|
||||
|
||||
if (temp_v0_3 = AudioHeap_Alloc(&gAudioContext.audioInitPool, D_8014A6C4.permanentPoolSize), temp_v0_3 == NULL) {
|
||||
// cast away const from D_8014A6C4
|
||||
@@ -1641,8 +1622,7 @@ void AudioLoad_InitAsyncLoads(void) {
|
||||
}
|
||||
|
||||
AudioAsyncLoad* AudioLoad_StartAsyncLoadUnkMedium(s32 unkMediumParam, uintptr_t devAddr, uintptr_t ramAddr, size_t size,
|
||||
s32 medium,
|
||||
s32 nChunks, OSMesgQueue* retQueue, s32 retMsg) {
|
||||
s32 medium, s32 nChunks, OSMesgQueue* retQueue, s32 retMsg) {
|
||||
AudioAsyncLoad* asyncLoad;
|
||||
|
||||
asyncLoad = AudioLoad_StartAsyncLoad(devAddr, ramAddr, size, medium, nChunks, retQueue, retMsg);
|
||||
@@ -1830,8 +1810,7 @@ void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, size_t size) {
|
||||
void AudioLoad_AsyncDmaUnkMedium(uintptr_t devAddr, uintptr_t ramAddr, size_t size, s16 arg3) {
|
||||
}
|
||||
|
||||
void AudioLoad_RelocateSample(SoundFontSound* sound, SoundFontData* mem, RelocInfo* relocInfo, int fontId)
|
||||
{
|
||||
void AudioLoad_RelocateSample(SoundFontSound* sound, SoundFontData* mem, RelocInfo* relocInfo, int fontId) {
|
||||
}
|
||||
|
||||
void AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, SoundFontData* mem, RelocInfo* relocInfo, s32 async) {
|
||||
@@ -2205,10 +2184,9 @@ void AudioLoad_LoadPermanentSamples(void) {
|
||||
for (i = 0; i < gAudioContext.permanentPool.count; i++) {
|
||||
RelocInfo relocInfo;
|
||||
|
||||
if (gAudioContext.permanentCache[i].tableType == FONT_TABLE)
|
||||
{
|
||||
if (gAudioContext.permanentCache[i].tableType == FONT_TABLE) {
|
||||
fontId = AudioLoad_GetRealTableIndex(FONT_TABLE, gAudioContext.permanentCache[i].id);
|
||||
//fontId = gAudioContext.permanentCache[i].id;
|
||||
// fontId = gAudioContext.permanentCache[i].id;
|
||||
|
||||
SoundFont* sf = ResourceMgr_LoadAudioSoundFont(fontMap[fontId]);
|
||||
relocInfo.sampleBankId1 = sf->sampleBankId1;
|
||||
|
||||
@@ -302,7 +302,6 @@ void Audio_ProcessNotes(void) {
|
||||
|
||||
subAttrs.frequency *= resampRate;
|
||||
|
||||
|
||||
subAttrs.velocity *= scale;
|
||||
Audio_InitNoteSub(note, noteSubEu2, &subAttrs);
|
||||
noteSubEu->bitField1.bookOffset = bookOffset;
|
||||
@@ -363,12 +362,11 @@ Drum* Audio_GetDrum(s32 fontId, s32 drumId) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SoundFont* sf = ResourceMgr_LoadAudioSoundFont(fontMap[fontId]);
|
||||
if (drumId < sf->numDrums) {
|
||||
drum = sf->drums[drumId];
|
||||
}
|
||||
|
||||
|
||||
if (drum == NULL) {
|
||||
gAudioContext.audioErrorFlags = ((fontId << 8) + drumId) + 0x5000000;
|
||||
}
|
||||
|
||||
@@ -944,12 +944,10 @@ u8 AudioSeq_GetInstrument(SequenceChannel* channel, u8 instId, Instrument** inst
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (inst->envelope != NULL)
|
||||
{
|
||||
if (inst->envelope != NULL) {
|
||||
adsr->envelope = inst->envelope;
|
||||
adsr->releaseRate = (inst->releaseRate);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
adsr->envelope = gDefaultEnvelope;
|
||||
}
|
||||
|
||||
@@ -1064,8 +1062,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
result = (u8)parameters[0];
|
||||
command = (u8)parameters[0];
|
||||
|
||||
if (seqPlayer->defaultFont != 0xFF)
|
||||
{
|
||||
if (seqPlayer->defaultFont != 0xFF) {
|
||||
if (gAudioContext.seqReplaced[seqPlayer->playerIdx]) {
|
||||
seqPlayer->seqId = gAudioContext.seqToPlay[seqPlayer->playerIdx];
|
||||
gAudioContext.seqReplaced[seqPlayer->playerIdx] = 0;
|
||||
@@ -1075,8 +1072,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
command = sDat.fonts[sDat.numFonts - result - 1];
|
||||
}
|
||||
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command))
|
||||
{
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command)) {
|
||||
channel->fontId = command;
|
||||
}
|
||||
|
||||
@@ -1181,8 +1177,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
result = (u8)parameters[0];
|
||||
command = (u8)parameters[0];
|
||||
|
||||
if (seqPlayer->defaultFont != 0xFF)
|
||||
{
|
||||
if (seqPlayer->defaultFont != 0xFF) {
|
||||
if (gAudioContext.seqReplaced[seqPlayer->playerIdx]) {
|
||||
seqPlayer->seqId = gAudioContext.seqToPlay[seqPlayer->playerIdx];
|
||||
gAudioContext.seqReplaced[seqPlayer->playerIdx] = 0;
|
||||
@@ -1190,16 +1185,15 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
u16 seqId = AudioEditor_GetReplacementSeq(seqPlayer->seqId);
|
||||
SequenceData sDat = ResourceMgr_LoadSeqByName(sequenceMap[seqId]);
|
||||
|
||||
// The game apparantely would sometimes do negative array lookups, the result of which would get rejected by AudioHeap_SearchCaches, never
|
||||
// changing the actual fontid.
|
||||
// The game apparantely would sometimes do negative array lookups, the result of which would
|
||||
// get rejected by AudioHeap_SearchCaches, never changing the actual fontid.
|
||||
if (result > sDat.numFonts)
|
||||
break;
|
||||
|
||||
command = sDat.fonts[(sDat.numFonts - result - 1)];
|
||||
}
|
||||
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command))
|
||||
{
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command)) {
|
||||
channel->fontId = command;
|
||||
}
|
||||
|
||||
@@ -1353,7 +1347,8 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
break;
|
||||
case 0xB2:
|
||||
offset = (u16)parameters[0];
|
||||
channel->unk_22 = BE16SWAP(*(u16*)(seqPlayer->seqData + (uintptr_t)(offset + scriptState->value * 2)));
|
||||
channel->unk_22 =
|
||||
BE16SWAP(*(u16*)(seqPlayer->seqData + (uintptr_t)(offset + scriptState->value * 2)));
|
||||
break;
|
||||
case 0xB4:
|
||||
channel->dynTable = (void*)&seqPlayer->seqData[channel->unk_22];
|
||||
|
||||
@@ -164,7 +164,8 @@ Acmd* AudioSynth_Update(Acmd* cmdStart, s32* cmdCnt, s16* aiStart, s32 aiBufLen)
|
||||
}
|
||||
}
|
||||
|
||||
cmdP = AudioSynth_DoOneAudioUpdate(aiBufP, chunkLen, cmdP, gAudioContext.audioBufferParameters.updatesPerFrame - i);
|
||||
cmdP = AudioSynth_DoOneAudioUpdate(aiBufP, chunkLen, cmdP,
|
||||
gAudioContext.audioBufferParameters.updatesPerFrame - i);
|
||||
aiBufLen -= chunkLen;
|
||||
aiBufP += chunkLen * 2;
|
||||
}
|
||||
@@ -561,8 +562,8 @@ Acmd* AudioSynth_DoOneAudioUpdate(s16* aiBuf, s32 aiBufLen, Acmd* cmd, s32 updat
|
||||
NoteSubEu* noteSubEu2;
|
||||
s32 unk14;
|
||||
|
||||
//if (aiBufLen == 0)
|
||||
//return;
|
||||
// if (aiBufLen == 0)
|
||||
// return;
|
||||
|
||||
t = gAudioContext.numNotes * updateIndex;
|
||||
count = 0;
|
||||
@@ -756,10 +757,9 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
||||
cmd = AudioSynth_LoadWaveSamples(cmd, noteSubEu, synthState, nSamplesToLoad);
|
||||
noteSamplesDmemAddrBeforeResampling = DMEM_UNCOMPRESSED_NOTE + (synthState->samplePosInt * 2);
|
||||
synthState->samplePosInt += nSamplesToLoad;
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
audioFontSample = noteSubEu->sound.soundFontSound->sample;
|
||||
|
||||
|
||||
loopInfo = audioFontSample->loop;
|
||||
loopEndPos = loopInfo->end;
|
||||
sampleAddr = audioFontSample->sampleAddr;
|
||||
@@ -828,7 +828,6 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
||||
noteFinished = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch (audioFontSample->codec) {
|
||||
case CODEC_ADPCM:
|
||||
@@ -857,7 +856,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
||||
AudioSynth_ClearBuffer(cmd++, DMEM_UNCOMPRESSED_NOTE, (samplesLenAdjusted * 2) + 0x20);
|
||||
AudioSynth_LoadBuffer(cmd++, DMEM_UNCOMPRESSED_NOTE, ALIGN16(nSamplesToLoad * 2),
|
||||
audioFontSample->sampleAddr + (synthState->samplePosInt * 2));
|
||||
|
||||
|
||||
flags = A_CONTINUE;
|
||||
skipBytes = 0;
|
||||
nSamplesProcessed = samplesLenAdjusted;
|
||||
@@ -870,8 +869,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
||||
if (nFramesToDecode != 0) {
|
||||
frameIndex = (synthState->samplePosInt + skipInitialSamples - nFirstFrameSamplesToIgnore) / 16;
|
||||
sampleDataOffset = frameIndex * frameSize;
|
||||
if (audioFontSample->medium == MEDIUM_RAM)
|
||||
{
|
||||
if (audioFontSample->medium == MEDIUM_RAM) {
|
||||
sampleData = (u8*)(sampleDataStart + sampleDataOffset + sampleAddr);
|
||||
} else if (audioFontSample->medium == MEDIUM_UNK) {
|
||||
return cmd;
|
||||
@@ -958,7 +956,8 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
||||
|
||||
skip:
|
||||
if (noteFinished) {
|
||||
AudioSynth_ClearBuffer(cmd++, DMEM_UNCOMPRESSED_NOTE + s5, (samplesLenAdjusted - nSamplesProcessed) * 2);
|
||||
AudioSynth_ClearBuffer(cmd++, DMEM_UNCOMPRESSED_NOTE + s5,
|
||||
(samplesLenAdjusted - nSamplesProcessed) * 2);
|
||||
finished = true;
|
||||
note->noteSubEu.bitField0.finished = true;
|
||||
func_800DB2C0(updateIndex, noteIndex);
|
||||
@@ -1034,8 +1033,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
||||
unk7 = noteSubEu->unk_07;
|
||||
unkE = noteSubEu->unk_0E;
|
||||
buf = &synthState->synthesisBuffers->panSamplesBuffer[0x18];
|
||||
if (unk7 != 0 && noteSubEu->unk_0E != 0)
|
||||
{
|
||||
if (unk7 != 0 && noteSubEu->unk_0E != 0) {
|
||||
AudioSynth_DMemMove(cmd++, DMEM_TEMP, DMEM_SCRATCH2, aiBufLen * 2);
|
||||
thing = DMEM_SCRATCH2 - unk7;
|
||||
if (synthState->unk_1A != 0) {
|
||||
|
||||
@@ -63,7 +63,6 @@ void func_800AA0B4(void) {
|
||||
|
||||
gPadMgr.retraceCallback = func_800A9F30;
|
||||
gPadMgr.retraceCallbackValue = 0;
|
||||
|
||||
}
|
||||
|
||||
void func_800AA0F0(void) {
|
||||
|
||||
@@ -110,7 +110,7 @@ void func_800D2E30(UnkRumbleStruct* arg0) {
|
||||
}
|
||||
|
||||
void func_800D3140(UnkRumbleStruct* arg0) {
|
||||
memset(arg0, 0,sizeof(UnkRumbleStruct));
|
||||
memset(arg0, 0, sizeof(UnkRumbleStruct));
|
||||
arg0->unk_104 = 2;
|
||||
arg0->unk_105 = 1;
|
||||
}
|
||||
|
||||
@@ -396,8 +396,7 @@ void Audio_QueueCmd(u32 opArgs, u32 data) {
|
||||
}
|
||||
|
||||
void Audio_QueueCmdF32(u32 opArgs, f32 data) {
|
||||
union
|
||||
{
|
||||
union {
|
||||
f32 f;
|
||||
u32 u;
|
||||
} uData = { .f = data };
|
||||
@@ -428,9 +427,8 @@ s32 Audio_ScheduleProcessCmds(void) {
|
||||
D_801304E8 = (u8)((gAudioContext.cmdWrPos - gAudioContext.cmdRdPos) + 0x100);
|
||||
}
|
||||
|
||||
ret =
|
||||
osSendMesg32(gAudioContext.cmdProcQueueP,
|
||||
(((gAudioContext.cmdRdPos & 0xFF) << 8) | (gAudioContext.cmdWrPos & 0xFF)), OS_MESG_NOBLOCK);
|
||||
ret = osSendMesg32(gAudioContext.cmdProcQueueP,
|
||||
(((gAudioContext.cmdRdPos & 0xFF) << 8) | (gAudioContext.cmdWrPos & 0xFF)), OS_MESG_NOBLOCK);
|
||||
if (ret != -1) {
|
||||
gAudioContext.cmdRdPos = gAudioContext.cmdWrPos;
|
||||
ret = 0;
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
#define Audio_SeqCmd8(playerIdx, a, b, c) \
|
||||
Audio_QueueSeqCmd(0x80000000 | ((u8)playerIdx << 24) | ((u8)a << 16) | ((u8)b << 8) | ((u8)c))
|
||||
#define Audio_SeqCmdF(playerIdx, a) Audio_QueueSeqCmd(0xF0000000 | ((u8)playerIdx << 24) | ((u8)a))
|
||||
#define BTN_CUSTOM_RSTICK_UP ((CONTROLLERBUTTONS_T)0x01000000)
|
||||
#define BTN_CUSTOM_RSTICK_DOWN ((CONTROLLERBUTTONS_T)0x02000000)
|
||||
#define BTN_CUSTOM_RSTICK_LEFT ((CONTROLLERBUTTONS_T)0x04000000)
|
||||
#define BTN_CUSTOM_RSTICK_RIGHT ((CONTROLLERBUTTONS_T)0x08000000)
|
||||
#define BTN_CUSTOM_RSTICK_UP ((CONTROLLERBUTTONS_T)0x01000000)
|
||||
#define BTN_CUSTOM_RSTICK_DOWN ((CONTROLLERBUTTONS_T)0x02000000)
|
||||
#define BTN_CUSTOM_RSTICK_LEFT ((CONTROLLERBUTTONS_T)0x04000000)
|
||||
#define BTN_CUSTOM_RSTICK_RIGHT ((CONTROLLERBUTTONS_T)0x08000000)
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 vol;
|
||||
@@ -1265,8 +1265,7 @@ void Audio_OcaUpdateBtnMap(bool customControls) {
|
||||
sOcarinaA4BtnMap = BTN_CUSTOM_OCARINA_NOTE_A4;
|
||||
sOcarinaF4BtnMap = BTN_CUSTOM_OCARINA_NOTE_F4;
|
||||
sOcarinaD4BtnMap = BTN_CUSTOM_OCARINA_NOTE_D4;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
sOcarinaD5BtnMap = BTN_CUP;
|
||||
sOcarinaB4BtnMap = BTN_CLEFT;
|
||||
sOcarinaA4BtnMap = BTN_CRIGHT;
|
||||
@@ -1286,13 +1285,8 @@ void Audio_OcaUpdateBtnMap(bool customControls) {
|
||||
sOcarinaF4BtnMap |= BTN_CUSTOM_RSTICK_DOWN;
|
||||
}
|
||||
|
||||
sOcarinaAllowedBtnMask = (
|
||||
sOcarinaD5BtnMap |
|
||||
sOcarinaB4BtnMap |
|
||||
sOcarinaA4BtnMap |
|
||||
sOcarinaF4BtnMap |
|
||||
sOcarinaD4BtnMap
|
||||
);
|
||||
sOcarinaAllowedBtnMask =
|
||||
(sOcarinaD5BtnMap | sOcarinaB4BtnMap | sOcarinaA4BtnMap | sOcarinaF4BtnMap | sOcarinaD4BtnMap);
|
||||
}
|
||||
|
||||
void Audio_GetOcaInput(void) {
|
||||
@@ -1545,10 +1539,8 @@ void func_800ED200(void) {
|
||||
disableSongBtnMap = BTN_L;
|
||||
}
|
||||
|
||||
if (
|
||||
CHECK_BTN_ANY(sCurOcarinaBtnPress, disableSongBtnMap)
|
||||
&& CHECK_BTN_ANY(sCurOcarinaBtnPress, sOcarinaAllowedBtnMask)
|
||||
) {
|
||||
if (CHECK_BTN_ANY(sCurOcarinaBtnPress, disableSongBtnMap) &&
|
||||
CHECK_BTN_ANY(sCurOcarinaBtnPress, sOcarinaAllowedBtnMask)) {
|
||||
func_800ECC04((u16)D_80130F3C);
|
||||
return;
|
||||
}
|
||||
@@ -1875,7 +1867,6 @@ void func_800EDD68(u8 arg0) {
|
||||
lastNote = song[i].noteIdx;
|
||||
}
|
||||
|
||||
|
||||
if (sRecordSongPos != (i + 1)) {
|
||||
sRecordSongPos = i + 2;
|
||||
song[sRecordSongPos - 1].unk_02 = 0;
|
||||
@@ -2062,7 +2053,7 @@ void func_800EE404(void) {
|
||||
|
||||
void Audio_OcaMemoryGameStart(u8 minigameRound) {
|
||||
u8 i;
|
||||
|
||||
|
||||
// #region SOH [Enhancement]
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("CustomizeOcarinaGame"), 0)) {
|
||||
u8 startingNotes = 3;
|
||||
@@ -2071,7 +2062,6 @@ void Audio_OcaMemoryGameStart(u8 minigameRound) {
|
||||
u8 roundThreeCount = CVarGetInteger(CVAR_ENHANCEMENT("OcarinaGame.RoundThreeNotes"), 8);
|
||||
u8 modMinigameNoteCnts[] = { roundOneCount, roundTwoCount, roundThreeCount };
|
||||
|
||||
|
||||
startingNotes = CVarGetInteger(CVAR_ENHANCEMENT("OcarinaGame.StartingNotes"), 3);
|
||||
|
||||
if (minigameRound > 2) {
|
||||
@@ -2084,7 +2074,7 @@ void Audio_OcaMemoryGameStart(u8 minigameRound) {
|
||||
for (i = 0; i < startingNotes; i++) {
|
||||
Audio_OcaMemoryGameGenNote();
|
||||
}
|
||||
// #endregion
|
||||
// #endregion
|
||||
} else {
|
||||
if (minigameRound > 2) {
|
||||
minigameRound = 2;
|
||||
@@ -2124,7 +2114,7 @@ s32 Audio_OcaMemoryGameGenNote(void) {
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].volume = 0x50;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].vibrato = 0;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].tone = 0;
|
||||
// #endregion
|
||||
// #endregion
|
||||
} else {
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].noteIdx = rndNote;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].unk_02 = 0x2D;
|
||||
@@ -3077,7 +3067,8 @@ void AudioDebug_ProcessInput_SndCont(void) {
|
||||
case 2:
|
||||
case 3:
|
||||
Audio_PlaySoundGeneral(((sAudioSndContWork[2] << 12) & 0xFFFF) + sAudioSndContWork[3] + SFX_FLAG,
|
||||
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
break;
|
||||
case 4:
|
||||
func_800F6700(sAudioSndContWork[sAudioSndContSel]);
|
||||
@@ -3476,7 +3467,8 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
|
||||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) {
|
||||
sfx = (u16)(sAudioSfxParamChgWork[0] << 12) + sAudioSfxParamChgWork[1] + SFX_FLAG;
|
||||
Audio_PlaySoundGeneral(sfx, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(sfx, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {
|
||||
@@ -4007,7 +3999,8 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) {
|
||||
|
||||
if (getItem.modIndex == MOD_NONE) {
|
||||
if (((itemId >= ITEM_RUPEE_GREEN) && (itemId <= ITEM_RUPEE_GOLD)) || (itemId == ITEM_HEART)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_BOXITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_BOXITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
if (itemId == ITEM_HEART_CONTAINER ||
|
||||
((itemId == ITEM_HEART_PIECE_2) && ((gSaveContext.inventory.questItems & 0xF0000000) == 0x40000000))) {
|
||||
@@ -4018,7 +4011,7 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) {
|
||||
// If we get a skulltula token or the "WINNER" heart, play "get small item"
|
||||
// Also make sure "WINNER" heart is not the 4th heart piece.
|
||||
if (itemId == ITEM_SKULL_TOKEN || (getItemId == GI_HEART_PIECE_WIN && itemId == ITEM_HEART_PIECE_2 &&
|
||||
(gSaveContext.inventory.questItems & 0xF0000000) != 0x40000000)) {
|
||||
(gSaveContext.inventory.questItems & 0xF0000000) != 0x40000000)) {
|
||||
temp1 = NA_BGM_SMALL_ITEM_GET | 0x900;
|
||||
}
|
||||
// If the setting is toggled on and we get special quest items (longer fanfares):
|
||||
@@ -4037,9 +4030,9 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) {
|
||||
}
|
||||
}
|
||||
Audio_PlayFanfare(temp1);
|
||||
}
|
||||
}
|
||||
} else if (getItem.modIndex == MOD_RANDOMIZER) {
|
||||
if ((itemId >= RG_BOTTLE_WITH_RED_POTION && itemId <= RG_BOTTLE_WITH_BIG_POE) ||
|
||||
if ((itemId >= RG_BOTTLE_WITH_RED_POTION && itemId <= RG_BOTTLE_WITH_BIG_POE) ||
|
||||
(itemId >= RG_DEKU_TREE_MAP && itemId <= RG_GANONS_CASTLE_SMALL_KEY)) {
|
||||
temp1 = NA_BGM_ITEM_GET | 0x900;
|
||||
} else {
|
||||
@@ -4112,7 +4105,8 @@ void func_800F4190(Vec3f* pos, u16 sfxId) {
|
||||
void Audio_PlaySoundRandom(Vec3f* pos, u16 baseSfxId, u8 randLim) {
|
||||
u8 offset = Audio_NextRandom() % randLim;
|
||||
|
||||
Audio_PlaySoundGeneral(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800F4254(Vec3f* pos, u8 level) {
|
||||
@@ -4121,10 +4115,12 @@ void func_800F4254(Vec3f* pos, u8 level) {
|
||||
D_801305F4 = D_801305E4[level];
|
||||
switch (level) {
|
||||
case 1:
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
break;
|
||||
case 2:
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4132,7 +4128,8 @@ void func_800F4254(Vec3f* pos, u8 level) {
|
||||
}
|
||||
|
||||
if (level != 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4189,8 +4186,8 @@ void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale) {
|
||||
sRiverFreqScaleLerp.remainingFrames = 40;
|
||||
sRiverFreqScaleLerp.step = (sRiverFreqScaleLerp.target - sRiverFreqScaleLerp.value) / 40;
|
||||
}
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale) {
|
||||
@@ -4253,8 +4250,7 @@ void func_800F4870(u8 arg0) {
|
||||
}
|
||||
|
||||
// (name derived from debug strings, should probably update. used in ganon/ganon_boss scenes)
|
||||
s32 Audio_SetGanonDistVol(u8 targetVol)
|
||||
{
|
||||
s32 Audio_SetGanonDistVol(u8 targetVol) {
|
||||
u8 phi_v0;
|
||||
u16 phi_v0_2;
|
||||
u8 i;
|
||||
@@ -4318,8 +4314,8 @@ void func_800F4A70(void) {
|
||||
}
|
||||
|
||||
void Audio_PlaySoundIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones) {
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitones[sAudioIncreasingTranspose] + 39], &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitones[sAudioIncreasingTranspose] + 39],
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (sAudioIncreasingTranspose < 15) {
|
||||
sAudioIncreasingTranspose++;
|
||||
@@ -4331,7 +4327,8 @@ void Audio_ResetIncreasingTranspose(void) {
|
||||
}
|
||||
|
||||
void Audio_PlaySoundTransposed(Vec3f* pos, u16 sfxId, s8 semitone) {
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitone + 39], &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitone + 39], &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800F4C58(Vec3f* pos, u16 sfxId, u8 arg2) {
|
||||
@@ -4691,8 +4688,7 @@ void func_800F5C2C(void) {
|
||||
sPrevMainBgmSeqId = NA_BGM_DISABLED;
|
||||
}
|
||||
|
||||
void Audio_PlayFanfare(u16 seqId)
|
||||
{
|
||||
void Audio_PlayFanfare(u16 seqId) {
|
||||
u16 curSeqId;
|
||||
u32 outNumFonts;
|
||||
u8* curFontId;
|
||||
@@ -4707,17 +4703,17 @@ void Audio_PlayFanfare(u16 seqId)
|
||||
curFontId = func_800E5E84(curSeqId & 0xFF, &outNumFonts);
|
||||
requestedFontId = func_800E5E84(seqId & 0xFF, &outNumFonts);
|
||||
|
||||
if (!curFontId || !requestedFontId) {
|
||||
// disable BGM, we're about to null deref!
|
||||
D_8016B9F4 = 1;
|
||||
} else {
|
||||
if ((curSeqId == NA_BGM_DISABLED) || (*curFontId == *requestedFontId)) {
|
||||
D_8016B9F4 = 1;
|
||||
} else {
|
||||
D_8016B9F4 = 5;
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
}
|
||||
}
|
||||
if (!curFontId || !requestedFontId) {
|
||||
// disable BGM, we're about to null deref!
|
||||
D_8016B9F4 = 1;
|
||||
} else {
|
||||
if ((curSeqId == NA_BGM_DISABLED) || (*curFontId == *requestedFontId)) {
|
||||
D_8016B9F4 = 1;
|
||||
} else {
|
||||
D_8016B9F4 = 5;
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
}
|
||||
}
|
||||
D_8016B9F6 = seqId;
|
||||
}
|
||||
|
||||
@@ -4913,10 +4909,12 @@ void func_800F6268(f32 dist, u16 arg1) {
|
||||
void func_800F64E0(u8 arg0) {
|
||||
D_80130608 = arg0;
|
||||
if (arg0 != 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_QueueCmdS32(0xF1000000, 0);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WIN_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WIN_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_QueueCmdS32(0xF2000000, 0);
|
||||
}
|
||||
}
|
||||
@@ -4994,7 +4992,8 @@ void Audio_SetBaseFilter(u8 filter) {
|
||||
if (filter == 0) {
|
||||
Audio_StopSfxById(NA_SE_PL_IN_BUBBLE);
|
||||
} else if (sAudioBaseFilter == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_IN_BUBBLE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_IN_BUBBLE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
sAudioBaseFilter = filter;
|
||||
@@ -5027,7 +5026,8 @@ void Audio_PlaySoundGeneralIfNotInCutscene(u16 sfxId, Vec3f* pos, u8 arg2, f32*
|
||||
}
|
||||
|
||||
void Audio_PlaySoundIfNotInCutscene(u16 sfxId) {
|
||||
Audio_PlaySoundGeneralIfNotInCutscene(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneralIfNotInCutscene(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800F6964(u16 arg0) {
|
||||
|
||||
@@ -124,8 +124,7 @@ void Audio_ClearBGMMute(u8 channelIdx) {
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd)
|
||||
{
|
||||
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd) {
|
||||
size_t i;
|
||||
SoundRequest* req;
|
||||
|
||||
@@ -206,8 +205,7 @@ void Audio_RemoveMatchingSoundRequests(u8 aspect, SoundBankEntry* cmp) {
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_ProcessSoundRequest(void)
|
||||
{
|
||||
void Audio_ProcessSoundRequest(void) {
|
||||
u16 sfxId;
|
||||
u8 count;
|
||||
u8 index;
|
||||
@@ -314,8 +312,7 @@ void Audio_ProcessSoundRequest(void)
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_RemoveSoundBankEntry(u8 bankId, u8 entryIndex)
|
||||
{
|
||||
void Audio_RemoveSoundBankEntry(u8 bankId, u8 entryIndex) {
|
||||
SoundBankEntry* entry = &gSoundBanks[bankId][entryIndex];
|
||||
u8 i;
|
||||
|
||||
@@ -342,8 +339,7 @@ void Audio_RemoveSoundBankEntry(u8 bankId, u8 entryIndex)
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_ChooseActiveSounds(u8 bankId)
|
||||
{
|
||||
void Audio_ChooseActiveSounds(u8 bankId) {
|
||||
u8 numChosenSounds;
|
||||
u8 numChannels;
|
||||
u8 entryIndex;
|
||||
@@ -499,8 +495,7 @@ void Audio_ChooseActiveSounds(u8 bankId)
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_PlayActiveSounds(u8 bankId)
|
||||
{
|
||||
void Audio_PlayActiveSounds(u8 bankId) {
|
||||
u8 entryIndex;
|
||||
SequenceChannel* channel;
|
||||
SoundBankEntry* entry;
|
||||
@@ -560,8 +555,7 @@ void Audio_PlayActiveSounds(u8 bankId)
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_StopSfxByBank(u8 bankId)
|
||||
{
|
||||
void Audio_StopSfxByBank(u8 bankId) {
|
||||
SoundBankEntry* entry;
|
||||
s32 pad;
|
||||
SoundBankEntry cmp;
|
||||
@@ -622,8 +616,7 @@ void Audio_StopSfxByPos(Vec3f* pos) {
|
||||
Audio_RemoveMatchingSoundRequests(2, &cmp);
|
||||
}
|
||||
|
||||
void Audio_StopSfxByPosAndId(Vec3f* pos, u16 sfxId)
|
||||
{
|
||||
void Audio_StopSfxByPosAndId(Vec3f* pos, u16 sfxId) {
|
||||
SoundBankEntry* entry;
|
||||
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
|
||||
u8 prevEntryIndex = 0;
|
||||
@@ -742,8 +735,7 @@ void func_800F8F88(void) {
|
||||
}
|
||||
}
|
||||
|
||||
u8 Audio_IsSfxPlaying(u32 sfxId)
|
||||
{
|
||||
u8 Audio_IsSfxPlaying(u32 sfxId) {
|
||||
SoundBankEntry* entry;
|
||||
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
|
||||
|
||||
|
||||
@@ -268,9 +268,11 @@ void Audio_ProcessSeqCmd(u32 cmd) {
|
||||
duration++;
|
||||
}
|
||||
gActiveSeqs[playerIdx].channelData[chanIdx].volTarget = (f32)val / 127.0f;
|
||||
if (gActiveSeqs[playerIdx].channelData[chanIdx].volCur != gActiveSeqs[playerIdx].channelData[chanIdx].volTarget) {
|
||||
if (gActiveSeqs[playerIdx].channelData[chanIdx].volCur !=
|
||||
gActiveSeqs[playerIdx].channelData[chanIdx].volTarget) {
|
||||
gActiveSeqs[playerIdx].channelData[chanIdx].volStep =
|
||||
(gActiveSeqs[playerIdx].channelData[chanIdx].volCur - gActiveSeqs[playerIdx].channelData[chanIdx].volTarget) /
|
||||
(gActiveSeqs[playerIdx].channelData[chanIdx].volCur -
|
||||
gActiveSeqs[playerIdx].channelData[chanIdx].volTarget) /
|
||||
(f32)duration;
|
||||
gActiveSeqs[playerIdx].channelData[chanIdx].volTimer = duration;
|
||||
gActiveSeqs[playerIdx].volChannelFlags |= 1 << chanIdx;
|
||||
@@ -369,8 +371,7 @@ void Audio_ProcessSeqCmd(u32 cmd) {
|
||||
extern f32 D_80130F24;
|
||||
extern f32 D_80130F28;
|
||||
|
||||
void Audio_QueueSeqCmd(u32 cmd)
|
||||
{
|
||||
void Audio_QueueSeqCmd(u32 cmd) {
|
||||
u8 op = cmd >> 28;
|
||||
if (op == 0 || op == 2 || op == 12) {
|
||||
u8 seqId = cmd & 0xFF;
|
||||
@@ -543,7 +544,8 @@ void func_800FA3DC(void) {
|
||||
|
||||
gActiveSeqs[playerIdx].tempoTarget = phi_a2;
|
||||
gActiveSeqs[playerIdx].tempoCur = gAudioContext.seqPlayers[playerIdx].tempo / 0x30;
|
||||
gActiveSeqs[playerIdx].tempoStep = (gActiveSeqs[playerIdx].tempoCur - gActiveSeqs[playerIdx].tempoTarget) / phi_t0;
|
||||
gActiveSeqs[playerIdx].tempoStep =
|
||||
(gActiveSeqs[playerIdx].tempoCur - gActiveSeqs[playerIdx].tempoTarget) / phi_t0;
|
||||
gActiveSeqs[playerIdx].tempoTimer = phi_t0;
|
||||
gActiveSeqs[playerIdx].tempoCmd = 0;
|
||||
}
|
||||
@@ -582,9 +584,11 @@ void func_800FA3DC(void) {
|
||||
if (gActiveSeqs[playerIdx].channelData[k].freqScaleTimer != 0) {
|
||||
gActiveSeqs[playerIdx].channelData[k].freqScaleTimer--;
|
||||
if (gActiveSeqs[playerIdx].channelData[k].freqScaleTimer != 0) {
|
||||
gActiveSeqs[playerIdx].channelData[k].freqScaleCur -= gActiveSeqs[playerIdx].channelData[k].freqScaleStep;
|
||||
gActiveSeqs[playerIdx].channelData[k].freqScaleCur -=
|
||||
gActiveSeqs[playerIdx].channelData[k].freqScaleStep;
|
||||
} else {
|
||||
gActiveSeqs[playerIdx].channelData[k].freqScaleCur = gActiveSeqs[playerIdx].channelData[k].freqScaleTarget;
|
||||
gActiveSeqs[playerIdx].channelData[k].freqScaleCur =
|
||||
gActiveSeqs[playerIdx].channelData[k].freqScaleTarget;
|
||||
gActiveSeqs[playerIdx].freqScaleChannelFlags ^= (1 << k);
|
||||
}
|
||||
// CHAN_UPD_FREQ_SCALE
|
||||
|
||||
@@ -20,8 +20,7 @@ char D_80134488[0x18] = {
|
||||
0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
s32 Overlay_Load(uintptr_t vRomStart, uintptr_t vRomEnd, void* vRamStart, void* vRamEnd, void* allocatedVRamAddr)
|
||||
{
|
||||
s32 Overlay_Load(uintptr_t vRomStart, uintptr_t vRomEnd, void* vRamStart, void* vRamEnd, void* allocatedVRamAddr) {
|
||||
return 0;
|
||||
|
||||
#if 0
|
||||
|
||||
+105
-74
@@ -3,7 +3,7 @@
|
||||
|
||||
static PlayState* sPlayState;
|
||||
|
||||
char** cameraStrings = {0};
|
||||
char** cameraStrings = { 0 };
|
||||
|
||||
#define ACTION_E 0
|
||||
#define ACTION_SAVE 1
|
||||
@@ -26,7 +26,6 @@ static DbCamera* sDbCamPtr;
|
||||
static s16 D_8016110C;
|
||||
static DbCameraAnim sDbCamAnim;
|
||||
|
||||
|
||||
Vec3f* DbCamera_AddVecSph(Vec3f* out, Vec3f* in, VecSph* sph) {
|
||||
Vec3f ret;
|
||||
Vec3f vec;
|
||||
@@ -294,7 +293,8 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam) {
|
||||
|
||||
if (dbCamera->sub.nPoints < 6) {
|
||||
if (sDbCamAnim.unk_0A != 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sDbCamAnim.unk_0A = 0;
|
||||
}
|
||||
func_8006376C(0x0D, 0x17, 3, cameraStrings[0]);
|
||||
@@ -308,7 +308,8 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam) {
|
||||
!func_800BB2B4(&sDbCamAnim.lookAtPos, &sDbCamAnim.roll, &sDbCamAnim.fov, dbCamera->sub.lookAt,
|
||||
&sDbCamAnim.keyframe, &sDbCamAnim.curFrame) &&
|
||||
sDbCamAnim.unk_0A == 1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sDbCamAnim.unk_04++;
|
||||
|
||||
if (dbCamera->sub.nFrames > 0 && dbCamera->sub.nFrames < sDbCamAnim.unk_04) {
|
||||
@@ -536,7 +537,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
dbCamera->unk_40 = -1;
|
||||
dbCamera->sub.demoCtrlActionIdx = 0;
|
||||
sDbCamAnim.unk_0A = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (dbCamera->unk_38 == -1) {
|
||||
dbCamera->unk_38 = 1;
|
||||
} else {
|
||||
@@ -856,22 +858,25 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
dbCamera->unk_1C.z = 0.0f;
|
||||
dbCamera->unk_1C.y = 1.0f;
|
||||
} else if (dbCamera->sub.unk_08 == 2) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.unk_08 = 0;
|
||||
func_800B41DC(dbCamera, dbCamera->sub.unkIdx, cam);
|
||||
} else {
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_R) &&
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.nPoints = dbCamera->sub.unkIdx + 1;
|
||||
func_800B4088(dbCamera, cam);
|
||||
} else if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_R)) {
|
||||
if (dbCamera->sub.unkIdx == 0x80) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_PUTAWAY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_PUTAWAY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
func_800B42C0(dbCamera, cam);
|
||||
if (dbCamera->sub.unkIdx == (dbCamera->sub.nPoints - 1)) {
|
||||
dbCamera->sub.unkIdx++;
|
||||
@@ -923,7 +928,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
} else {
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CRIGHT) &&
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n");
|
||||
DbCamera_PrintPoints("Lookat", dbCamera->sub.nPoints, dbCamera->sub.lookAt);
|
||||
DbCamera_PrintPoints("Position", dbCamera->sub.nPoints, dbCamera->sub.position);
|
||||
@@ -932,13 +938,15 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
osSyncPrintf("@@@static short Mode = %d;\n@@@\n", dbCamera->sub.mode);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n");
|
||||
} else if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.unk_08 = (dbCamera->sub.unk_08 + 1) % 3;
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CUP) &&
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unkIdx > 0) {
|
||||
dbCamera->sub.unkIdx--;
|
||||
} else {
|
||||
@@ -946,8 +954,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
} else {
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unkIdx > 0) {
|
||||
dbCamera->sub.unkIdx--;
|
||||
} else {
|
||||
@@ -968,7 +976,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L) &&
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) {
|
||||
dbCamera->sub.unkIdx++;
|
||||
} else {
|
||||
@@ -976,8 +985,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
} else {
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) {
|
||||
dbCamera->sub.unkIdx++;
|
||||
} else {
|
||||
@@ -1046,8 +1055,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
case 1:
|
||||
dbCamera->unk_3C = true;
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unk_0A == 0) {
|
||||
dbCamera->sub.unk_0A = 5;
|
||||
} else {
|
||||
@@ -1055,8 +1064,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unk_0A == 5) {
|
||||
dbCamera->sub.unk_0A = 0;
|
||||
} else {
|
||||
@@ -1064,8 +1073,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
switch (dbCamera->sub.unk_0A) {
|
||||
case 1:
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L)) {
|
||||
@@ -1114,7 +1123,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_DLEFT)) {
|
||||
if ((D_8012D10C++ % 5) == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
@@ -1152,8 +1162,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
switch (dbCamera->sub.unk_0A) {
|
||||
case 1:
|
||||
@@ -1201,7 +1211,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_DRIGHT)) {
|
||||
if ((D_8012D10C++ % 5) == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
@@ -1226,11 +1237,14 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
}
|
||||
|
||||
DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].viewAngle, &cameraStrings[62][10], 3);
|
||||
DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].viewAngle, &cameraStrings[62][10],
|
||||
3);
|
||||
func_8006376C(0x0E, 0x14, (dbCamera->sub.unk_0A == 0) ? 7 : 4, cameraStrings[62]);
|
||||
DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].nextPointFrame, &cameraStrings[63][10], 3);
|
||||
DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].nextPointFrame,
|
||||
&cameraStrings[63][10], 3);
|
||||
func_8006376C(0x0E, 0x15, (dbCamera->sub.unk_0A == 1) ? 7 : 4, cameraStrings[63]);
|
||||
DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll, &cameraStrings[64][10], 3);
|
||||
DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll, &cameraStrings[64][10],
|
||||
3);
|
||||
func_8006376C(0x0E, 0x16, (dbCamera->sub.unk_0A == 2) ? 7 : 4, cameraStrings[64]);
|
||||
func_8006376C(0xF, 0x17, (dbCamera->sub.unk_0A == 3) ? 7 : 4,
|
||||
(dbCamera->sub.mode == 1) ? cameraStrings[13]
|
||||
@@ -1353,7 +1367,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
||||
dbCamera->fov = 60.0f;
|
||||
dbCamera->rollDegrees = dbCamera->roll * 1.40625f;
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->unk_78 = (dbCamera->unk_78 + 1) % 3;
|
||||
dbCamera->unk_38 = -1;
|
||||
}
|
||||
@@ -1634,7 +1649,8 @@ void DbCamera_DrawSlotLetters(char* str, s16 y, s16 x, s32 colorId) {
|
||||
void DbCamera_PrintAllCuts(Camera* cam) {
|
||||
s32 i;
|
||||
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n");
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++) {
|
||||
@@ -1777,8 +1793,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
if ((1 << sCurFileIdx) & sMempakFiles) {
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DLEFT) ||
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlToggleSwitch ^= 1;
|
||||
}
|
||||
cameraStrings[41][9] = sCurFileIdx + 'A';
|
||||
@@ -1791,12 +1807,12 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A)) {
|
||||
if (dbCamera->sub.demoCtrlToggleSwitch == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu++;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu = 0;
|
||||
}
|
||||
}
|
||||
@@ -1812,7 +1828,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu = 0;
|
||||
return 1;
|
||||
}
|
||||
@@ -1848,7 +1865,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.demoCtrlMenu == DEMO_CTRL_MENU(ACTION_LOAD, MENU_SUCCESS)) {
|
||||
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
|
||||
}
|
||||
@@ -1870,7 +1888,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu -= 9;
|
||||
}
|
||||
block_2:
|
||||
@@ -1904,8 +1923,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
sp74[i * 2 + 1] = '\0';
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (sCurFileIdx >= 4) {
|
||||
sCurFileIdx = 0;
|
||||
} else {
|
||||
@@ -1921,8 +1940,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (sCurFileIdx <= 0) {
|
||||
sCurFileIdx = 4;
|
||||
} else {
|
||||
@@ -1959,30 +1978,31 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
func_8006376C(0x12, 0x17, sDbCameraColors[idx1], cameraStrings[33]);
|
||||
func_8006376C(0x12, 0x18, sDbCameraColors[idx1 - 1], cameraStrings[34]);
|
||||
func_8006376C(0x12, 0x19, sDbCameraColors[idx1 - 2], cameraStrings[35]);
|
||||
func_8006376C(0xE, dbCamera->sub.demoCtrlActionIdx + 0x16, 7, cameraStrings[11]); // current selection
|
||||
func_8006376C(0xE, dbCamera->sub.demoCtrlActionIdx + 0x16, 7,
|
||||
cameraStrings[11]); // current selection
|
||||
func_8006376C(0xD, 0x1A, 5, cameraStrings[32]);
|
||||
func_8006376C(0x14, 0x1A, 5, cameraStrings[36]);
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u;
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlToggleSwitch = 0;
|
||||
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(dbCamera->sub.demoCtrlActionIdx, MENU_INFO);
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
|
||||
return 1;
|
||||
}
|
||||
@@ -1994,8 +2014,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DUP) ||
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DDOWN)) {
|
||||
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
|
||||
}
|
||||
return 2;
|
||||
@@ -2007,13 +2027,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
|
||||
default: {
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
|
||||
sCurFileIdx = 0;
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u;
|
||||
sCurFileIdx = 0;
|
||||
@@ -2052,7 +2074,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
if (func_800B91B0(cam, dbCamera) == 0) {
|
||||
Interface_ChangeAlpha(2);
|
||||
ShrinkWindow_SetVal(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
OLib_Vec3fDiffToVecSphGeo(&sp5C, &dbCamera->eye, &dbCamera->at);
|
||||
DbCamera_CalcUpFromPitchYawRoll(&dbCamera->unk_1C, sp5C.pitch, sp5C.yaw,
|
||||
@@ -2070,7 +2093,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
sDbCamAnim.unk_0A = 1;
|
||||
sDbCamAnim.unk_0C = 0;
|
||||
D_8016110C = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_L)) {
|
||||
@@ -2085,15 +2109,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
if (sLastFileIdx != -1) {
|
||||
switch (sp74[sCurFileIdx]) {
|
||||
case '?':
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sDbCameraCuts[idx1] = sDbCameraCuts[idx2];
|
||||
sp74[sCurFileIdx] = '?'; // useless
|
||||
DbCamera_ResetCut(idx2, false);
|
||||
break;
|
||||
case '-':
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
sp64 = sDbCameraCuts[idx2];
|
||||
if (sLastFileIdx < sCurFileIdx) {
|
||||
@@ -2115,8 +2139,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2125,7 +2149,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A)) {
|
||||
if (sp74[sCurFileIdx] == '?') {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sp74[sCurFileIdx] = DbCamera_InitCut(idx1, &dbCamera->sub);
|
||||
if (sp74[sCurFileIdx] == '?') {
|
||||
func_8006376C(0xF, 0x18, 7, cameraStrings[26]);
|
||||
@@ -2135,7 +2160,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
|
||||
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sp74[sCurFileIdx] = '?';
|
||||
DbCamera_ResetCut(idx1, true);
|
||||
}
|
||||
@@ -2143,7 +2169,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_R)) {
|
||||
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
for (i = 0; i < sDbCameraCuts[idx1].nPoints; i++) {
|
||||
dbCamera->sub.lookAt[i] = sDbCameraCuts[idx1].lookAt[i];
|
||||
@@ -2165,7 +2192,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (sCurFileIdx == 0x1E) {
|
||||
sCurFileIdx = 0;
|
||||
} else {
|
||||
@@ -2173,7 +2201,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sCurFileIdx = (sCurFileIdx == 0) ? 0x1E : sCurFileIdx - 1;
|
||||
}
|
||||
|
||||
@@ -2187,7 +2216,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
DbCamera_PrintAllCuts(cam);
|
||||
} else if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L) &&
|
||||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
for (i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++) {
|
||||
if (sDbCameraCuts[i].nPoints != 0) {
|
||||
osSyncPrintf("\n@@@ /* CUT [%d]\t*/", i);
|
||||
@@ -2203,7 +2233,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
Interface_ChangeAlpha(50);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
D_8016110C = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
func_8006376C(4, 7, 5, cameraStrings[28]);
|
||||
|
||||
+17
-32
@@ -55,8 +55,7 @@ void Fault_ClientProcessThread(void* arg) {
|
||||
}
|
||||
}
|
||||
|
||||
void Fault_ProcessClientContext(FaultClientContext* ctx)
|
||||
{
|
||||
void Fault_ProcessClientContext(FaultClientContext* ctx) {
|
||||
#if 0
|
||||
OSMesgQueue queue;
|
||||
OSMesg msg;
|
||||
@@ -115,8 +114,7 @@ u32 Fault_ProcessClient(u32 callback, u32 param0, u32 param1) {
|
||||
return a.ret;
|
||||
}
|
||||
|
||||
void Fault_AddClient(FaultClient* client, void* callback, void* param0, void* param1)
|
||||
{
|
||||
void Fault_AddClient(FaultClient* client, void* callback, void* param0, void* param1) {
|
||||
#if 0
|
||||
OSIntMask mask;
|
||||
s32 alreadyExists = false;
|
||||
@@ -149,8 +147,7 @@ end:
|
||||
#endif
|
||||
}
|
||||
|
||||
void Fault_RemoveClient(FaultClient* client)
|
||||
{
|
||||
void Fault_RemoveClient(FaultClient* client) {
|
||||
#if 0
|
||||
FaultClient* iter;
|
||||
FaultClient* lastIter;
|
||||
@@ -190,8 +187,7 @@ void Fault_RemoveClient(FaultClient* client)
|
||||
#endif
|
||||
}
|
||||
|
||||
void Fault_AddAddrConvClient(FaultAddrConvClient* client, void* callback, void* param)
|
||||
{
|
||||
void Fault_AddAddrConvClient(FaultAddrConvClient* client, void* callback, void* param) {
|
||||
#if 0
|
||||
OSIntMask mask;
|
||||
u32 alreadyExists = false;
|
||||
@@ -223,8 +219,7 @@ end:
|
||||
#endif
|
||||
}
|
||||
|
||||
void Fault_RemoveAddrConvClient(FaultAddrConvClient* client)
|
||||
{
|
||||
void Fault_RemoveAddrConvClient(FaultAddrConvClient* client) {
|
||||
#if 0
|
||||
FaultAddrConvClient* iter;
|
||||
FaultAddrConvClient* lastIter;
|
||||
@@ -265,8 +260,7 @@ void Fault_RemoveAddrConvClient(FaultAddrConvClient* client)
|
||||
#endif
|
||||
}
|
||||
|
||||
u32 Fault_ConvertAddress(FaultAddrConvClient* client)
|
||||
{
|
||||
u32 Fault_ConvertAddress(FaultAddrConvClient* client) {
|
||||
#if 0
|
||||
u32 ret;
|
||||
FaultAddrConvClient* iter = sFaultStructPtr->addrConvClients;
|
||||
@@ -296,15 +290,13 @@ void Fault_PadCallback(Input* input) {
|
||||
PadMgr_RequestPadData(&gPadMgr, input, 0);
|
||||
}
|
||||
|
||||
void Fault_UpdatePadImpl()
|
||||
{
|
||||
void Fault_UpdatePadImpl() {
|
||||
#if 0
|
||||
sFaultStructPtr->padCallback(&sFaultStructPtr->padInput);
|
||||
#endif
|
||||
}
|
||||
|
||||
u32 Fault_WaitForInputImpl()
|
||||
{
|
||||
u32 Fault_WaitForInputImpl() {
|
||||
#if 0
|
||||
Input* input = &sFaultStructPtr->padInput;
|
||||
s32 count = 600;
|
||||
@@ -455,7 +447,7 @@ void Fault_PrintThreadContext(OSThread* t) {
|
||||
FaultDrawer_Printf("S3:%08xH S4:%08xH S5:%08xH\n", (u32)ctx->s3, (u32)ctx->s4, (u32)ctx->s5);
|
||||
FaultDrawer_Printf("S6:%08xH S7:%08xH T8:%08xH\n", (u32)ctx->s6, (u32)ctx->s7, (u32)ctx->t8);
|
||||
FaultDrawer_Printf("T9:%08xH GP:%08xH SP:%08xH\n", (u32)ctx->t9, (u32)ctx->gp, (u32)ctx->sp);
|
||||
//FaultDrawer_Printf("S8:%08xH RA:%08xH LO:%08xH\n\n", (u32)ctx->s8, (u32)ctx->ra, (u32)ctx->lo);
|
||||
// FaultDrawer_Printf("S8:%08xH RA:%08xH LO:%08xH\n\n", (u32)ctx->s8, (u32)ctx->ra, (u32)ctx->lo);
|
||||
|
||||
Fault_PrintFPCR(ctx->fpcsr);
|
||||
FaultDrawer_Printf("\n");
|
||||
@@ -511,7 +503,7 @@ void Fault_LogThreadContext(OSThread* t) {
|
||||
osSyncPrintf("S3:%08xH S4:%08xH S5:%08xH\n", (u32)ctx->s3, (u32)ctx->s4, (u32)ctx->s5);
|
||||
osSyncPrintf("S6:%08xH S7:%08xH T8:%08xH\n", (u32)ctx->s6, (u32)ctx->s7, (u32)ctx->t8);
|
||||
osSyncPrintf("T9:%08xH GP:%08xH SP:%08xH\n", (u32)ctx->t9, (u32)ctx->gp, (u32)ctx->sp);
|
||||
//osSyncPrintf("S8:%08xH RA:%08xH LO:%08xH\n", (u32)ctx->s8, (u32)ctx->ra, (u32)ctx->lo);
|
||||
// osSyncPrintf("S8:%08xH RA:%08xH LO:%08xH\n", (u32)ctx->s8, (u32)ctx->ra, (u32)ctx->lo);
|
||||
osSyncPrintf("\n");
|
||||
Fault_LogFPCR(ctx->fpcsr);
|
||||
osSyncPrintf("\n");
|
||||
@@ -553,8 +545,7 @@ OSThread* Fault_FindFaultedThread() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Fault_Wait5Seconds(void)
|
||||
{
|
||||
void Fault_Wait5Seconds(void) {
|
||||
#if 0
|
||||
OSTime start[2]; // to make the function allocate 0x28 bytes of stack instead of 0x20
|
||||
|
||||
@@ -567,8 +558,7 @@ void Fault_Wait5Seconds(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void Fault_WaitForButtonCombo()
|
||||
{
|
||||
void Fault_WaitForButtonCombo() {
|
||||
#if 0
|
||||
Input* input = &sFaultStructPtr->padInput;
|
||||
s32 state;
|
||||
@@ -745,8 +735,7 @@ void Fault_DrawMemDumpPage(const char* title, u32* addr, u32 param_3) {
|
||||
FaultDrawer_SetCharPad(0, 0);
|
||||
}
|
||||
|
||||
void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1)
|
||||
{
|
||||
void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
||||
#if 0
|
||||
Input* input = &sFaultStructPtr->padInput;
|
||||
u32 addr = pc;
|
||||
@@ -955,8 +944,7 @@ void Fault_CommitFB() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void Fault_ProcessClients(void)
|
||||
{
|
||||
void Fault_ProcessClients(void) {
|
||||
#if 0
|
||||
FaultClient* iter = sFaultStructPtr->clients;
|
||||
s32 idx = 0;
|
||||
@@ -1068,16 +1056,14 @@ void Fault_ThreadEntry(void* arg) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void Fault_SetFB(void* fb, u16 w, u16 h)
|
||||
{
|
||||
void Fault_SetFB(void* fb, u16 w, u16 h) {
|
||||
#if 0
|
||||
sFaultStructPtr->fb = fb;
|
||||
FaultDrawer_SetDrawerFB(fb, w, h);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Fault_Init(void)
|
||||
{
|
||||
void Fault_Init(void) {
|
||||
#if 0
|
||||
sFaultStructPtr = &gFaultStruct;
|
||||
bzero(sFaultStructPtr, sizeof(FaultThreadStruct));
|
||||
@@ -1099,8 +1085,7 @@ void Fault_Init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void Fault_HangupFaultClient(const char* arg0, const char* arg1)
|
||||
{
|
||||
void Fault_HangupFaultClient(const char* arg0, const char* arg1) {
|
||||
#if 0
|
||||
osSyncPrintf("HungUp on Thread %d\n", osGetThreadId(0));
|
||||
osSyncPrintf("%s\n", arg0 != NULL ? arg0 : "(NULL)");
|
||||
|
||||
+5
-5
@@ -25,10 +25,10 @@ GameState* gGameState;
|
||||
// #endregion
|
||||
|
||||
// Forward declared, because this in a C++ header.
|
||||
int gfx_create_framebuffer(uint32_t width, uint32_t height, uint32_t native_width, uint32_t native_height, uint8_t resize);
|
||||
int gfx_create_framebuffer(uint32_t width, uint32_t height, uint32_t native_width, uint32_t native_height,
|
||||
uint8_t resize);
|
||||
void gfx_texture_cache_clear();
|
||||
|
||||
|
||||
void GameState_FaultPrint(void) {
|
||||
static char sBtnChars[] = "ABZSuldr*+LRudlr";
|
||||
s32 i;
|
||||
@@ -486,7 +486,8 @@ void GameState_Destroy(GameState* gameState) {
|
||||
|
||||
osSyncPrintf("game デストラクタ終了\n"); // "game destructor end"
|
||||
|
||||
// Performing clear skeletons before unload resources fixes an actor heap corruption crash due to the skeleton patching system.
|
||||
// Performing clear skeletons before unload resources fixes an actor heap corruption crash due to the skeleton
|
||||
// patching system.
|
||||
ResourceMgr_ClearSkeletons();
|
||||
|
||||
if (ResourceMgr_IsAltAssetsEnabled()) {
|
||||
@@ -507,8 +508,7 @@ u32 GameState_IsRunning(GameState* gameState) {
|
||||
return gameState->running;
|
||||
}
|
||||
|
||||
void* GameState_Alloc(GameState* gameState, size_t size, char* file, s32 line)
|
||||
{
|
||||
void* GameState_Alloc(GameState* gameState, size_t size, char* file, s32 line) {
|
||||
void* ret;
|
||||
|
||||
if (THA_IsCrash(&gameState->tha)) {
|
||||
|
||||
+20
-26
@@ -54,7 +54,7 @@ void Graph_FaultClient() {
|
||||
}
|
||||
|
||||
void Graph_DisassembleUCode(Gfx* workBuf) {
|
||||
#if 0
|
||||
#if 0
|
||||
UCodeDisas disassembler;
|
||||
|
||||
if (HREG(80) == 7 && HREG(81) != 0) {
|
||||
@@ -87,11 +87,11 @@ void Graph_DisassembleUCode(Gfx* workBuf) {
|
||||
}
|
||||
UCodeDisas_Destroy(&disassembler);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void Graph_UCodeFaultClient(Gfx* workBuf) {
|
||||
#if 0
|
||||
#if 0
|
||||
UCodeDisas disassembler;
|
||||
|
||||
UCodeDisas_Init(&disassembler);
|
||||
@@ -100,7 +100,7 @@ void Graph_UCodeFaultClient(Gfx* workBuf) {
|
||||
//UCodeDisas_SetCurUCode(&disassembler, D_80155F50);
|
||||
UCodeDisas_Disassemble(&disassembler, workBuf);
|
||||
UCodeDisas_Destroy(&disassembler);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void Graph_InitTHGA(GraphicsContext* gfxCtx) {
|
||||
@@ -149,7 +149,7 @@ GameStateOverlay* Graph_GetNextGameState(GameState* gameState) {
|
||||
}
|
||||
|
||||
void Graph_Init(GraphicsContext* gfxCtx) {
|
||||
memset(gfxCtx,0, sizeof(GraphicsContext));
|
||||
memset(gfxCtx, 0, sizeof(GraphicsContext));
|
||||
gfxCtx->gfxPoolIdx = 0;
|
||||
gfxCtx->fbIdx = 0;
|
||||
gfxCtx->viMode = NULL;
|
||||
@@ -184,8 +184,8 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
|
||||
|
||||
osRecvMesg(&gfxCtx->queue, &msg, OS_MESG_BLOCK);
|
||||
osStopTimer(&timer);
|
||||
//OTRTODO - Proper GFX crash handler
|
||||
#if 0
|
||||
// OTRTODO - Proper GFX crash handler
|
||||
#if 0
|
||||
if (msg == (OSMesg)666) {
|
||||
osSyncPrintf(VT_FGCOL(RED));
|
||||
osSyncPrintf("RCPが帰ってきませんでした。"); // "RCP did not return."
|
||||
@@ -204,7 +204,7 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
|
||||
}
|
||||
Fault_AddHungupAndCrashImpl("RCP is HUNG UP!!", "Oh! MY GOD!!");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
osRecvMesg(&gfxCtx->queue, &msg, OS_MESG_NOBLOCK);
|
||||
|
||||
D_8012D260 = gfxCtx->workBuffer;
|
||||
@@ -408,8 +408,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||
sGraphUpdateTime = time;
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))
|
||||
{
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) {
|
||||
if (CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) &&
|
||||
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) {
|
||||
gSaveContext.gameMode = GAMEMODE_NORMAL;
|
||||
@@ -433,8 +432,7 @@ extern AudioMgr gAudioMgr;
|
||||
|
||||
extern void ProcessSaveStateRequests(void);
|
||||
|
||||
static void RunFrame()
|
||||
{
|
||||
static void RunFrame() {
|
||||
u32 size;
|
||||
char faultMsg[0x50];
|
||||
static bool hasSetupSkybox = false;
|
||||
@@ -451,8 +449,7 @@ static void RunFrame()
|
||||
osSyncPrintf("グラフィックスレッド実行開始\n"); // "Start graphic thread execution"
|
||||
Graph_Init(&runFrameContext.gfxCtx);
|
||||
|
||||
while (runFrameContext.nextOvl)
|
||||
{
|
||||
while (runFrameContext.nextOvl) {
|
||||
runFrameContext.ovl = runFrameContext.nextOvl;
|
||||
Overlay_LoadGameState(runFrameContext.ovl);
|
||||
|
||||
@@ -461,8 +458,7 @@ static void RunFrame()
|
||||
|
||||
gGameState = SYSTEM_ARENA_MALLOC_DEBUG(size);
|
||||
|
||||
if (!gGameState)
|
||||
{
|
||||
if (!gGameState) {
|
||||
osSyncPrintf("確保失敗\n"); // "Failure to secure"
|
||||
|
||||
snprintf(faultMsg, sizeof(faultMsg), "CLASS SIZE= %d bytes", size);
|
||||
@@ -480,17 +476,16 @@ static void RunFrame()
|
||||
|
||||
uint64_t freq = GetFrequency();
|
||||
|
||||
while (GameState_IsRunning(gGameState))
|
||||
{
|
||||
//uint64_t ticksA, ticksB;
|
||||
//ticksA = GetPerfCounter();
|
||||
while (GameState_IsRunning(gGameState)) {
|
||||
// uint64_t ticksA, ticksB;
|
||||
// ticksA = GetPerfCounter();
|
||||
|
||||
Graph_StartFrame();
|
||||
|
||||
PadMgr_ThreadEntry(&gPadMgr);
|
||||
|
||||
Graph_Update(&runFrameContext.gfxCtx, gGameState);
|
||||
//ticksB = GetPerfCounter();
|
||||
// ticksB = GetPerfCounter();
|
||||
|
||||
if (GfxDebuggerIsDebuggingRequested()) {
|
||||
GfxDebuggerDebugDisplayList(runFrameContext.gfxCtx.workBuffer);
|
||||
@@ -498,13 +493,12 @@ static void RunFrame()
|
||||
|
||||
Graph_ProcessGfxCommands(runFrameContext.gfxCtx.workBuffer);
|
||||
|
||||
|
||||
//uint64_t diff = (ticksB - ticksA) / (freq / 1000);
|
||||
//printf("Frame simulated in %ims\n", diff);
|
||||
// uint64_t diff = (ticksB - ticksA) / (freq / 1000);
|
||||
// printf("Frame simulated in %ims\n", diff);
|
||||
runFrameContext.state = 1;
|
||||
ProcessSaveStateRequests();
|
||||
return;
|
||||
nextFrame:;
|
||||
nextFrame:;
|
||||
}
|
||||
|
||||
runFrameContext.nextOvl = Graph_GetNextGameState(gGameState);
|
||||
@@ -515,7 +509,7 @@ static void RunFrame()
|
||||
Graph_Destroy(&runFrameContext.gfxCtx);
|
||||
osSyncPrintf("グラフィックスレッド実行終了\n"); // "End of graphic thread execution"
|
||||
|
||||
//Graph_Update(gfxCtxTest, gameStateTest);
|
||||
// Graph_Update(gfxCtxTest, gameStateTest);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ void* Overlay_AllocateAndLoad(uintptr_t vRomStart, uintptr_t vRomEnd, void* vRam
|
||||
|
||||
if (gOverlayLogSeverity >= 3) {
|
||||
osSyncPrintf("OVL:SPEC(%08x-%08x) REAL(%08x-%08x) OFFSET(%08x)\n", vRamStart, vRamEnd, allocatedVRamAddr,
|
||||
((uintptr_t)vRamEnd - (uintptr_t)vRamStart) + (uintptr_t)allocatedVRamAddr, (uintptr_t)vRamStart - (uintptr_t)allocatedVRamAddr);
|
||||
((uintptr_t)vRamEnd - (uintptr_t)vRamStart) + (uintptr_t)allocatedVRamAddr,
|
||||
(uintptr_t)vRamStart - (uintptr_t)allocatedVRamAddr);
|
||||
}
|
||||
|
||||
if (allocatedVRamAddr != NULL) {
|
||||
|
||||
+2
-4
@@ -44,8 +44,7 @@ void Main_LogSystemHeap(void) {
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
int SDL_main(int argc, char** argv)
|
||||
{
|
||||
int SDL_main(int argc, char** argv) {
|
||||
AllocConsole();
|
||||
(void)freopen("CONIN$", "r", stdin);
|
||||
(void)freopen("CONOUT$", "w", stdout);
|
||||
@@ -55,8 +54,7 @@ int SDL_main(int argc, char** argv)
|
||||
#endif
|
||||
|
||||
#else //_WIN32
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int main(int argc, char** argv) {
|
||||
#endif
|
||||
|
||||
GameConsole_Init();
|
||||
|
||||
+11
-10
@@ -294,7 +294,7 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
|
||||
input->press.stick_x += (s8)(input->cur.stick_x - input->prev.stick_x);
|
||||
input->press.stick_y += (s8)(input->cur.stick_y - input->prev.stick_y);
|
||||
// #region SOH [Enhancement]
|
||||
PadUtils_UpdateRelRXY(input);
|
||||
PadUtils_UpdateRelRXY(input);
|
||||
input->press.right_stick_x += (s8)(input->cur.right_stick_x - input->prev.right_stick_x);
|
||||
input->press.right_stick_y += (s8)(input->cur.right_stick_y - input->prev.right_stick_y);
|
||||
// #endregion
|
||||
@@ -339,9 +339,9 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) {
|
||||
if (padMgr->padStatus[i].type == CONT_TYPE_NORMAL) {
|
||||
mask |= 1 << i;
|
||||
} else {
|
||||
//LOG_HEX("this->pad_status[i].type", padMgr->padStatus[i].type);
|
||||
// "An unknown type of controller is connected"
|
||||
//osSyncPrintf("知らない種類のコントローラが接続されています\n");
|
||||
// LOG_HEX("this->pad_status[i].type", padMgr->padStatus[i].type);
|
||||
// "An unknown type of controller is connected"
|
||||
// osSyncPrintf("知らない種類のコントローラが接続されています\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,7 +349,8 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) {
|
||||
|
||||
/* if (gFaultStruct.msgId) {
|
||||
PadMgr_RumbleStop(padMgr);
|
||||
} else */ if (padMgr->rumbleOffFrames > 0) {
|
||||
} else */
|
||||
if (padMgr->rumbleOffFrames > 0) {
|
||||
--padMgr->rumbleOffFrames;
|
||||
PadMgr_RumbleStop(padMgr);
|
||||
} else if (padMgr->rumbleOnFrames == 0) {
|
||||
@@ -409,7 +410,7 @@ void PadMgr_ThreadEntry(PadMgr* padMgr) {
|
||||
s16* mesg = NULL;
|
||||
s32 exit;
|
||||
|
||||
//osSyncPrintf("コントローラスレッド実行開始\n"); // "Controller thread execution start"
|
||||
// osSyncPrintf("コントローラスレッド実行開始\n"); // "Controller thread execution start"
|
||||
|
||||
exit = false;
|
||||
while (!exit) {
|
||||
@@ -419,7 +420,7 @@ void PadMgr_ThreadEntry(PadMgr* padMgr) {
|
||||
}
|
||||
|
||||
osRecvMesg(&padMgr->interruptMsgQ, (OSMesg*)&mesg, OS_MESG_BLOCK);
|
||||
//LOG_CHECK_NULL_POINTER("msg", mesg);
|
||||
// LOG_CHECK_NULL_POINTER("msg", mesg);
|
||||
|
||||
PadMgr_HandleRetraceMsg(padMgr);
|
||||
break;
|
||||
@@ -449,9 +450,9 @@ void PadMgr_ThreadEntry(PadMgr* padMgr) {
|
||||
}
|
||||
|
||||
// OTRTODO: Removed due to crash
|
||||
//IrqMgr_RemoveClient(padMgr->irqMgr, &padMgr->irqClient);
|
||||
// IrqMgr_RemoveClient(padMgr->irqMgr, &padMgr->irqClient);
|
||||
|
||||
//osSyncPrintf("コントローラスレッド実行終了\n"); // "Controller thread execution end"
|
||||
// osSyncPrintf("コントローラスレッド実行終了\n"); // "Controller thread execution end"
|
||||
}
|
||||
|
||||
void PadMgr_Init(PadMgr* padMgr, OSMesgQueue* siIntMsgQ, IrqMgr* irqMgr, OSId id, OSPri priority, void* stack) {
|
||||
@@ -462,7 +463,7 @@ void PadMgr_Init(PadMgr* padMgr, OSMesgQueue* siIntMsgQ, IrqMgr* irqMgr, OSId id
|
||||
|
||||
osCreateMesgQueue(&padMgr->interruptMsgQ, padMgr->interruptMsgBuf, 4);
|
||||
// OTRTODO: Removed due to crash
|
||||
//IrqMgr_AddClient(padMgr->irqMgr, &padMgr->irqClient, &padMgr->interruptMsgQ);
|
||||
// IrqMgr_AddClient(padMgr->irqMgr, &padMgr->irqClient, &padMgr->interruptMsgQ);
|
||||
osCreateMesgQueue(&padMgr->serialMsgQ, padMgr->serialMsgBuf, 1);
|
||||
PadMgr_UnlockSerialMesgQueue(padMgr, siIntMsgQ);
|
||||
osCreateMesgQueue(&padMgr->lockMsgQ, padMgr->lockMsgBuf, 1);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <string.h>
|
||||
|
||||
void PadUtils_Init(Input* input) {
|
||||
memset(input,0, sizeof(Input));
|
||||
memset(input, 0, sizeof(Input));
|
||||
}
|
||||
|
||||
void func_800FCB70(void) {
|
||||
|
||||
@@ -105,8 +105,8 @@ void Overlay_Relocate(void* allocatedVRamAddress, OverlayRelocationSection* over
|
||||
case 0x6000000:
|
||||
if (gOverlayLogSeverity >= 3) {
|
||||
osSyncPrintf("%02d %08x %08x %08x ", dbg, relocDataP, relocatedValue, relocatedAddress);
|
||||
osSyncPrintf(" %08x %08x %08x %08x\n", ((uintptr_t)relocDataP + (uintptr_t)vRamAddress) - allocu32, relocData,
|
||||
unrelocatedAddress, relocOffset);
|
||||
osSyncPrintf(" %08x %08x %08x %08x\n", ((uintptr_t)relocDataP + (uintptr_t)vRamAddress) - allocu32,
|
||||
relocData, unrelocatedAddress, relocOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ void Sched_ThreadEntry(void* arg) {
|
||||
}
|
||||
|
||||
void Sched_Init(SchedContext* sc, void* stack, OSPri priority, UNK_TYPE arg3, UNK_TYPE arg4, IrqMgr* irqMgr) {
|
||||
memset(sc,0, sizeof(SchedContext));
|
||||
memset(sc, 0, sizeof(SchedContext));
|
||||
sc->unk_24C = 1;
|
||||
osCreateMesgQueue(&sc->interruptQ, sc->intBuf, 8);
|
||||
osCreateMesgQueue(&sc->cmdQ, sc->cmdMsgBuf, 8);
|
||||
|
||||
@@ -31,16 +31,16 @@ void SysCfb_Init(s32 n64dd) {
|
||||
*/
|
||||
|
||||
screenSize = SCREEN_WIDTH * SCREEN_HEIGHT;
|
||||
//sSysCfbEnd &= ~0x3F;
|
||||
// "The final address used by the system is %08x"
|
||||
// sSysCfbEnd &= ~0x3F;
|
||||
// "The final address used by the system is %08x"
|
||||
osSyncPrintf("システムが使用する最終アドレスは %08x です\n", sSysCfbEnd);
|
||||
//sSysCfbFbPtr[0] = sSysCfbEnd - (screenSize * 4);
|
||||
//sSysCfbFbPtr[1] = sSysCfbEnd - (screenSize * 2);
|
||||
// sSysCfbFbPtr[0] = sSysCfbEnd - (screenSize * 4);
|
||||
// sSysCfbFbPtr[1] = sSysCfbEnd - (screenSize * 2);
|
||||
sSysCfbFbPtr[0] = malloc(screenSize * 4);
|
||||
sSysCfbFbPtr[1] = malloc(screenSize * 4);
|
||||
|
||||
// "Frame buffer addresses are %08x and %08x"
|
||||
//osSyncPrintf("フレームバッファのアドレスは %08x と %08x です\n", sSysCfbFbPtr[0], sSysCfbFbPtr[1]);
|
||||
// osSyncPrintf("フレームバッファのアドレスは %08x と %08x です\n", sSysCfbFbPtr[0], sSysCfbFbPtr[1]);
|
||||
|
||||
// SOH [Port] Inform LUS on resolution changes
|
||||
FB_CreateFramebuffers();
|
||||
|
||||
@@ -557,7 +557,7 @@ Mtx* Matrix_ToMtx(Mtx* dest, char* file, s32 line) {
|
||||
FrameInterpolation_RecordMatrixToMtx(dest, file, line);
|
||||
guMtxF2L(Matrix_CheckFloats(sCurrentMatrix, file, line), dest);
|
||||
return dest;
|
||||
//return Matrix_MtxFToMtx(MATRIX_CHECKFLOATS(sCurrentMatrix), dest);
|
||||
// return Matrix_MtxFToMtx(MATRIX_CHECKFLOATS(sCurrentMatrix), dest);
|
||||
}
|
||||
|
||||
Mtx* Matrix_NewMtx(GraphicsContext* gfxCtx, char* file, s32 line) {
|
||||
@@ -903,7 +903,7 @@ MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line) {
|
||||
"\\ %12.6f %12.6f %12.6f %12.6f /\n",
|
||||
file, line, "mf", mf->xx, mf->xy, mf->xz, mf->xw, mf->yx, mf->yy, mf->yz, mf->yw, mf->zx,
|
||||
mf->zy, mf->zz, mf->zw, mf->wx, mf->wy, mf->wz, mf->ww);
|
||||
//Fault_AddHungupAndCrash(file, line);
|
||||
// Fault_AddHungupAndCrash(file, line);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1044,11 +1044,8 @@ void Matrix_SetTranslateScaleMtx1(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ,
|
||||
|
||||
void Matrix_SetTranslateScaleMtx2(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, f32 translateX, f32 translateY,
|
||||
f32 translateZ) {
|
||||
MtxF mtxf = { {
|
||||
{ scaleX, 0, 0, 0 },
|
||||
{ 0, scaleY, 0, 0 },
|
||||
{ 0, 0, scaleZ, 0 },
|
||||
{ translateX, translateY, translateZ, 1 }
|
||||
} };
|
||||
MtxF mtxf = {
|
||||
{ { scaleX, 0, 0, 0 }, { 0, scaleY, 0, 0 }, { 0, 0, scaleZ, 0 }, { translateX, translateY, translateZ, 1 } }
|
||||
};
|
||||
guMtxF2L(&mtxf, mtx);
|
||||
}
|
||||
|
||||
+18
-13
@@ -21,7 +21,8 @@ void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
osSyncPrintf("OVL(d):Seg:%08x-%08x Ram:%08x-%08x Off:%08x %s\n", overlayEntry->vramStart, overlayEntry->vramEnd,
|
||||
overlayEntry->loadedRamAddr,
|
||||
(uintptr_t)overlayEntry->loadedRamAddr + (uintptr_t)overlayEntry->vramEnd - (uintptr_t)overlayEntry->vramStart,
|
||||
(uintptr_t)overlayEntry->loadedRamAddr + (uintptr_t)overlayEntry->vramEnd -
|
||||
(uintptr_t)overlayEntry->vramStart,
|
||||
(uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr, "");
|
||||
osSyncPrintf(VT_RST);
|
||||
|
||||
@@ -40,8 +41,8 @@ void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
|
||||
}
|
||||
|
||||
if (overlayEntry->destroy != NULL) {
|
||||
overlayEntry->destroy = (void*)((uintptr_t)overlayEntry->destroy -
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
overlayEntry->destroy = (void*)((uintptr_t)overlayEntry->destroy - ((intptr_t)overlayEntry->vramStart -
|
||||
(intptr_t)overlayEntry->loadedRamAddr));
|
||||
} else {
|
||||
overlayEntry->destroy = NULL;
|
||||
}
|
||||
@@ -70,36 +71,40 @@ void Overlay_FreeGameState(GameStateOverlay* overlayEntry) {
|
||||
|
||||
if (temp == 0) {
|
||||
if (overlayEntry->unk_14 != NULL) {
|
||||
overlayEntry->unk_14 = (void*)((uintptr_t)overlayEntry->unk_14 +
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
overlayEntry->unk_14 =
|
||||
(void*)((uintptr_t)overlayEntry->unk_14 +
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
} else {
|
||||
overlayEntry->unk_14 = NULL;
|
||||
}
|
||||
|
||||
if (overlayEntry->init != NULL) {
|
||||
overlayEntry->init = (void*)((uintptr_t)overlayEntry->init +
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
overlayEntry->init = (void*)((uintptr_t)overlayEntry->init + ((intptr_t)overlayEntry->vramStart -
|
||||
(intptr_t)overlayEntry->loadedRamAddr));
|
||||
} else {
|
||||
overlayEntry->init = NULL;
|
||||
}
|
||||
|
||||
if (overlayEntry->destroy != NULL) {
|
||||
overlayEntry->destroy = (void*)((uintptr_t)overlayEntry->destroy +
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
overlayEntry->destroy =
|
||||
(void*)((uintptr_t)overlayEntry->destroy +
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
} else {
|
||||
overlayEntry->destroy = NULL;
|
||||
}
|
||||
|
||||
if (overlayEntry->unk_20 != NULL) {
|
||||
overlayEntry->unk_20 = (void*)((uintptr_t)overlayEntry->unk_20 +
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
overlayEntry->unk_20 =
|
||||
(void*)((uintptr_t)overlayEntry->unk_20 +
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
} else {
|
||||
overlayEntry->unk_20 = NULL;
|
||||
}
|
||||
|
||||
if (overlayEntry->unk_24 != NULL) {
|
||||
overlayEntry->unk_24 = (void*)((uintptr_t)overlayEntry->unk_24 +
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
overlayEntry->unk_24 =
|
||||
(void*)((uintptr_t)overlayEntry->unk_24 +
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr));
|
||||
} else {
|
||||
overlayEntry->unk_24 = NULL;
|
||||
}
|
||||
|
||||
+180
-130
@@ -133,8 +133,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, PlayState* play, Gfx* dlist,
|
||||
temp2 = (1.0f - (temp1 * (1.0f / 350))) * actor->shape.shadowScale;
|
||||
Matrix_Scale(actor->scale.x * temp2, 1.0f, actor->scale.z * temp2, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, dlist);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -173,8 +172,7 @@ void ActorShadow_DrawFoot(PlayState* play, Light* light, MtxF* arg2, s32 arg3, f
|
||||
Matrix_RotateY(sp58, MTXMODE_APPLY);
|
||||
Matrix_Scale(arg5, 1.0f, arg5 * arg6, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFootShadowDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -357,49 +355,59 @@ void func_8002BE98(TargetContext* targetCtx, s32 actorCategory, PlayState* play)
|
||||
|
||||
void func_8002BF60(TargetContext* targetCtx, Actor* actor, s32 actorCategory, PlayState* play) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Navi.IdlePrimary.Changed"), 0)) {
|
||||
sNaviColorList[ACTORCAT_PLAYER].inner = CVarGetColor(CVAR_COSMETIC("Navi.IdlePrimary.Value"), defaultIdlePrimaryColor);
|
||||
sNaviColorList[ACTORCAT_PLAYER].inner =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.IdlePrimary.Value"), defaultIdlePrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PLAYER].inner = defaultIdlePrimaryColor;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Navi.IdleSecondary.Changed"), 0)) {
|
||||
sNaviColorList[ACTORCAT_PLAYER].outer = CVarGetColor(CVAR_COSMETIC("Navi.IdleSecondary.Value"), defaultIdleSecondaryColor);
|
||||
sNaviColorList[ACTORCAT_PLAYER].outer =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.IdleSecondary.Value"), defaultIdleSecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PLAYER].outer = defaultIdleSecondaryColor;
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Navi.NPCPrimary.Changed"), 0)) {
|
||||
sNaviColorList[ACTORCAT_NPC].inner = CVarGetColor(CVAR_COSMETIC("Navi.NPCPrimary.Value"), defaultNPCPrimaryColor);
|
||||
sNaviColorList[ACTORCAT_NPC].inner =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.NPCPrimary.Value"), defaultNPCPrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_NPC].inner = defaultNPCPrimaryColor;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Navi.NPCSecondary.Changed"), 0)) {
|
||||
sNaviColorList[ACTORCAT_NPC].outer = CVarGetColor(CVAR_COSMETIC("Navi.NPCSecondary.Value"), defaultNPCSecondaryColor);
|
||||
sNaviColorList[ACTORCAT_NPC].outer =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.NPCSecondary.Value"), defaultNPCSecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_NPC].outer = defaultNPCSecondaryColor;
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Navi.EnemyPrimary.Changed"), 0)) {
|
||||
sNaviColorList[ACTORCAT_ENEMY].inner = CVarGetColor(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), defaultEnemyPrimaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].inner = CVarGetColor(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), defaultEnemyPrimaryColor);
|
||||
sNaviColorList[ACTORCAT_ENEMY].inner =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), defaultEnemyPrimaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].inner =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), defaultEnemyPrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_ENEMY].inner = defaultEnemyPrimaryColor;
|
||||
sNaviColorList[ACTORCAT_BOSS].inner = defaultEnemyPrimaryColor;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Navi.EnemySecondary.Changed"), 0)) {
|
||||
sNaviColorList[ACTORCAT_ENEMY].outer = CVarGetColor(CVAR_COSMETIC("Navi.EnemySecondary.Value"), defaultEnemySecondaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].outer = CVarGetColor(CVAR_COSMETIC("Navi.EnemySecondary.Value"), defaultEnemySecondaryColor);
|
||||
sNaviColorList[ACTORCAT_ENEMY].outer =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.EnemySecondary.Value"), defaultEnemySecondaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].outer =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.EnemySecondary.Value"), defaultEnemySecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_ENEMY].outer = defaultEnemySecondaryColor;
|
||||
sNaviColorList[ACTORCAT_BOSS].outer = defaultEnemySecondaryColor;
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Navi.PropsPrimary.Changed"), 0)) {
|
||||
sNaviColorList[ACTORCAT_PROP].inner = CVarGetColor(CVAR_COSMETIC("Navi.PropsPrimary.Value"), defaultPropsPrimaryColor);
|
||||
sNaviColorList[ACTORCAT_PROP].inner =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.PropsPrimary.Value"), defaultPropsPrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PROP].inner = defaultPropsPrimaryColor;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Navi.PropsSecondary.Changed"), 0)) {
|
||||
sNaviColorList[ACTORCAT_PROP].outer = CVarGetColor(CVAR_COSMETIC("Navi.PropsSecondary.Value"), defaultPropsSecondaryColor);
|
||||
sNaviColorList[ACTORCAT_PROP].outer =
|
||||
CVarGetColor(CVAR_COSMETIC("Navi.PropsSecondary.Value"), defaultPropsSecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PROP].outer = defaultPropsSecondaryColor;
|
||||
}
|
||||
@@ -513,8 +521,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
|
||||
Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_Translate(entry->unk_0C, entry->unk_0C, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(OVERLAY_DISP++, gZTargetLockOnTriangleDL);
|
||||
Matrix_Pop();
|
||||
}
|
||||
@@ -542,8 +549,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
|
||||
Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY);
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZTargetArrowDL);
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
@@ -625,7 +631,8 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
|
||||
targetCtx->unk_48 = 0;
|
||||
}
|
||||
|
||||
lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) ? NA_SE_SY_LOCK_ON
|
||||
lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
|
||||
? NA_SE_SY_LOCK_ON
|
||||
: NA_SE_SY_LOCK_ON_HUMAN;
|
||||
Sfx_PlaySfxCentered(lockOnSfxId);
|
||||
}
|
||||
@@ -866,8 +873,8 @@ void TitleCard_InitBossName(PlayState* play, TitleCardContext* titleCtx, void* t
|
||||
titleCtx->delayTimer = 0;
|
||||
}
|
||||
|
||||
void TitleCard_InitPlaceName(PlayState* play, TitleCardContext* titleCtx, void* texture, s32 x, s32 y,
|
||||
s32 width, s32 height, s32 delay) {
|
||||
void TitleCard_InitPlaceName(PlayState* play, TitleCardContext* titleCtx, void* texture, s32 x, s32 y, s32 width,
|
||||
s32 height, s32 delay) {
|
||||
SceneTableEntry* loadedScene = play->loadedScene;
|
||||
// size_t size = loadedScene->titleFile.vromEnd - loadedScene->titleFile.vromStart;
|
||||
switch (play->sceneNum) {
|
||||
@@ -1054,7 +1061,6 @@ void TitleCard_InitPlaceName(PlayState* play, TitleCardContext* titleCtx, void*
|
||||
default:
|
||||
titleCtx->texture = NULL;
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
static char newName[512];
|
||||
@@ -1066,13 +1072,11 @@ void TitleCard_InitPlaceName(PlayState* play, TitleCardContext* titleCtx, void*
|
||||
newName[length - 6] = 'F';
|
||||
newName[length - 5] = 'R';
|
||||
newName[length - 4] = 'A';
|
||||
}
|
||||
else if (gSaveContext.language == LANGUAGE_GER) {
|
||||
} else if (gSaveContext.language == LANGUAGE_GER) {
|
||||
newName[length - 6] = 'G';
|
||||
newName[length - 5] = 'E';
|
||||
newName[length - 4] = 'R';
|
||||
}
|
||||
else if (gSaveContext.language == LANGUAGE_JPN) {
|
||||
} else if (gSaveContext.language == LANGUAGE_JPN) {
|
||||
newName[length - 6] = 'J';
|
||||
newName[length - 5] = 'P';
|
||||
newName[length - 4] = 'N';
|
||||
@@ -1128,20 +1132,30 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
|
||||
if (titleCtx->alpha != 0) {
|
||||
width = titleCtx->width;
|
||||
height = titleCtx->height;
|
||||
s16 TitleCard_PosX_Modifier = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.PosX"), 0) : CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.PosX"), 0));
|
||||
s16 TitleCard_PosY_Modifier = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.PosY"), 0) : CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.PosY"), 0));
|
||||
s16 TitleCard_PosType_Checker = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.PosType"), 0) : CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.PosType"), 0));
|
||||
s16 TitleCard_Margin_Checker = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.UseMargins"), 0) : CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.UseMargins"), 0));
|
||||
s16 TitleCard_PosX_Modifier = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.PosX"), 0)
|
||||
: CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.PosX"), 0));
|
||||
s16 TitleCard_PosY_Modifier = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.PosY"), 0)
|
||||
: CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.PosY"), 0));
|
||||
s16 TitleCard_PosType_Checker =
|
||||
(titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.PosType"), 0)
|
||||
: CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.PosType"), 0));
|
||||
s16 TitleCard_Margin_Checker =
|
||||
(titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.UseMargins"), 0)
|
||||
: CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.UseMargins"), 0));
|
||||
s16 TitleCard_MarginX = 0;
|
||||
s16 TitleCard_PosX = titleCtx->x;
|
||||
s16 TitleCard_PosY = titleCtx->y;
|
||||
if (TitleCard_PosType_Checker != 0) {
|
||||
TitleCard_PosY = TitleCard_PosY_Modifier;
|
||||
if (TitleCard_PosType_Checker == ANCHOR_LEFT) {
|
||||
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.L"), 0) * -1;};
|
||||
if (TitleCard_Margin_Checker != 0) {
|
||||
TitleCard_MarginX = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.L"), 0) * -1;
|
||||
};
|
||||
TitleCard_PosX = OTRGetDimensionFromLeftEdge(TitleCard_PosX_Modifier + TitleCard_MarginX) - 11;
|
||||
} else if (TitleCard_PosType_Checker == ANCHOR_RIGHT) {
|
||||
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.R"), 0);};
|
||||
if (TitleCard_Margin_Checker != 0) {
|
||||
TitleCard_MarginX = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.R"), 0);
|
||||
};
|
||||
TitleCard_PosX = OTRGetDimensionFromRightEdge(TitleCard_PosX_Modifier + TitleCard_MarginX);
|
||||
} else if (TitleCard_PosType_Checker == ANCHOR_NONE) {
|
||||
TitleCard_PosX = TitleCard_PosX_Modifier;
|
||||
@@ -1158,13 +1172,12 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
|
||||
|
||||
OVERLAY_DISP = Gfx_SetupDL_52NoCD(OVERLAY_DISP);
|
||||
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensityR, (u8)titleCtx->intensityG, (u8)titleCtx->intensityB,
|
||||
(u8)titleCtx->alpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensityR, (u8)titleCtx->intensityG,
|
||||
(u8)titleCtx->intensityB, (u8)titleCtx->alpha);
|
||||
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture, G_IM_FMT_IA,
|
||||
G_IM_SIZ_8b,
|
||||
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);
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture, G_IM_FMT_IA, G_IM_SIZ_8b, 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);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4),
|
||||
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
|
||||
@@ -1599,8 +1612,7 @@ s32 func_8002E2AC(PlayState* play, Actor* actor, Vec3f* arg2, s32 arg3) {
|
||||
|
||||
arg2->y += 50.0f;
|
||||
|
||||
actor->floorHeight =
|
||||
BgCheck_EntityRaycastFloor5(play, &play->colCtx, &actor->floorPoly, &floorBgId, actor, arg2);
|
||||
actor->floorHeight = BgCheck_EntityRaycastFloor5(play, &play->colCtx, &actor->floorPoly, &floorBgId, actor, arg2);
|
||||
actor->bgCheckFlags &= ~0x0086;
|
||||
|
||||
if (actor->floorHeight <= BGCHECK_Y_MIN) {
|
||||
@@ -1702,8 +1714,8 @@ void Actor_UpdateBgCheckInfo(PlayState* play, Actor* actor, f32 wallCheckHeight,
|
||||
sp64.y = actor->prevPos.y;
|
||||
func_8002E2AC(play, actor, &sp64, flags);
|
||||
waterBoxYSurface = actor->world.pos.y;
|
||||
if (WaterBox_GetSurface1(play, &play->colCtx, actor->world.pos.x, actor->world.pos.z,
|
||||
&waterBoxYSurface, &waterBox)) {
|
||||
if (WaterBox_GetSurface1(play, &play->colCtx, actor->world.pos.x, actor->world.pos.z, &waterBoxYSurface,
|
||||
&waterBox)) {
|
||||
actor->yDistToWater = waterBoxYSurface - actor->world.pos.y;
|
||||
if (actor->yDistToWater < 0.0f) {
|
||||
actor->bgCheckFlags &= ~0x60;
|
||||
@@ -1791,8 +1803,8 @@ void func_8002EBCC(Actor* actor, PlayState* play, s32 flag) {
|
||||
lightDir.z = play->envCtx.dirLight1.params.dir.z;
|
||||
|
||||
if (HREG(80) == 6) {
|
||||
osSyncPrintf("z_actor.c 3637 game_play->view.eye=[%f(%f) %f %f]\n", play->view.eye.x,
|
||||
play->view.eye.y, play->view.eye.z);
|
||||
osSyncPrintf("z_actor.c 3637 game_play->view.eye=[%f(%f) %f %f]\n", play->view.eye.x, play->view.eye.y,
|
||||
play->view.eye.z);
|
||||
}
|
||||
|
||||
hilite = func_8002EABC(&actor->world.pos, &play->view.eye, &lightDir, play->state.gfxCtx);
|
||||
@@ -2006,8 +2018,9 @@ s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE |
|
||||
PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON |
|
||||
PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
Player_GetExplosiveHeld(player) < 0) {
|
||||
if (((player->heldActor != NULL) && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX)) ||
|
||||
(IS_RANDO && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
|
||||
@@ -2045,8 +2058,9 @@ s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEn
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE |
|
||||
PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON |
|
||||
PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
Player_GetExplosiveHeld(player) < 0) {
|
||||
if ((((player->heldActor != NULL) || (actor == player->talkActor)) &&
|
||||
((!IS_RANDO && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
|
||||
@@ -2089,11 +2103,13 @@ s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE |
|
||||
PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON |
|
||||
PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
Player_GetExplosiveHeld(player) < 0) {
|
||||
if ((((player->heldActor != NULL) || (actor == player->talkActor)) &&
|
||||
((!IS_RANDO && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (IS_RANDO && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
|
||||
((!IS_RANDO && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) ||
|
||||
(IS_RANDO && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
|
||||
(!(player->stateFlags1 & (PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_IN_CUTSCENE)))) {
|
||||
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
@@ -2164,8 +2180,9 @@ u32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 &
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE |
|
||||
PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER))) {
|
||||
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_CHARGING_SPIN_ATTACK |
|
||||
PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING |
|
||||
PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER))) {
|
||||
player->rideActor = horse;
|
||||
player->mountSide = mountSide;
|
||||
return true;
|
||||
@@ -2210,7 +2227,8 @@ void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4)
|
||||
|
||||
void Player_PlaySfx(Actor* actor, u16 sfxId) {
|
||||
if (actor->id != ACTOR_PLAYER || sfxId < NA_SE_VO_LI_SWORD_N || sfxId > NA_SE_VO_LI_ELECTRIC_SHOCK_LV_KID) {
|
||||
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale , &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
} else {
|
||||
freqMultiplier = CVarGetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0);
|
||||
if (freqMultiplier <= 0) {
|
||||
@@ -2218,7 +2236,8 @@ void Player_PlaySfx(Actor* actor, u16 sfxId) {
|
||||
}
|
||||
// Authentic behavior uses D_801333E0 for both freqScale and a4
|
||||
// Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &freqMultiplier, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &freqMultiplier, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2262,7 +2281,8 @@ void func_8002F948(Actor* actor, u16 sfxId) {
|
||||
}
|
||||
|
||||
void func_8002F974(Actor* actor, u16 sfxId) {
|
||||
actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | ACTOR_FLAG_SFX_TIMER);
|
||||
actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 |
|
||||
ACTOR_FLAG_SFX_TIMER);
|
||||
actor->sfx = sfxId;
|
||||
}
|
||||
|
||||
@@ -2348,7 +2368,7 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
|
||||
D_8015BC14 = 60;
|
||||
D_8015BC18 = 1.0f;
|
||||
} else if (D_8015BC14) {
|
||||
D_8015BC14-= CVarGetInteger(CVAR_ENHANCEMENT("FastFarores"), 0) ? 5 : 1;
|
||||
D_8015BC14 -= CVarGetInteger(CVAR_ENHANCEMENT("FastFarores"), 0) ? 5 : 1;
|
||||
} else if (D_8015BC18 > 0.0f) {
|
||||
static Vec3f effectVel = { 0.0f, -0.05f, 0.0f };
|
||||
static Vec3f effectAccel = { 0.0f, -0.025f, 0.0f };
|
||||
@@ -2393,8 +2413,8 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
|
||||
effectPos.y = curPos->y + 80.0f + (6.0f * Rand_ZeroOne());
|
||||
effectPos.z = curPos->z + Rand_CenteredFloat(6.0f);
|
||||
|
||||
EffectSsKiraKira_SpawnDispersed(play, &effectPos, &effectVel, &effectAccel, &effectPrimCol,
|
||||
&effectEnvCol, 1000, 16);
|
||||
EffectSsKiraKira_SpawnDispersed(play, &effectPos, &effectVel, &effectAccel, &effectPrimCol, &effectEnvCol,
|
||||
1000, 16);
|
||||
|
||||
if (D_8015BC18 == 0.0f) {
|
||||
gSaveContext.respawn[RESPAWN_MODE_TOP] = gSaveContext.respawn[RESPAWN_MODE_DOWN];
|
||||
@@ -2466,22 +2486,19 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Spell_env.r, Spell_env.g, Spell_env.b, 255);
|
||||
|
||||
Matrix_RotateZ(((play->gameplayFrames * 1500) & 0xFFFF) * M_PI / 32768.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
|
||||
|
||||
Matrix_Pop();
|
||||
Matrix_RotateZ(~((play->gameplayFrames * 1200) & 0xFFFF) * M_PI / 32768.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
|
||||
}
|
||||
|
||||
Lights_PointNoGlowSetInfo(&D_8015BC00, ((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x),
|
||||
((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y) + yOffset,
|
||||
((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.z), 255, 255, 255, lightRadius);
|
||||
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
@@ -2570,8 +2587,8 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||
if (KREG(0) == -100) {
|
||||
refActor = &GET_PLAYER(play)->actor;
|
||||
KREG(0) = 0;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, refActor->world.pos.x,
|
||||
refActor->world.pos.y + 100.0f, refActor->world.pos.z, 0, 0, 0, 1, true);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, refActor->world.pos.x, refActor->world.pos.y + 100.0f,
|
||||
refActor->world.pos.z, 0, 0, 0, 1, true);
|
||||
}
|
||||
|
||||
sp80 = &D_80116068[0];
|
||||
@@ -2596,8 +2613,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||
actor->sfx = 0;
|
||||
|
||||
if (actor->init != NULL) {
|
||||
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex))
|
||||
{
|
||||
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
|
||||
Actor_SetObjectDependency(play, actor);
|
||||
actor->init(actor, play);
|
||||
actor->init = NULL;
|
||||
@@ -2634,7 +2650,8 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||
actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, &player->actor);
|
||||
actor->flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
|
||||
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_INSIDE_CULLING_VOLUME))) {
|
||||
if ((DECR(actor->freezeTimer) == 0) &&
|
||||
(actor->flags & (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_INSIDE_CULLING_VOLUME))) {
|
||||
if (actor == player->focusActor) {
|
||||
actor->isTargeted = true;
|
||||
} else {
|
||||
@@ -2717,7 +2734,8 @@ void Actor_Draw(PlayState* play, Actor* actor) {
|
||||
|
||||
lights = LightContext_NewLights(&play->lightCtx, play->state.gfxCtx);
|
||||
|
||||
Lights_BindAll(lights, play->lightCtx.listHead, (actor->flags & ACTOR_FLAG_IGNORE_POINTLIGHTS) ? NULL : &actor->world.pos);
|
||||
Lights_BindAll(lights, play->lightCtx.listHead,
|
||||
(actor->flags & ACTOR_FLAG_IGNORE_POINTLIGHTS) ? NULL : &actor->world.pos);
|
||||
Lights_Draw(lights, play->state.gfxCtx);
|
||||
|
||||
FrameInterpolation_RecordActorPosRotMatrix();
|
||||
@@ -2777,7 +2795,8 @@ void Actor_Draw(PlayState* play, Actor* actor) {
|
||||
|
||||
void func_80030ED8(Actor* actor) {
|
||||
if (actor->flags & ACTOR_FLAG_SFX_ACTOR_POS_2) {
|
||||
Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) {
|
||||
Sfx_PlaySfxCentered(actor->sfx);
|
||||
} else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) {
|
||||
@@ -2809,9 +2828,8 @@ void Actor_DrawLensOverlay(GraphicsContext* gfxCtx) {
|
||||
(SCREEN_HEIGHT / 2 - LENS_MASK_HEIGHT) << 2, (SCREEN_WIDTH / 2 + LENS_MASK_WIDTH - 1) << 2,
|
||||
(SCREEN_HEIGHT / 2 + LENS_MASK_HEIGHT - 1) << 2);
|
||||
gSPWideTextureRectangle(POLY_XLU_DISP++, x, 0, x + abs(x), SCREEN_HEIGHT << 2, G_TX_RENDERTILE, 0, 0, 0, 0);
|
||||
gSPWideTextureRectangle(POLY_XLU_DISP++, 0, 0, w, SCREEN_HEIGHT << 2, G_TX_RENDERTILE,
|
||||
LENS_MASK_OFFSET_S << 5, LENS_MASK_OFFSET_T << 5,
|
||||
(1 << 10) * (SCREEN_WIDTH - 2 * LENS_MASK_OFFSET_S) / SCREEN_WIDTH,
|
||||
gSPWideTextureRectangle(POLY_XLU_DISP++, 0, 0, w, SCREEN_HEIGHT << 2, G_TX_RENDERTILE, LENS_MASK_OFFSET_S << 5,
|
||||
LENS_MASK_OFFSET_T << 5, (1 << 10) * (SCREEN_WIDTH - 2 * LENS_MASK_OFFSET_S) / SCREEN_WIDTH,
|
||||
(1 << 10) * (SCREEN_HEIGHT - 2 * LENS_MASK_OFFSET_T) / SCREEN_HEIGHT);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
@@ -3059,11 +3077,12 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
|
||||
|
||||
if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(71) == 0)) {
|
||||
if ((actor->init == NULL) && (actor->draw != NULL) &&
|
||||
((actor->flags & (ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_INSIDE_CULLING_VOLUME)) || shipShouldDraw)) {
|
||||
((actor->flags & (ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_INSIDE_CULLING_VOLUME)) ||
|
||||
shipShouldDraw)) {
|
||||
// #endregion
|
||||
if ((actor->flags & ACTOR_FLAG_REACT_TO_LENS) &&
|
||||
((play->roomCtx.curRoom.lensMode == LENS_MODE_HIDE_ACTORS) ||
|
||||
play->actorCtx.lensActive || (actor->room != play->roomCtx.curRoom.num))) {
|
||||
((play->roomCtx.curRoom.lensMode == LENS_MODE_HIDE_ACTORS) || play->actorCtx.lensActive ||
|
||||
(actor->room != play->roomCtx.curRoom.num))) {
|
||||
assert(invisibleActorCounter < INVISIBLE_ACTOR_MAX);
|
||||
invisibleActors[invisibleActorCounter] = actor;
|
||||
invisibleActorCounter++;
|
||||
@@ -3273,14 +3292,15 @@ void Actor_FreeOverlay(ActorDBEntry* dbEntry) {
|
||||
}
|
||||
|
||||
// SoH: Flag to check if actors are being spawned from the actor entry list
|
||||
// This flag is checked against to allow actors which dont have an objectBankIndex in the objectCtx slot/status array to spawn
|
||||
// An example of what this fixes, is that it allows hookshot to be used as child
|
||||
// This flag is checked against to allow actors which dont have an objectBankIndex in the objectCtx slot/status
|
||||
// array to spawn An example of what this fixes, is that it allows hookshot to be used as child
|
||||
int gMapLoading = 0;
|
||||
|
||||
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ,
|
||||
s16 rotX, s16 rotY, s16 rotZ, s16 params, s16 canRandomize) {
|
||||
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX,
|
||||
s16 rotY, s16 rotZ, s16 params, s16 canRandomize) {
|
||||
|
||||
uint8_t tryRandomizeEnemy = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2 && canRandomize;
|
||||
uint8_t tryRandomizeEnemy = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && gSaveContext.fileNum >= 0 &&
|
||||
gSaveContext.fileNum <= 2 && canRandomize;
|
||||
|
||||
if (tryRandomizeEnemy) {
|
||||
if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) {
|
||||
@@ -3374,8 +3394,8 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
|
||||
return actor;
|
||||
}
|
||||
|
||||
Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play, s16 actorId, f32 posX,
|
||||
f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params) {
|
||||
Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play, s16 actorId, f32 posX, f32 posY,
|
||||
f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params) {
|
||||
Actor* spawnedActor = Actor_Spawn(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params, true);
|
||||
|
||||
if (spawnedActor == NULL) {
|
||||
@@ -3387,7 +3407,8 @@ Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play
|
||||
// Gohma (z_boss_goma.c), the Stalchildren spawner (z_en_encount1.c) and the falling platform spawning Stalfos in
|
||||
// Forest Temple (z_bg_mori_bigst.c) that normally rely on this behaviour are changed when
|
||||
// Enemy Rando is on so they still work properly even without assigning a parent.
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && (spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) &&
|
||||
(spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
|
||||
return spawnedActor;
|
||||
}
|
||||
|
||||
@@ -3509,11 +3530,13 @@ void func_800328D4(PlayState* play, ActorContext* actorCtx, Player* player, u32
|
||||
sp84 = player->focusActor;
|
||||
|
||||
while (actor != NULL) {
|
||||
if ((actor->update != NULL) && ((Player*)actor != player) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED)) {
|
||||
if ((actor->update != NULL) && ((Player*)actor != player) &&
|
||||
CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED)) {
|
||||
|
||||
// This block below is for determining the closest actor to player in determining the volume
|
||||
// used while playing enemy bgm music
|
||||
if ((actorCategory == ACTORCAT_ENEMY) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) &&
|
||||
if ((actorCategory == ACTORCAT_ENEMY) &&
|
||||
CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) &&
|
||||
(actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sbgmEnemyDistSq)) {
|
||||
actorCtx->targetCtx.bgmEnemy = actor;
|
||||
sbgmEnemyDistSq = actor->xyzDistToPlayerSq;
|
||||
@@ -3522,8 +3545,8 @@ void func_800328D4(PlayState* play, ActorContext* actorCtx, Player* player, u32
|
||||
if (actor != sp84) {
|
||||
var = func_8002EFC0(actor, player, D_8015BBFC);
|
||||
if ((var < D_8015BBF0) && func_8002F090(actor, var) && func_80032880(play, actor) &&
|
||||
(!BgCheck_CameraLineTest1(&play->colCtx, &player->actor.focus.pos, &actor->focus.pos, &sp70,
|
||||
&sp80, 1, 1, 1, 1, &sp7C) ||
|
||||
(!BgCheck_CameraLineTest1(&play->colCtx, &player->actor.focus.pos, &actor->focus.pos, &sp70, &sp80,
|
||||
1, 1, 1, 1, &sp7C) ||
|
||||
SurfaceType_IsIgnoredByProjectiles(&play->colCtx, sp80, sp7C))) {
|
||||
if (actor->targetPriority != 0) {
|
||||
if (actor->targetPriority < D_8015BBF8) {
|
||||
@@ -3654,7 +3677,7 @@ void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play) {
|
||||
bodyBreak->objectIds = ZELDA_ARENA_MALLOC_DEBUG(objectIdsSize);
|
||||
|
||||
if (bodyBreak->objectIds != NULL) {
|
||||
memset((u8*)bodyBreak->matrices,0, matricesSize);
|
||||
memset((u8*)bodyBreak->matrices, 0, matricesSize);
|
||||
memset((u8*)bodyBreak->dLists, 0, dListsSize);
|
||||
memset((u8*)bodyBreak->objectIds, 0, objectIdsSize);
|
||||
bodyBreak->val = 1;
|
||||
@@ -3725,8 +3748,8 @@ s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, PlayState* play, s1
|
||||
|
||||
mtx = &bodyBreak->matrices[bodyBreak->count];
|
||||
|
||||
spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&play->actorCtx, actor, play, ACTOR_EN_PART, mtx->xw,
|
||||
mtx->yw, mtx->zw, 0, 0, objBankIndex, type);
|
||||
spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&play->actorCtx, actor, play, ACTOR_EN_PART, mtx->xw, mtx->yw,
|
||||
mtx->zw, 0, 0, objBankIndex, type);
|
||||
|
||||
if (spawnedEnPart != NULL) {
|
||||
Matrix_MtxFToYXZRotS(&bodyBreak->matrices[bodyBreak->count], &spawnedEnPart->actor.shape.rot, 0);
|
||||
@@ -3870,8 +3893,7 @@ Actor* Actor_GetProjectileActor(PlayState* play, Actor* refActor, f32 radius) {
|
||||
// place in memory and causing issues with Dark link behavior, and probably other places too
|
||||
if ((Math_Vec3f_DistXYZ(&refActor->world.pos, &actor->world.pos) > radius) ||
|
||||
(actor->id == ACTOR_ARMS_HOOK && ((ArmsHook*)actor)->timer == 0) ||
|
||||
(actor->id == ACTOR_EN_ARROW && ((EnArrow*)actor)->unk_210.x == 0)
|
||||
) {
|
||||
(actor->id == ACTOR_EN_ARROW && ((EnArrow*)actor)->unk_210.x == 0)) {
|
||||
actor = actor->next;
|
||||
} else {
|
||||
deltaX = Math_SinS(actor->world.rot.y) * (actor->speedXZ * 10.0f);
|
||||
@@ -4076,8 +4098,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
|
||||
|
||||
Matrix_Scale(arg1->x, 1.0f, arg1->z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gCircleShadowDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -4167,8 +4188,7 @@ void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type) {
|
||||
Matrix_Scale(entry->chainsScale, entry->chainsScale, entry->chainsScale, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, entry->chainDL);
|
||||
|
||||
if (i % 2) {
|
||||
@@ -4184,8 +4204,7 @@ void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type) {
|
||||
Matrix_Put(&baseMtxF);
|
||||
Matrix_Scale(frame * 0.1f, frame * 0.1f, frame * 0.1f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, entry->lockDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -4523,8 +4542,8 @@ Gfx* func_80034B54(GraphicsContext* gfxCtx) {
|
||||
return displayList;
|
||||
}
|
||||
|
||||
void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
|
||||
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha) {
|
||||
void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw,
|
||||
Actor* actor, s16 alpha) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
@@ -4540,8 +4559,8 @@ void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
|
||||
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha) {
|
||||
void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw,
|
||||
Actor* actor, s16 alpha) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
@@ -4672,7 +4691,8 @@ s32 func_800354B4(PlayState* play, Actor* actor, f32 range, s16 arg3, s16 arg4,
|
||||
var1 = (s16)(actor->yawTowardsPlayer + 0x8000) - player->actor.shape.rot.y;
|
||||
var2 = actor->yawTowardsPlayer - arg5;
|
||||
|
||||
if ((actor->xzDistToPlayer <= range) && (player->meleeWeaponState != 0) && (arg4 >= ABS(var1)) && (arg3 >= ABS(var2))) {
|
||||
if ((actor->xzDistToPlayer <= range) && (player->meleeWeaponState != 0) && (arg4 >= ABS(var1)) &&
|
||||
(arg3 >= ABS(var2))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -4712,7 +4732,8 @@ void func_800355B8(PlayState* play, Vec3f* pos) {
|
||||
u8 func_800355E4(PlayState* play, Collider* collider) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((collider->acFlags & AC_TYPE_PLAYER) && (player->meleeWeaponState != 0) && (player->meleeWeaponAnimation == 0x16)) {
|
||||
if ((collider->acFlags & AC_TYPE_PLAYER) && (player->meleeWeaponState != 0) &&
|
||||
(player->meleeWeaponAnimation == 0x16)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -4807,12 +4828,11 @@ void func_80035844(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3) {
|
||||
/**
|
||||
* Spawns En_Part (Dissipating Flames) actor as a child of the given actor.
|
||||
*/
|
||||
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused,
|
||||
PlayState* play, s16 params, s32 arg8) {
|
||||
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused, PlayState* play,
|
||||
s16 params, s32 arg8) {
|
||||
EnPart* spawnedEnPart;
|
||||
|
||||
spawnedEnPart =
|
||||
(EnPart*)Actor_SpawnAsChild(&play->actorCtx, actor, play, ACTOR_EN_PART, spawnPos->x, spawnPos->y,
|
||||
spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&play->actorCtx, actor, play, ACTOR_EN_PART, spawnPos->x, spawnPos->y,
|
||||
spawnPos->z, spawnRot->x, spawnRot->y, actor->objBankIndex, params);
|
||||
if (spawnedEnPart != NULL) {
|
||||
spawnedEnPart->actor.scale = actor->scale;
|
||||
@@ -5347,7 +5367,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetInfTable(INFTABLE_6C)) {
|
||||
retTextId = 0x7008;
|
||||
} else {
|
||||
@@ -5361,7 +5383,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
retTextId = 0x702D;
|
||||
break;
|
||||
case 18:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x7006;
|
||||
} else {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_POCKET_EGG)) {
|
||||
@@ -5392,14 +5416,18 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x7044;
|
||||
} else {
|
||||
retTextId = 0x7015;
|
||||
}
|
||||
break;
|
||||
case 25:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x7045;
|
||||
} else {
|
||||
Flags_GetInfTable(INFTABLE_C2);
|
||||
@@ -5407,7 +5435,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 26:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x7046;
|
||||
} else {
|
||||
Flags_GetInfTable(INFTABLE_C2);
|
||||
@@ -5415,7 +5445,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 27:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x7047;
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||
retTextId = 0x701A;
|
||||
@@ -5430,7 +5462,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 28:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x7048;
|
||||
} else {
|
||||
Flags_GetInfTable(INFTABLE_CA);
|
||||
@@ -5438,7 +5472,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 29:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x7049;
|
||||
} else {
|
||||
Flags_GetInfTable(INFTABLE_CC);
|
||||
@@ -5446,7 +5482,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 30:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x704A;
|
||||
} else {
|
||||
Flags_GetInfTable(INFTABLE_CE);
|
||||
@@ -5454,7 +5492,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 31:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x704B;
|
||||
} else {
|
||||
Flags_GetInfTable(INFTABLE_D0);
|
||||
@@ -5462,7 +5502,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x704C;
|
||||
} else {
|
||||
Flags_GetInfTable(INFTABLE_D2);
|
||||
@@ -5470,7 +5512,9 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
}
|
||||
break;
|
||||
case 33:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||
retTextId = 0x704D;
|
||||
} else {
|
||||
Flags_GetInfTable(INFTABLE_D4);
|
||||
@@ -5722,7 +5766,8 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
|
||||
retTextId = 0x2048;
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||
retTextId = 0x2047;
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_POCKET_EGG) && !Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_POCKET_EGG) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||
retTextId = 0x2044;
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_CASTLE_OR_MARKET)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_INGO_AT_RANCH_BEFORE_TALON_RETURNS)) {
|
||||
@@ -5792,8 +5837,8 @@ void func_80036E50(u16 textId, s16 arg1) {
|
||||
Flags_SetInfTable(INFTABLE_0C);
|
||||
return;
|
||||
case 0x1033:
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD);
|
||||
Flags_SetInfTable(INFTABLE_0E);
|
||||
return;
|
||||
@@ -6256,7 +6301,8 @@ s32 func_80037CB8(PlayState* play, Actor* actor, s16 arg2) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(play) && func_80037C94(play, actor, arg2)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
|
||||
ret = true;
|
||||
}
|
||||
@@ -6356,7 +6402,8 @@ s32 func_80038154(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 a
|
||||
actor->focus.pos = actor->world.pos;
|
||||
actor->focus.pos.y += arg4;
|
||||
|
||||
if (!(((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0))) {
|
||||
if (!(((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) &&
|
||||
(gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0))) {
|
||||
var = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
@@ -6365,7 +6412,8 @@ s32 func_80038154(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 a
|
||||
}
|
||||
}
|
||||
|
||||
if (((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0)) {
|
||||
if (((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) &&
|
||||
(gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0)) {
|
||||
sp2C = play->view.eye;
|
||||
} else {
|
||||
sp2C = player->actor.focus.pos;
|
||||
@@ -6385,7 +6433,8 @@ s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f
|
||||
|
||||
actor->focus.pos = arg4;
|
||||
|
||||
if (!(((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0))) {
|
||||
if (!(((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) &&
|
||||
(gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0))) {
|
||||
var = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
@@ -6394,7 +6443,8 @@ s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f
|
||||
}
|
||||
}
|
||||
|
||||
if (((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0)) {
|
||||
if (((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) &&
|
||||
(gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0)) {
|
||||
sp24 = play->view.eye;
|
||||
} else {
|
||||
sp24 = player->actor.focus.pos;
|
||||
|
||||
+17
-25
@@ -1599,10 +1599,10 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
|
||||
BgCheck_SetSubdivisionDimension(colCtx->minBounds.z, colCtx->subdivAmount.z, &colCtx->maxBounds.z,
|
||||
&colCtx->subdivLength.z, &colCtx->subdivLengthInv.z);
|
||||
|
||||
// OTRTODO: Re-enable when the below DynaPoly workaround is removed.
|
||||
// #ifdef _SOH64 // BGCheck needs more memory on 64 bits because it crashes on some areas
|
||||
// colCtx->memSize *= 2;
|
||||
// #endif
|
||||
// OTRTODO: Re-enable when the below DynaPoly workaround is removed.
|
||||
// #ifdef _SOH64 // BGCheck needs more memory on 64 bits because it crashes on some areas
|
||||
// colCtx->memSize *= 2;
|
||||
// #endif
|
||||
|
||||
// BGCheck needs a higher polygon and vertex count due to removed object dependencies.
|
||||
// Otherwise Forest Temple checkered room will crash due to the hallway actor being killed a frame late.
|
||||
@@ -1765,8 +1765,7 @@ f32 BgCheck_EntityRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPol
|
||||
* Public raycast toward floor
|
||||
* returns yIntersect of the poly found, or BGCHECK_Y_MIN if no poly detected
|
||||
*/
|
||||
f32 BgCheck_EntityRaycastFloor2(PlayState* play, CollisionContext* colCtx, CollisionPoly** outPoly,
|
||||
Vec3f* pos) {
|
||||
f32 BgCheck_EntityRaycastFloor2(PlayState* play, CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos) {
|
||||
s32 bgId;
|
||||
|
||||
return BgCheck_RaycastFloorImpl(play, colCtx, COLPOLY_IGNORE_ENTITY, outPoly, &bgId, pos, NULL, 0x1C, 1.0f);
|
||||
@@ -1916,8 +1915,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul
|
||||
dy = posNext->y - posPrev->y;
|
||||
dz = posNext->z - posPrev->z;
|
||||
|
||||
if (BGCHECK_POS_ERROR_CHECK(posNext) == true ||
|
||||
BGCHECK_POS_ERROR_CHECK(posPrev) == true) {
|
||||
if (BGCHECK_POS_ERROR_CHECK(posNext) == true || BGCHECK_POS_ERROR_CHECK(posPrev) == true) {
|
||||
if (actor != NULL) {
|
||||
osSyncPrintf("こいつ,pself_actor->name %d\n", actor->id);
|
||||
}
|
||||
@@ -2179,8 +2177,7 @@ s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
|
||||
s32 temp_lo;
|
||||
|
||||
*outBgId = BGCHECK_SCENE;
|
||||
if (BGCHECK_POS_ERROR_CHECK(posA) == true ||
|
||||
BGCHECK_POS_ERROR_CHECK(posB) == true) {
|
||||
if (BGCHECK_POS_ERROR_CHECK(posA) == true || BGCHECK_POS_ERROR_CHECK(posB) == true) {
|
||||
if (actor != NULL) {
|
||||
osSyncPrintf("こいつ,pself_actor->name %d\n", actor->id);
|
||||
} else {
|
||||
@@ -2653,8 +2650,7 @@ void DynaPoly_Alloc(PlayState* play, DynaCollisionContext* dyna) {
|
||||
* Set BgActor
|
||||
* original name: DynaPolyInfo_setActor
|
||||
*/
|
||||
s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* actor,
|
||||
CollisionHeader* colHeader) {
|
||||
s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader) {
|
||||
s32 bgId;
|
||||
s32 foundSlot = false;
|
||||
|
||||
@@ -3813,8 +3809,7 @@ void CollisionHeader_SegmentedToVirtual(CollisionHeader* colHeader) {
|
||||
/**
|
||||
* Convert CollisionHeader Segmented to Virtual addressing
|
||||
*/
|
||||
void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest)
|
||||
{
|
||||
void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest) {
|
||||
if (ResourceMgr_OTRSigCheck(colHeader))
|
||||
colHeader = ResourceMgr_LoadColByName(colHeader);
|
||||
|
||||
@@ -4339,8 +4334,7 @@ u32 WaterBox_GetLightSettingIndex(CollisionContext* colCtx, WaterBox* waterBox)
|
||||
* returns true if point is within the xz boundaries of an active water box, else false
|
||||
* `ySurface` returns the water box's surface, while `outWaterBox` returns a pointer to the WaterBox
|
||||
*/
|
||||
s32 func_800425B0(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
|
||||
WaterBox** outWaterBox) {
|
||||
s32 func_800425B0(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox) {
|
||||
CollisionHeader* colHeader = colCtx->colHeader;
|
||||
u32 room;
|
||||
WaterBox* curWaterBox;
|
||||
@@ -4408,8 +4402,8 @@ s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec
|
||||
/**
|
||||
* Draw a list of dyna polys, specified by `ssList`
|
||||
*/
|
||||
void BgCheck_DrawDynaPolyList(PlayState* play, CollisionContext* colCtx, DynaCollisionContext* dyna,
|
||||
SSList* ssList, u8 r, u8 g, u8 b) {
|
||||
void BgCheck_DrawDynaPolyList(PlayState* play, CollisionContext* colCtx, DynaCollisionContext* dyna, SSList* ssList,
|
||||
u8 r, u8 g, u8 b) {
|
||||
s16 curPolyId;
|
||||
CollisionPoly* poly;
|
||||
SSNode* curNode;
|
||||
@@ -4457,16 +4451,14 @@ void BgCheck_DrawDynaPolyList(PlayState* play, CollisionContext* colCtx, DynaCol
|
||||
*/
|
||||
void BgCheck_DrawBgActor(PlayState* play, CollisionContext* colCtx, s32 bgId) {
|
||||
if (AREG(21)) {
|
||||
BgCheck_DrawDynaPolyList(play, colCtx, &colCtx->dyna, &colCtx->dyna.bgActors[bgId].dynaLookup.ceiling, 255,
|
||||
0, 0);
|
||||
}
|
||||
if (AREG(22)) {
|
||||
BgCheck_DrawDynaPolyList(play, colCtx, &colCtx->dyna, &colCtx->dyna.bgActors[bgId].dynaLookup.wall, 0, 255,
|
||||
BgCheck_DrawDynaPolyList(play, colCtx, &colCtx->dyna, &colCtx->dyna.bgActors[bgId].dynaLookup.ceiling, 255, 0,
|
||||
0);
|
||||
}
|
||||
if (AREG(22)) {
|
||||
BgCheck_DrawDynaPolyList(play, colCtx, &colCtx->dyna, &colCtx->dyna.bgActors[bgId].dynaLookup.wall, 0, 255, 0);
|
||||
}
|
||||
if (AREG(23)) {
|
||||
BgCheck_DrawDynaPolyList(play, colCtx, &colCtx->dyna, &colCtx->dyna.bgActors[bgId].dynaLookup.floor, 0, 0,
|
||||
255);
|
||||
BgCheck_DrawDynaPolyList(play, colCtx, &colCtx->dyna, &colCtx->dyna.bgActors[bgId].dynaLookup.floor, 0, 0, 255);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+35
-32
@@ -493,8 +493,7 @@ Vec3s* Camera_GetCamBgDataUnderPlayer(Camera* camera, u16* dataCnt) {
|
||||
|
||||
Actor_GetWorldPosShapeRot(&playerPosShape, &camera->player->actor);
|
||||
playerPosShape.pos.y += Player_GetHeight(camera->player);
|
||||
if (BgCheck_EntityRaycastFloor3(&camera->play->colCtx, &floorPoly, &bgId, &playerPosShape.pos) ==
|
||||
BGCHECK_Y_MIN) {
|
||||
if (BgCheck_EntityRaycastFloor3(&camera->play->colCtx, &floorPoly, &bgId, &playerPosShape.pos) == BGCHECK_Y_MIN) {
|
||||
// no floor
|
||||
return NULL;
|
||||
}
|
||||
@@ -516,8 +515,8 @@ s32 Camera_GetWaterBoxDataIdx(Camera* camera, f32* waterY) {
|
||||
Actor_GetWorldPosShapeRot(&playerPosShape, &camera->player->actor);
|
||||
*waterY = playerPosShape.pos.y;
|
||||
|
||||
if (!WaterBox_GetSurface1(camera->play, &camera->play->colCtx, playerPosShape.pos.x, playerPosShape.pos.z,
|
||||
waterY, &waterBox)) {
|
||||
if (!WaterBox_GetSurface1(camera->play, &camera->play->colCtx, playerPosShape.pos.x, playerPosShape.pos.z, waterY,
|
||||
&waterBox)) {
|
||||
// player's position is not in a water box.
|
||||
*waterY = BGCHECK_Y_MIN;
|
||||
return -1;
|
||||
@@ -551,8 +550,7 @@ f32 Camera_GetWaterSurface(Camera* camera, Vec3f* chkPos, s32* envProp) {
|
||||
Actor_GetWorldPosShapeRot(&playerPosRot, &camera->player->actor);
|
||||
waterY = playerPosRot.pos.y;
|
||||
|
||||
if (!WaterBox_GetSurface1(camera->play, &camera->play->colCtx, chkPos->x, chkPos->z, &waterY,
|
||||
&waterBox)) {
|
||||
if (!WaterBox_GetSurface1(camera->play, &camera->play->colCtx, chkPos->x, chkPos->z, &waterY, &waterBox)) {
|
||||
// chkPos is not within the x/z boundaries of a water box.
|
||||
return BGCHECK_Y_MIN;
|
||||
}
|
||||
@@ -574,9 +572,9 @@ s16 Camera_XZAngle(Vec3f* to, Vec3f* from) {
|
||||
return DEGF_TO_BINANG(RADF_TO_DEGF(Math_FAtan2F(from->x - to->x, from->z - to->z)));
|
||||
}
|
||||
|
||||
f32 D_8015CE50;
|
||||
f32 D_8015CE54;
|
||||
CamColChk D_8015CE58;
|
||||
f32 D_8015CE50;
|
||||
f32 D_8015CE54;
|
||||
CamColChk D_8015CE58;
|
||||
s16 func_80044ADC(Camera* camera, s16 yaw, s16 arg2) {
|
||||
Vec3f playerPos;
|
||||
Vec3f rotatedPos;
|
||||
@@ -1317,7 +1315,7 @@ s16 Camera_CalcDefaultYaw(Camera* camera, s16 cur, s16 target, f32 arg3, f32 acc
|
||||
return cur + (s16)(angDelta * velocity * velFactor * yawUpdRate);
|
||||
}
|
||||
|
||||
//Follow player with collision
|
||||
// Follow player with collision
|
||||
void func_80046E20(Camera* camera, VecSph* eyeAdjustment, f32 minDist, f32 arg3, f32* arg4, SwingAnimation* anim) {
|
||||
static CamColChk atEyeColChk;
|
||||
static CamColChk eyeAtColChk;
|
||||
@@ -1499,7 +1497,10 @@ s32 Camera_Free(Camera* camera) {
|
||||
newCamX *= (CVarGetFloat(CVAR_SETTING("FreeLook.CameraSensitivity.X"), 1.0f));
|
||||
newCamY *= (CVarGetFloat(CVAR_SETTING("FreeLook.CameraSensitivity.Y"), 1.0f));
|
||||
|
||||
bool invertXAxis = (CVarGetInteger(CVAR_SETTING("FreeLook.InvertXAxis"), 0) && !CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) || (!CVarGetInteger(CVAR_SETTING("FreeLook.InvertXAxis"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0));
|
||||
bool invertXAxis = (CVarGetInteger(CVAR_SETTING("FreeLook.InvertXAxis"), 0) &&
|
||||
!CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) ||
|
||||
(!CVarGetInteger(CVAR_SETTING("FreeLook.InvertXAxis"), 0) &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0));
|
||||
|
||||
camera->play->camX += newCamX * (invertXAxis ? -1 : 1);
|
||||
camera->play->camY += newCamY * (CVarGetInteger(CVAR_SETTING("FreeLook.InvertYAxis"), 1) ? 1 : -1);
|
||||
@@ -1761,7 +1762,7 @@ s32 Camera_Normal1(Camera* camera) {
|
||||
}
|
||||
|
||||
// crit wiggle
|
||||
if(!CVarGetInteger(CVAR_ENHANCEMENT("DisableCritWiggle"),0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("DisableCritWiggle"), 0)) {
|
||||
if (gSaveContext.health <= 16 && ((camera->play->state.frames % 256) == 0)) {
|
||||
wiggleAdj = Rand_ZeroOne() * 10000.0f;
|
||||
camera->inputDir.y = wiggleAdj + camera->inputDir.y;
|
||||
@@ -3095,7 +3096,7 @@ s32 Camera_Battle1(Camera* camera) {
|
||||
}
|
||||
anim->roll += (((OREG(36) * camera->speedRatio) * (1.0f - distRatio)) - anim->roll) * PCT(OREG(37));
|
||||
camera->roll = DEGF_TO_BINANG(anim->roll);
|
||||
camera->fov = Camera_LERPCeilF((player->meleeWeaponState != 0 ? 0.8f
|
||||
camera->fov = Camera_LERPCeilF((player->meleeWeaponState != 0 ? 0.8f
|
||||
: gSaveContext.health <= 0x10 ? 0.8f
|
||||
: 1.0f) *
|
||||
(fov - ((fov * 0.05f) * distRatio)),
|
||||
@@ -3565,8 +3566,8 @@ s32 Camera_KeepOn3(Camera* camera) {
|
||||
Camera_Vec3fVecSphGeoAdd(&lineChkPointB, &anim->atTarget, &atToEyeAdj);
|
||||
if (!(keep3->flags & 0x80)) {
|
||||
while (i < angleCnt) {
|
||||
if (!CollisionCheck_LineOCCheck(camera->play, &camera->play->colChkCtx, &anim->atTarget,
|
||||
&lineChkPointB, colChkActors, 2) &&
|
||||
if (!CollisionCheck_LineOCCheck(camera->play, &camera->play->colChkCtx, &anim->atTarget, &lineChkPointB,
|
||||
colChkActors, 2) &&
|
||||
!Camera_BGCheck(camera, &anim->atTarget, &lineChkPointB)) {
|
||||
break;
|
||||
}
|
||||
@@ -3590,7 +3591,7 @@ s32 Camera_KeepOn3(Camera* camera) {
|
||||
at->y += (anim->atTarget.y - at->y) / anim->animTimer;
|
||||
at->z += (anim->atTarget.z - at->z) / anim->animTimer;
|
||||
// needed to match
|
||||
//if (!prevTargetPlayerDist) {}
|
||||
// if (!prevTargetPlayerDist) {}
|
||||
atToEyeAdj.r = ((anim->eyeToAtTarget.x * anim->animTimer) + atToEyeNextDir.r) + 1.0f;
|
||||
atToEyeAdj.yaw = atToEyeNextDir.yaw + (s16)(anim->eyeToAtTarget.y * anim->animTimer);
|
||||
atToEyeAdj.pitch = atToEyeNextDir.pitch + (s16)(anim->eyeToAtTarget.z * anim->animTimer);
|
||||
@@ -3848,8 +3849,8 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||
if (!(keep4->unk_1C & 1)) {
|
||||
angleCnt = ARRAY_COUNT(D_8011D3B0);
|
||||
for (i = 0; i < angleCnt; i++) {
|
||||
if (!CollisionCheck_LineOCCheck(camera->play, &camera->play->colChkCtx, &D_8015BD50,
|
||||
&D_8015BD70, spCC, sp9C) &&
|
||||
if (!CollisionCheck_LineOCCheck(camera->play, &camera->play->colChkCtx, &D_8015BD50, &D_8015BD70,
|
||||
spCC, sp9C) &&
|
||||
!Camera_BGCheck(camera, &D_8015BD50, &D_8015BD70)) {
|
||||
break;
|
||||
}
|
||||
@@ -4541,9 +4542,9 @@ s32 Camera_Subj4(Camera* camera) {
|
||||
}
|
||||
|
||||
anim->unk_28 = temp_f16;
|
||||
//camera->player->actor.world.pos = *eyeNext;
|
||||
//camera->player->actor.world.pos.y = camera->playerGroundY;
|
||||
//camera->player->actor.shape.rot.y = sp64.yaw;
|
||||
// camera->player->actor.world.pos = *eyeNext;
|
||||
// camera->player->actor.world.pos.y = camera->playerGroundY;
|
||||
// camera->player->actor.shape.rot.y = sp64.yaw;
|
||||
temp_f16 = ((240.0f * temp_f16) * (anim->unk_24 * 0.416667f));
|
||||
temp_a0 = temp_f16 + anim->unk_30;
|
||||
at->x = eye->x + (Math_SinS(temp_a0) * 10.0f);
|
||||
@@ -4738,7 +4739,8 @@ s32 Camera_Unique1(Camera* camera) {
|
||||
anim->timer--;
|
||||
}
|
||||
|
||||
sp8C.yaw = Camera_LERPFloorS(anim->yawTarget, eyeNextAtOffset.yaw, 0.5f, CVarGetInteger(CVAR_ENHANCEMENT("FixHangingLedgeSwingRate"), 0) ? 0xA : 0x2710);
|
||||
sp8C.yaw = Camera_LERPFloorS(anim->yawTarget, eyeNextAtOffset.yaw, 0.5f,
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("FixHangingLedgeSwingRate"), 0) ? 0xA : 0x2710);
|
||||
Camera_Vec3fVecSphGeoAdd(eyeNext, at, &sp8C);
|
||||
*eye = *eyeNext;
|
||||
Camera_BGCheck(camera, at, eye);
|
||||
@@ -5249,7 +5251,8 @@ s32 Camera_Unique9(Camera* camera) {
|
||||
D_8011D3AC = anim->curKeyFrame->unk_01 & 0xF;
|
||||
} else if ((anim->curKeyFrame->unk_01 & 0xF0) == 0xC0) {
|
||||
Camera_UpdateInterface(0xF000 | ((anim->curKeyFrame->unk_01 & 0xF) << 8));
|
||||
} else if (camera->player->stateFlags1 & PLAYER_STATE1_IN_WATER && player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
} else if (camera->player->stateFlags1 & PLAYER_STATE1_IN_WATER &&
|
||||
player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
func_8002DF38(camera->play, camera->target, 8);
|
||||
osSyncPrintf("camera: demo: player demo set WAIT\n");
|
||||
} else {
|
||||
@@ -5724,8 +5727,8 @@ s32 Camera_Demo1(Camera* camera) {
|
||||
anim->curFrame = 0.0f;
|
||||
camera->animState++;
|
||||
// "absolute" : "relative"
|
||||
osSyncPrintf(VT_SGR("1") "%06u:" VT_RST " camera: spline demo: start %s \n",
|
||||
camera->play->state.frames, *relativeToPlayer == 0 ? "絶対" : "相対");
|
||||
osSyncPrintf(VT_SGR("1") "%06u:" VT_RST " camera: spline demo: start %s \n", camera->play->state.frames,
|
||||
*relativeToPlayer == 0 ? "絶対" : "相対");
|
||||
|
||||
if (PREG(93)) {
|
||||
Camera_DebugPrintSplineArray("CENTER", 5, csAtPoints);
|
||||
@@ -7051,8 +7054,7 @@ void func_80057FC4(Camera* camera) {
|
||||
camera->prevSetting = camera->setting = CAM_SET_NORMAL0;
|
||||
break;
|
||||
default:
|
||||
osSyncPrintf("camera: room type: default set etc (%d)\n",
|
||||
camera->play->roomCtx.curRoom.behaviorType1);
|
||||
osSyncPrintf("camera: room type: default set etc (%d)\n", camera->play->roomCtx.curRoom.behaviorType1);
|
||||
Camera_ChangeDoorCam(camera, NULL, -99, 0, 0, 18, 10);
|
||||
camera->prevSetting = camera->setting = CAM_SET_NORMAL0;
|
||||
camera->unk_14C |= 4;
|
||||
@@ -7468,7 +7470,7 @@ void Camera_UpdateDistortion(Camera* camera) {
|
||||
screenPlanePhase += DEGF_TO_BINANG(screenPlanePhaseStep);
|
||||
|
||||
View_SetDistortionOrientation(&camera->play->view, Math_CosS(depthPhase) * 0.0f, Math_SinS(depthPhase) * 0.0f,
|
||||
Math_SinS(screenPlanePhase) * 0.0f);
|
||||
Math_SinS(screenPlanePhase) * 0.0f);
|
||||
View_SetDistortionScale(&camera->play->view, Math_SinS(screenPlanePhase) * (xScale * scaleFactor) + 1.0f,
|
||||
Math_CosS(screenPlanePhase) * (yScale * scaleFactor) + 1.0f,
|
||||
Math_CosS(depthPhase) * (zScale * scaleFactor) + 1.0f);
|
||||
@@ -7524,8 +7526,8 @@ Vec3s Camera_Update(Camera* camera) {
|
||||
spAC = curPlayerPosRot.pos;
|
||||
spAC.y += Player_GetHeight(camera->player);
|
||||
|
||||
playerGroundY = BgCheck_EntityRaycastFloor5(camera->play, &camera->play->colCtx, &playerFloorPoly,
|
||||
&bgId, &camera->player->actor, &spAC);
|
||||
playerGroundY = BgCheck_EntityRaycastFloor5(camera->play, &camera->play->colCtx, &playerFloorPoly, &bgId,
|
||||
&camera->player->actor, &spAC);
|
||||
if (playerGroundY != BGCHECK_Y_MIN) {
|
||||
// player is above ground.
|
||||
sOOBTimer = 0;
|
||||
@@ -7631,7 +7633,8 @@ Vec3s Camera_Update(Camera* camera) {
|
||||
}
|
||||
|
||||
// enable/disable debug cam
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) &&
|
||||
CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) {
|
||||
gDbgCamEnabled ^= 1;
|
||||
if (gDbgCamEnabled) {
|
||||
DbgCamera_Enable(&D_8015BD80, camera);
|
||||
@@ -7947,7 +7950,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
|
||||
return -5;
|
||||
}
|
||||
|
||||
//modified from "==" to "<=" to not crash when "setting" is a negative value
|
||||
// modified from "==" to "<=" to not crash when "setting" is a negative value
|
||||
if (setting <= CAM_SET_NONE || setting >= CAM_SET_MAX) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera set (%d) !!!!\n" VT_RST, setting);
|
||||
return -99;
|
||||
|
||||
@@ -5,13 +5,12 @@ void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
if (ResourceMgr_OTRSigCheck(dlist) == 1)
|
||||
if (ResourceMgr_OTRSigCheck(dlist) == 1)
|
||||
gsSPPushCD(POLY_OPA_DISP++, dlist);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, dlist);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, dlist);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
@@ -20,12 +19,11 @@ void Gfx_DrawDListXlu(PlayState* play, Gfx* dlist) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
if (ResourceMgr_OTRSigCheck(dlist) == 1)
|
||||
gsSPPushCD(POLY_XLU_DISP++, dlist);
|
||||
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, dlist);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
@@ -274,8 +274,7 @@ s32 Collider_DestroyJntSphElementDim(PlayState* play, ColliderJntSphElementDim*
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 Collider_SetJntSphElementDim(PlayState* play, ColliderJntSphElementDim* dest,
|
||||
ColliderJntSphElementDimInit* src) {
|
||||
s32 Collider_SetJntSphElementDim(PlayState* play, ColliderJntSphElementDim* dest, ColliderJntSphElementDimInit* src) {
|
||||
dest->limb = src->limb;
|
||||
dest->modelSphere = src->modelSphere;
|
||||
dest->scale = src->scale * 0.01f;
|
||||
@@ -391,8 +390,7 @@ s32 Collider_SetJntSphToActor(PlayState* play, ColliderJntSph* dest, ColliderJnt
|
||||
* Sets up the ColliderJntSph using the values in src and dynamically allocates the element array. Uses default
|
||||
* OC2_TYPE_1. Only used by En_Nwc, an unused and unfinished actor.
|
||||
*/
|
||||
s32 Collider_SetJntSphAllocType1(PlayState* play, ColliderJntSph* dest, Actor* actor,
|
||||
ColliderJntSphInitType1* src) {
|
||||
s32 Collider_SetJntSphAllocType1(PlayState* play, ColliderJntSph* dest, Actor* actor, ColliderJntSphInitType1* src) {
|
||||
ColliderJntSphElement* destElem;
|
||||
ColliderJntSphElementInit* srcElem;
|
||||
|
||||
@@ -549,8 +547,7 @@ s32 Collider_DestroyCylinder(PlayState* play, ColliderCylinder* collider) {
|
||||
* Sets up the ColliderCylinder using the values in src and sets it to the actor specified in src. Uses default
|
||||
* OC2_TYPE_1 and COLTYPE_0. Used only by DekuJr, who sets it to himself anyways.
|
||||
*/
|
||||
s32 Collider_SetCylinderToActor(PlayState* play, ColliderCylinder* collider,
|
||||
ColliderCylinderInitToActor* src) {
|
||||
s32 Collider_SetCylinderToActor(PlayState* play, ColliderCylinder* collider, ColliderCylinderInitToActor* src) {
|
||||
Collider_SetBaseToActor(play, &collider->base, &src->base);
|
||||
Collider_SetInfo(play, &collider->info, &src->info);
|
||||
Collider_SetCylinderDim(play, &collider->dim, &src->dim);
|
||||
@@ -571,8 +568,7 @@ s32 Collider_SetCylinderType1(PlayState* play, ColliderCylinder* collider, Actor
|
||||
/**
|
||||
* Sets up the ColliderCylinder using the values in src.
|
||||
*/
|
||||
s32 Collider_SetCylinder(PlayState* play, ColliderCylinder* collider, Actor* actor,
|
||||
ColliderCylinderInit* src) {
|
||||
s32 Collider_SetCylinder(PlayState* play, ColliderCylinder* collider, Actor* actor, ColliderCylinderInit* src) {
|
||||
Collider_SetBase(play, &collider->base, actor, &src->base);
|
||||
Collider_SetInfo(play, &collider->info, &src->info);
|
||||
Collider_SetCylinderDim(play, &collider->dim, &src->dim);
|
||||
@@ -1117,8 +1113,8 @@ void Collider_Draw(PlayState* play, Collider* collider) {
|
||||
case COLSHAPE_TRIS:
|
||||
tris = (ColliderTris*)collider;
|
||||
for (i = 0; i < tris->count; i++) {
|
||||
Collider_DrawRedPoly(play->state.gfxCtx, &tris->elements[i].dim.vtx[0],
|
||||
&tris->elements[i].dim.vtx[1], &tris->elements[i].dim.vtx[2]);
|
||||
Collider_DrawRedPoly(play->state.gfxCtx, &tris->elements[i].dim.vtx[0], &tris->elements[i].dim.vtx[1],
|
||||
&tris->elements[i].dim.vtx[2]);
|
||||
}
|
||||
break;
|
||||
case COLSHAPE_QUAD:
|
||||
@@ -1209,8 +1205,7 @@ s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colChkCtx, Coll
|
||||
* If CollisionCheck_SAC is enabled, the collider will be inserted into the list at the specified index, otherwise it
|
||||
* will be inserted into the next slot
|
||||
*/
|
||||
s32 CollisionCheck_SetAT_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
s32 CollisionCheck_SetAT_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider, s32 index) {
|
||||
assert(collider->shape <= COLSHAPE_QUAD);
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
@@ -1288,8 +1283,7 @@ s32 CollisionCheck_SetAC(PlayState* play, CollisionCheckContext* colChkCtx, Coll
|
||||
* If CollisionCheck_SAC is enabled, the collider will be inserted into the list at the specified index, otherwise it
|
||||
* will be inserted into the next slot
|
||||
*/
|
||||
s32 CollisionCheck_SetAC_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
s32 CollisionCheck_SetAC_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider, s32 index) {
|
||||
assert(collider->shape <= COLSHAPE_QUAD);
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
@@ -1369,8 +1363,7 @@ s32 CollisionCheck_SetOC(PlayState* play, CollisionCheckContext* colChkCtx, Coll
|
||||
* If CollisionCheck_SAC is enabled, the collider will be inserted into the list at the specified index, otherwise it
|
||||
* will be inserted into the next slot
|
||||
*/
|
||||
s32 CollisionCheck_SetOC_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
s32 CollisionCheck_SetOC_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider, s32 index) {
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
return -1;
|
||||
@@ -1607,10 +1600,11 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
|
||||
if (flags == TOUCH_SFX_NORMAL && collider->colType != COLTYPE_METAL) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_NORMAL) { // collider->colType == COLTYPE_METAL
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_METAL, hitPos);
|
||||
@@ -1622,18 +1616,20 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
|
||||
} else if (flags == TOUCH_SFX_HARD) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_WOOD) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_DUST, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1644,17 +1640,17 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
|
||||
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
|
||||
if (at->actor != NULL && at->actor->category == ACTORCAT_PLAYER) {
|
||||
if (acInfo->elemType == ELEMTYPE_UNK0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK2) {
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK3) {
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
@@ -1674,8 +1670,8 @@ static HitInfo sHitInfo[] = {
|
||||
/**
|
||||
* Handles hitmarks, blood, and sound effects for each AC collision, determined by the AC collider's colType
|
||||
*/
|
||||
void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atInfo, Collider* ac,
|
||||
ColliderInfo* acInfo, Vec3f* hitPos) {
|
||||
void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atInfo, Collider* ac, ColliderInfo* acInfo,
|
||||
Vec3f* hitPos) {
|
||||
if (acInfo->bumperFlags & BUMP_NO_HITMARK) {
|
||||
return;
|
||||
}
|
||||
@@ -1691,7 +1687,8 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
|
||||
} else if (sHitInfo[ac->colType].effect == HIT_WOOD) {
|
||||
if (at->actor == NULL) {
|
||||
CollisionCheck_SpawnShieldParticles(play, hitPos);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &at->actor->projectedPos);
|
||||
}
|
||||
@@ -1704,10 +1701,11 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
|
||||
} else {
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
|
||||
if (ac->actor == NULL) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1804,8 +1802,8 @@ void CollisionCheck_AC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
|
||||
} else {
|
||||
Math_Vec3f_Copy(&hitPos, &atPos);
|
||||
}
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &acElem->info,
|
||||
&acPos, &hitPos);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &acElem->info, &acPos,
|
||||
&hitPos);
|
||||
if (!(ac->base.ocFlags2 & OC2_FIRST_ONLY)) {
|
||||
return;
|
||||
}
|
||||
@@ -1861,8 +1859,7 @@ void CollisionCheck_AC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCh
|
||||
} else {
|
||||
Math_Vec3f_Copy(&hitPos, &atPos);
|
||||
}
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &ac->info, &acPos,
|
||||
&hitPos);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &ac->info, &acPos, &hitPos);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1915,8 +1912,7 @@ void CollisionCheck_AC_CylVsJntSph(PlayState* play, CollisionCheckContext* colCh
|
||||
} else {
|
||||
Math_Vec3f_Copy(&hitPos, &atPos);
|
||||
}
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &acElem->info, &acPos,
|
||||
&hitPos);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &acElem->info, &acPos, &hitPos);
|
||||
if (!(ac->base.ocFlags2 & OC2_FIRST_ONLY)) {
|
||||
break;
|
||||
}
|
||||
@@ -1958,8 +1954,8 @@ void CollisionCheck_AC_JntSphVsTris(PlayState* play, CollisionCheckContext* colC
|
||||
acPos.x = (acTri->dim.vtx[0].x + acTri->dim.vtx[1].x + acTri->dim.vtx[2].x) * (1.0f / 3);
|
||||
acPos.y = (acTri->dim.vtx[0].y + acTri->dim.vtx[1].y + acTri->dim.vtx[2].y) * (1.0f / 3);
|
||||
acPos.z = (acTri->dim.vtx[0].z + acTri->dim.vtx[1].z + acTri->dim.vtx[2].z) * (1.0f / 3);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atSph->info, &atPos, &ac->base, &acTri->info,
|
||||
&acPos, &hitPos);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atSph->info, &atPos, &ac->base, &acTri->info, &acPos,
|
||||
&hitPos);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1998,8 +1994,8 @@ void CollisionCheck_AC_TrisVsJntSph(PlayState* play, CollisionCheckContext* colC
|
||||
atPos.x = (atItem->dim.vtx[0].x + atItem->dim.vtx[1].x + atItem->dim.vtx[2].x) * (1.0f / 3);
|
||||
atPos.y = (atItem->dim.vtx[0].y + atItem->dim.vtx[1].y + atItem->dim.vtx[2].y) * (1.0f / 3);
|
||||
atPos.z = (atItem->dim.vtx[0].z + atItem->dim.vtx[1].z + atItem->dim.vtx[2].z) * (1.0f / 3);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &acElem->info,
|
||||
&acPos, &hitPos);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &acElem->info, &acPos,
|
||||
&hitPos);
|
||||
if (!(ac->base.ocFlags2 & OC2_FIRST_ONLY)) {
|
||||
return;
|
||||
}
|
||||
@@ -2045,8 +2041,7 @@ void CollisionCheck_AC_JntSphVsQuad(PlayState* play, CollisionCheckContext* colC
|
||||
acPos.y = (ac->dim.quad[0].y + (ac->dim.quad[1].y + (ac->dim.quad[3].y + ac->dim.quad[2].y))) / 4.0f;
|
||||
acPos.z = (ac->dim.quad[0].z + (ac->dim.quad[1].z + (ac->dim.quad[3].z + ac->dim.quad[2].z))) / 4.0f;
|
||||
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &ac->info, &acPos,
|
||||
&hitPos);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &ac->info, &acPos, &hitPos);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2108,8 +2103,7 @@ void CollisionCheck_AC_QuadVsJntSph(PlayState* play, CollisionCheckContext* colC
|
||||
/**
|
||||
* AC overlap check. Calculates the center of each collider element and the point of contact.
|
||||
*/
|
||||
void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT,
|
||||
Collider* colAC) {
|
||||
void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||
ColliderCylinder* at = (ColliderCylinder*)colAT;
|
||||
ColliderCylinder* ac = (ColliderCylinder*)colAC;
|
||||
f32 deadSpace;
|
||||
@@ -2149,8 +2143,7 @@ void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCt
|
||||
/**
|
||||
* AC overlap check. Calculates the center of each collider element and the point of contact.
|
||||
*/
|
||||
void CollisionCheck_AC_CylVsTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT,
|
||||
Collider* colAC) {
|
||||
void CollisionCheck_AC_CylVsTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||
ColliderCylinder* at = (ColliderCylinder*)colAT;
|
||||
ColliderTris* ac = (ColliderTris*)colAC;
|
||||
ColliderTrisElement* acElem;
|
||||
@@ -2176,8 +2169,7 @@ void CollisionCheck_AC_CylVsTris(PlayState* play, CollisionCheckContext* colChkC
|
||||
acPos.x = (acElem->dim.vtx[0].x + acElem->dim.vtx[1].x + acElem->dim.vtx[2].x) * (1.0f / 3);
|
||||
acPos.y = (acElem->dim.vtx[0].y + acElem->dim.vtx[1].y + acElem->dim.vtx[2].y) * (1.0f / 3);
|
||||
acPos.z = (acElem->dim.vtx[0].z + acElem->dim.vtx[1].z + acElem->dim.vtx[2].z) * (1.0f / 3);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atpos, &ac->base, &acElem->info, &acPos,
|
||||
&hitPos);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atpos, &ac->base, &acElem->info, &acPos, &hitPos);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2187,8 +2179,7 @@ void CollisionCheck_AC_CylVsTris(PlayState* play, CollisionCheckContext* colChkC
|
||||
/**
|
||||
* AC overlap check. Calculates the center of each collider element and the point of contact.
|
||||
*/
|
||||
void CollisionCheck_AC_TrisVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT,
|
||||
Collider* colAC) {
|
||||
void CollisionCheck_AC_TrisVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||
static Vec3f D_8015E310;
|
||||
ColliderTris* at = (ColliderTris*)colAT;
|
||||
ColliderTrisElement* atItem;
|
||||
@@ -2224,8 +2215,7 @@ void CollisionCheck_AC_TrisVsCyl(PlayState* play, CollisionCheckContext* colChkC
|
||||
/**
|
||||
* AC overlap check. Calculates the center of each collider element and the point of contact.
|
||||
*/
|
||||
void CollisionCheck_AC_CylVsQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT,
|
||||
Collider* colAC) {
|
||||
void CollisionCheck_AC_CylVsQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||
static TriNorm D_8015E320;
|
||||
static TriNorm D_8015E358;
|
||||
static Vec3f D_8015E390;
|
||||
@@ -2249,8 +2239,7 @@ void CollisionCheck_AC_CylVsQuad(PlayState* play, CollisionCheckContext* colChkC
|
||||
acPos1.x = (ac->dim.quad[0].x + (ac->dim.quad[1].x + (ac->dim.quad[3].x + ac->dim.quad[2].x))) / 4.0f;
|
||||
acPos1.y = (ac->dim.quad[0].y + (ac->dim.quad[1].y + (ac->dim.quad[3].y + ac->dim.quad[2].y))) / 4.0f;
|
||||
acPos1.z = (ac->dim.quad[0].z + (ac->dim.quad[1].z + (ac->dim.quad[3].z + ac->dim.quad[2].z))) / 4.0f;
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos1, &ac->base, &ac->info, &acPos1,
|
||||
&D_8015E390);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos1, &ac->base, &ac->info, &acPos1, &D_8015E390);
|
||||
} else if (Math3D_CylTriVsIntersect(&at->dim, &D_8015E358, &D_8015E390) == 1) {
|
||||
Vec3f atPos2;
|
||||
Vec3f acPos2;
|
||||
@@ -2259,8 +2248,7 @@ void CollisionCheck_AC_CylVsQuad(PlayState* play, CollisionCheckContext* colChkC
|
||||
acPos2.x = (ac->dim.quad[0].x + (ac->dim.quad[1].x + (ac->dim.quad[3].x + ac->dim.quad[2].x))) / 4.0f;
|
||||
acPos2.y = (ac->dim.quad[0].y + (ac->dim.quad[1].y + (ac->dim.quad[3].y + ac->dim.quad[2].y))) / 4.0f;
|
||||
acPos2.z = (ac->dim.quad[0].z + (ac->dim.quad[1].z + (ac->dim.quad[3].z + ac->dim.quad[2].z))) / 4.0f;
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos2, &ac->base, &ac->info, &acPos2,
|
||||
&D_8015E390);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos2, &ac->base, &ac->info, &acPos2, &D_8015E390);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2271,8 +2259,7 @@ static s8 sBssDummy1;
|
||||
/**
|
||||
* AC overlap check. Calculates the center of each collider element and the point of contact.
|
||||
*/
|
||||
void CollisionCheck_AC_QuadVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT,
|
||||
Collider* colAC) {
|
||||
void CollisionCheck_AC_QuadVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||
static TriNorm D_8015E3A0;
|
||||
static TriNorm D_8015E3D8;
|
||||
static Vec3f D_8015E410;
|
||||
@@ -2326,8 +2313,7 @@ static s8 sBssDummy6;
|
||||
/**
|
||||
* AC overlap check. Calculates the center of each collider element and the point of contact.
|
||||
*/
|
||||
void CollisionCheck_AC_TrisVsTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT,
|
||||
Collider* colAC) {
|
||||
void CollisionCheck_AC_TrisVsTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||
static Vec3f D_8015E420;
|
||||
ColliderTris* at = (ColliderTris*)colAT;
|
||||
ColliderTrisElement* atItem;
|
||||
@@ -2356,8 +2342,8 @@ void CollisionCheck_AC_TrisVsTris(PlayState* play, CollisionCheckContext* colChk
|
||||
acPos.x = (acElem->dim.vtx[0].x + acElem->dim.vtx[1].x + acElem->dim.vtx[2].x) * (1.0f / 3);
|
||||
acPos.y = (acElem->dim.vtx[0].y + acElem->dim.vtx[1].y + acElem->dim.vtx[2].y) * (1.0f / 3);
|
||||
acPos.z = (acElem->dim.vtx[0].z + acElem->dim.vtx[1].z + acElem->dim.vtx[2].z) * (1.0f / 3);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &acElem->info,
|
||||
&acPos, &D_8015E420);
|
||||
CollisionCheck_SetATvsAC(play, &at->base, &atItem->info, &atPos, &ac->base, &acElem->info, &acPos,
|
||||
&D_8015E420);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2373,8 +2359,7 @@ static s8 sBssDummy10;
|
||||
/**
|
||||
* AC overlap check. Calculates the center of each collider element and the point of contact.
|
||||
*/
|
||||
void CollisionCheck_AC_TrisVsQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT,
|
||||
Collider* colAC) {
|
||||
void CollisionCheck_AC_TrisVsQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||
static Vec3f D_8015E430;
|
||||
static TriNorm D_8015E440;
|
||||
static TriNorm D_8015E478;
|
||||
@@ -2417,8 +2402,7 @@ void CollisionCheck_AC_TrisVsQuad(PlayState* play, CollisionCheckContext* colChk
|
||||
/**
|
||||
* AC overlap check. Calculates the center of each collider element and the point of contact.
|
||||
*/
|
||||
void CollisionCheck_AC_QuadVsTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT,
|
||||
Collider* colAC) {
|
||||
void CollisionCheck_AC_QuadVsTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||
static Vec3f D_8015E4B0;
|
||||
static TriNorm D_8015E4C0;
|
||||
static TriNorm D_8015E4F8;
|
||||
@@ -2466,8 +2450,7 @@ void CollisionCheck_AC_QuadVsTris(PlayState* play, CollisionCheckContext* colChk
|
||||
/**
|
||||
* AC overlap check. Calculates the center of each collider element and the point of contact.
|
||||
*/
|
||||
void CollisionCheck_AC_QuadVsQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT,
|
||||
Collider* colAC) {
|
||||
void CollisionCheck_AC_QuadVsQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* colAT, Collider* colAC) {
|
||||
static TriNorm D_8015E530[2];
|
||||
static Vec3f D_8015E598;
|
||||
static TriNorm D_8015E5A8[2];
|
||||
@@ -2531,8 +2514,8 @@ void CollisionCheck_SetJntSphHitFX(PlayState* play, CollisionCheckContext* colCh
|
||||
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && (element->info.acHitInfo != NULL) &&
|
||||
!(element->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
|
||||
Math_Vec3s_ToVec3f(&hitPos, &element->info.bumper.hitPos);
|
||||
CollisionCheck_HitEffects(play, element->info.acHit, element->info.acHitInfo, &jntSph->base,
|
||||
&element->info, &hitPos);
|
||||
CollisionCheck_HitEffects(play, element->info.acHit, element->info.acHitInfo, &jntSph->base, &element->info,
|
||||
&hitPos);
|
||||
element->info.acHitInfo->toucherFlags |= TOUCH_DREW_HITMARK;
|
||||
return;
|
||||
}
|
||||
@@ -2567,8 +2550,8 @@ void CollisionCheck_SetTrisHitFX(PlayState* play, CollisionCheckContext* colChkC
|
||||
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && (element->info.acHitInfo != NULL) &&
|
||||
!(element->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
|
||||
Math_Vec3s_ToVec3f(&hitPos, &element->info.bumper.hitPos);
|
||||
CollisionCheck_HitEffects(play, element->info.acHit, element->info.acHitInfo, &tris->base,
|
||||
&element->info, &hitPos);
|
||||
CollisionCheck_HitEffects(play, element->info.acHit, element->info.acHitInfo, &tris->base, &element->info,
|
||||
&hitPos);
|
||||
element->info.acHitInfo->toucherFlags |= TOUCH_DREW_HITMARK;
|
||||
return;
|
||||
}
|
||||
@@ -2785,8 +2768,7 @@ void CollisionCheck_SetOCvsOC(Collider* left, ColliderInfo* leftInfo, Vec3f* lef
|
||||
/**
|
||||
* OC overlap check for two JntSphs
|
||||
*/
|
||||
void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* l,
|
||||
Collider* r) {
|
||||
void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) {
|
||||
ColliderJntSph* left = (ColliderJntSph*)l;
|
||||
ColliderJntSphElement* leftElem;
|
||||
ColliderJntSph* right = (ColliderJntSph*)r;
|
||||
@@ -2819,8 +2801,7 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
|
||||
/**
|
||||
* OC overlap check for a JntSph and Cylinder
|
||||
*/
|
||||
void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* l,
|
||||
Collider* r) {
|
||||
void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) {
|
||||
ColliderJntSph* left = (ColliderJntSph*)l;
|
||||
ColliderJntSphElement* leftElem;
|
||||
ColliderCylinder* right = (ColliderCylinder*)r;
|
||||
@@ -2849,8 +2830,7 @@ void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCh
|
||||
/**
|
||||
* OC overlap check for a Cylinder and JntSph
|
||||
*/
|
||||
void CollisionCheck_OC_CylVsJntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* l,
|
||||
Collider* r) {
|
||||
void CollisionCheck_OC_CylVsJntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) {
|
||||
CollisionCheck_OC_JntSphVsCyl(play, colChkCtx, r, l);
|
||||
}
|
||||
|
||||
@@ -3124,8 +3104,8 @@ void CollisionCheck_Damage(PlayState* play, CollisionCheckContext* colChkCtx) {
|
||||
/**
|
||||
* Checks if the line ab intersects any of the ColliderJntSph's elements
|
||||
*/
|
||||
s32 CollisionCheck_LineOC_JntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
Vec3f* a, Vec3f* b) {
|
||||
s32 CollisionCheck_LineOC_JntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider, Vec3f* a,
|
||||
Vec3f* b) {
|
||||
static Linef D_8015E610;
|
||||
ColliderJntSph* jntSph = (ColliderJntSph*)collider;
|
||||
s32 i;
|
||||
@@ -3174,8 +3154,8 @@ static ColChkLineFunc sOCLineCheckFuncs[4] = {
|
||||
* Checks if the line segment ab intersects any OC colliders, excluding those attached to actors
|
||||
* on the exclusion list. Returns true if there are any intersections and false otherwise.
|
||||
*/
|
||||
s32 CollisionCheck_LineOC(PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b,
|
||||
Actor** exclusions, s32 numExclusions) {
|
||||
s32 CollisionCheck_LineOC(PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b, Actor** exclusions,
|
||||
s32 numExclusions) {
|
||||
ColChkLineFunc lineCheck;
|
||||
Collider** col;
|
||||
s32 i;
|
||||
@@ -3460,7 +3440,8 @@ void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v) {
|
||||
*/
|
||||
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
|
||||
CollisionCheck_SpawnShieldParticles(play, v);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3468,7 +3449,8 @@ void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
|
||||
*/
|
||||
void CollisionCheck_SpawnShieldParticlesMetalSound(PlayState* play, Vec3f* v, Vec3f* pos) {
|
||||
CollisionCheck_SpawnShieldParticles(play, v);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3508,7 +3490,8 @@ void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* a
|
||||
initWood.lightPoint.z = initWood.position.z;
|
||||
|
||||
Effect_Add(play, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &initWood);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -54,8 +54,8 @@ void func_801109B0(PlayState* play) {
|
||||
interfaceCtx->doActionSegment[1] = gCheckDoActionENGTex;
|
||||
interfaceCtx->doActionSegment[2] = gReturnDoActionENGTex;
|
||||
|
||||
interfaceCtx->iconItemSegment = GAMESTATE_ALLOC_MC(
|
||||
&play->state, 0x1000 * ARRAY_COUNT(gSaveContext.equips.buttonItems));
|
||||
interfaceCtx->iconItemSegment =
|
||||
GAMESTATE_ALLOC_MC(&play->state, 0x1000 * ARRAY_COUNT(gSaveContext.equips.buttonItems));
|
||||
|
||||
// "Icon Item Texture Initialization = %x"
|
||||
osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 0x4000);
|
||||
|
||||
+29
-29
@@ -24,35 +24,35 @@ Color_RGBA8 printTextColors[] = {
|
||||
};
|
||||
|
||||
InputCombo inputCombos[REG_GROUPS] = {
|
||||
{ BTN_L, BTN_CUP }, //REG
|
||||
{ BTN_L, BTN_CLEFT }, //SREG
|
||||
{ BTN_L, BTN_CDOWN }, //OREG
|
||||
{ BTN_L, BTN_A }, //PREG
|
||||
{ BTN_R, BTN_CDOWN }, //QREG
|
||||
{ BTN_L, BTN_CRIGHT }, //MREG
|
||||
{ BTN_L, BTN_R }, //YREG
|
||||
{ BTN_L, BTN_DLEFT }, //DREG
|
||||
{ BTN_L, BTN_DRIGHT }, //UREG
|
||||
{ BTN_L, BTN_DUP }, //IREG
|
||||
{ BTN_L, BTN_B }, //ZREG
|
||||
{ BTN_L, BTN_Z }, //CREG
|
||||
{ BTN_L, BTN_DDOWN }, //NREG
|
||||
{ BTN_R, BTN_A }, //KREG
|
||||
{ BTN_R, BTN_B }, //XREG
|
||||
{ BTN_R, BTN_Z }, //cREG
|
||||
{ BTN_R, BTN_L }, //sREG
|
||||
{ BTN_R, BTN_CUP }, //iREG
|
||||
{ BTN_R, BTN_CRIGHT }, //WREG
|
||||
{ BTN_R, BTN_DLEFT }, //AREG
|
||||
{ BTN_R, BTN_CLEFT }, //VREG
|
||||
{ BTN_R, BTN_START }, //HREG
|
||||
{ BTN_L, BTN_START }, //GREG
|
||||
{ BTN_R, BTN_DRIGHT }, //mREG
|
||||
{ BTN_R, BTN_DUP }, //nREG
|
||||
{ BTN_START, BTN_R }, //BREG
|
||||
{ BTN_START, BTN_A }, //dREG
|
||||
{ BTN_START, BTN_B }, //kREG
|
||||
{ BTN_START, BTN_CRIGHT }, //bREG
|
||||
{ BTN_L, BTN_CUP }, // REG
|
||||
{ BTN_L, BTN_CLEFT }, // SREG
|
||||
{ BTN_L, BTN_CDOWN }, // OREG
|
||||
{ BTN_L, BTN_A }, // PREG
|
||||
{ BTN_R, BTN_CDOWN }, // QREG
|
||||
{ BTN_L, BTN_CRIGHT }, // MREG
|
||||
{ BTN_L, BTN_R }, // YREG
|
||||
{ BTN_L, BTN_DLEFT }, // DREG
|
||||
{ BTN_L, BTN_DRIGHT }, // UREG
|
||||
{ BTN_L, BTN_DUP }, // IREG
|
||||
{ BTN_L, BTN_B }, // ZREG
|
||||
{ BTN_L, BTN_Z }, // CREG
|
||||
{ BTN_L, BTN_DDOWN }, // NREG
|
||||
{ BTN_R, BTN_A }, // KREG
|
||||
{ BTN_R, BTN_B }, // XREG
|
||||
{ BTN_R, BTN_Z }, // cREG
|
||||
{ BTN_R, BTN_L }, // sREG
|
||||
{ BTN_R, BTN_CUP }, // iREG
|
||||
{ BTN_R, BTN_CRIGHT }, // WREG
|
||||
{ BTN_R, BTN_DLEFT }, // AREG
|
||||
{ BTN_R, BTN_CLEFT }, // VREG
|
||||
{ BTN_R, BTN_START }, // HREG
|
||||
{ BTN_L, BTN_START }, // GREG
|
||||
{ BTN_R, BTN_DRIGHT }, // mREG
|
||||
{ BTN_R, BTN_DUP }, // nREG
|
||||
{ BTN_START, BTN_R }, // BREG
|
||||
{ BTN_START, BTN_A }, // dREG
|
||||
{ BTN_START, BTN_B }, // kREG
|
||||
{ BTN_START, BTN_CRIGHT }, // bREG
|
||||
};
|
||||
|
||||
char regChar[] = " SOPQMYDUIZCNKXcsiWAVHGmnBdkb";
|
||||
|
||||
@@ -86,8 +86,7 @@ void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, PlayStat
|
||||
gDPLoadTextureBlock(POLY_XLU_DISP++, texture, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 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);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDebugSpriteDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -105,8 +104,7 @@ void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, void* dlist, PlayState*
|
||||
Matrix_SetTranslateRotateYXZ(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, &dispObj->rot);
|
||||
Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, dlist);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
+63
-48
@@ -249,7 +249,8 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
|
||||
case 3:
|
||||
if (sp3F != 0) {
|
||||
Flags_SetEnv(play, 0);
|
||||
if (gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_ENTRANCE || (IS_RANDO && gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_WARP_PAD)) {
|
||||
if (gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_ENTRANCE ||
|
||||
(IS_RANDO && gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_WARP_PAD)) {
|
||||
Flags_SetEnv(play, 2);
|
||||
}
|
||||
}
|
||||
@@ -314,8 +315,7 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
|
||||
break;
|
||||
case 15:
|
||||
if (sp3F != 0) {
|
||||
TitleCard_InitPlaceName(play, &play->actorCtx.titleCtx, player->giObjectSegment, 160, 120,
|
||||
144, 24, 20);
|
||||
TitleCard_InitPlaceName(play, &play->actorCtx.titleCtx, player->giObjectSegment, 160, 120, 144, 24, 20);
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
@@ -516,16 +516,18 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
||||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B) ||
|
||||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START)) &&
|
||||
(gSaveContext.fileNum != 0xFEDC) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
temp = 1;
|
||||
}
|
||||
|
||||
bool playCutscene = false;
|
||||
if ((!CVarGetInteger(CVAR_ENHANCEMENT("CreditsFix"), 1) || ResourceMgr_GetGameRegion(0) == GAME_REGION_NTSC) && (cmd->startFrame == csCtx->frames)) {
|
||||
if ((!CVarGetInteger(CVAR_ENHANCEMENT("CreditsFix"), 1) || ResourceMgr_GetGameRegion(0) == GAME_REGION_NTSC) &&
|
||||
(cmd->startFrame == csCtx->frames)) {
|
||||
playCutscene = true;
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("CreditsFix"), 1)) {
|
||||
u16 delay = 0;
|
||||
|
||||
|
||||
// HACK: Align visual timing with audio during credits sequence
|
||||
switch (cmd->base) {
|
||||
case 55: // Gerudo fortress (second scene of credits roll)
|
||||
@@ -633,7 +635,8 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
||||
gSaveContext.fw.set = 0;
|
||||
gSaveContext.respawn[RESPAWN_MODE_TOP].data = 0;
|
||||
}
|
||||
if (GameInteractor_Should(VB_PLAY_PULL_MASTER_SWORD_CS, !Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) {
|
||||
if (GameInteractor_Should(VB_PLAY_PULL_MASTER_SWORD_CS,
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL);
|
||||
play->nextEntranceIndex = ENTR_CUTSCENE_MAP_0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
@@ -1096,7 +1099,8 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 95:
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) && (Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) &&
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) &&
|
||||
(Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) &&
|
||||
(Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP))) {
|
||||
play->nextEntranceIndex = ENTR_TEMPLE_OF_TIME_ENTRANCE;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
@@ -1252,8 +1256,12 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
||||
play->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 113:
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_FOREST_TRIAL) && Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_WATER_TRIAL) && Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_SHADOW_TRIAL) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_FIRE_TRIAL) && Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_LIGHT_TRIAL) && Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_SPIRIT_TRIAL)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_FOREST_TRIAL) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_WATER_TRIAL) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_SHADOW_TRIAL) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_FIRE_TRIAL) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_LIGHT_TRIAL) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_SPIRIT_TRIAL)) {
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTowerBarrierCs);
|
||||
play->csCtx.frames = 0;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
@@ -1330,13 +1338,14 @@ void Cutscene_Command_TransitionFX(PlayState* play, CutsceneContext* csCtx, CsCm
|
||||
if (cmd->base == 1) {
|
||||
play->envCtx.screenFillColor[3] = 255.0f * temp;
|
||||
if ((temp == 0.0f) && (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if ((temp == 0.0f) &&
|
||||
((gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_ENTRANCE) || (gSaveContext.entranceIndex == ENTR_CASTLE_GROUNDS_SOUTH_EXIT) ||
|
||||
((gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_ENTRANCE) ||
|
||||
(gSaveContext.entranceIndex == ENTR_CASTLE_GROUNDS_SOUTH_EXIT) ||
|
||||
(gSaveContext.entranceIndex == ENTR_GREAT_FAIRYS_FOUNTAIN_SPELLS_FARORES_ZF))) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if ((temp == 0.0f) && (play->sceneNum == SCENE_INSIDE_GANONS_CASTLE)) {
|
||||
Sfx_PlaySfxCentered2(NA_SE_EV_WHITE_OUT);
|
||||
}
|
||||
@@ -1410,8 +1419,8 @@ size_t Cutscene_Command_CameraPositions(PlayState* play, CutsceneContext* csCtx,
|
||||
CsCmdBase* cmdBase = (CsCmdBase*)cmd;
|
||||
size_t size;
|
||||
|
||||
cmd += sizeof(CutsceneData)*2;
|
||||
size = sizeof(CutsceneData)*2;
|
||||
cmd += sizeof(CutsceneData) * 2;
|
||||
size = sizeof(CutsceneData) * 2;
|
||||
|
||||
if ((cmdBase->startFrame < csCtx->frames) && (csCtx->frames < cmdBase->endFrame) &&
|
||||
((csCtx->unk_18 < cmdBase->startFrame) || (csCtx->unk_18 >= 0xF000))) {
|
||||
@@ -1424,8 +1433,8 @@ size_t Cutscene_Command_CameraPositions(PlayState* play, CutsceneContext* csCtx,
|
||||
Play_ChangeCameraStatus(play, D_8015FCC6, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Play_GetCamera(play, csCtx->unk_14));
|
||||
Camera_SetCSParams(Play_GetCamera(play, csCtx->unk_14), csCtx->cameraFocus,
|
||||
csCtx->cameraPosition, GET_PLAYER(play), relativeToLink);
|
||||
Camera_SetCSParams(Play_GetCamera(play, csCtx->unk_14), csCtx->cameraFocus, csCtx->cameraPosition,
|
||||
GET_PLAYER(play), relativeToLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1461,8 +1470,8 @@ size_t Cutscene_Command_CameraFocus(PlayState* play, CutsceneContext* csCtx, u8*
|
||||
Play_ChangeCameraStatus(play, D_8015FCC6, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, csCtx->unk_14, CAM_STAT_ACTIVE);
|
||||
Camera_ResetAnim(Play_GetCamera(play, csCtx->unk_14));
|
||||
Camera_SetCSParams(Play_GetCamera(play, csCtx->unk_14), csCtx->cameraFocus,
|
||||
csCtx->cameraPosition, GET_PLAYER(play), relativeToLink);
|
||||
Camera_SetCSParams(Play_GetCamera(play, csCtx->unk_14), csCtx->cameraFocus, csCtx->cameraPosition,
|
||||
GET_PLAYER(play), relativeToLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1607,7 +1616,8 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GIFT_FROM_RAURU, RG_LIGHT_MEDALLION);
|
||||
break;
|
||||
case 0x72:
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_TOT_LIGHT_ARROWS_CUTSCENE, RG_LIGHT_ARROWS);
|
||||
getItemEntry =
|
||||
Randomizer_GetItemFromKnownCheck(RC_TOT_LIGHT_ARROWS_CUTSCENE, RG_LIGHT_ARROWS);
|
||||
break;
|
||||
}
|
||||
if (getItemEntry.getItemId != GI_NONE) {
|
||||
@@ -1641,14 +1651,16 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
|
||||
if ((dialogState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
if (cmd->textId1 != 0xFFFF) {
|
||||
// LUSLOG_INFO("Cutscene_Command_Textbox D: base:0x%x textId1:0x%x textId2:0x%x", cmd->base, cmd->textId1, cmd->textId2);
|
||||
// LUSLOG_INFO("Cutscene_Command_Textbox D: base:0x%x textId1:0x%x textId2:0x%x", cmd->base,
|
||||
// cmd->textId1, cmd->textId2);
|
||||
Message_ContinueTextbox(play, cmd->textId1);
|
||||
} else {
|
||||
csCtx->frames++;
|
||||
}
|
||||
} else {
|
||||
if (cmd->textId2 != 0xFFFF) {
|
||||
// LUSLOG_INFO("Cutscene_Command_Textbox E: base:0x%x textId1:0x%x textId2:0x%x", cmd->base, cmd->textId1, cmd->textId2);
|
||||
// LUSLOG_INFO("Cutscene_Command_Textbox E: base:0x%x textId1:0x%x textId2:0x%x", cmd->base,
|
||||
// cmd->textId1, cmd->textId2);
|
||||
Message_ContinueTextbox(play, cmd->textId2);
|
||||
} else {
|
||||
csCtx->frames++;
|
||||
@@ -1658,7 +1670,8 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
|
||||
|
||||
if (dialogState == TEXT_STATE_9) {
|
||||
if (cmd->textId1 != 0xFFFF) {
|
||||
// LUSLOG_INFO("Cutscene_Command_Textbox F: base:0x%x textId1:0x%x textId2:0x%x", cmd->base, cmd->textId1, cmd->textId2);
|
||||
// LUSLOG_INFO("Cutscene_Command_Textbox F: base:0x%x textId1:0x%x textId2:0x%x", cmd->base,
|
||||
// cmd->textId1, cmd->textId2);
|
||||
Message_ContinueTextbox(play, cmd->textId1);
|
||||
} else {
|
||||
csCtx->frames++;
|
||||
@@ -1703,7 +1716,8 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc
|
||||
return;
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) &&
|
||||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) {
|
||||
csCtx->state = CS_STATE_UNSKIPPABLE_INIT;
|
||||
return;
|
||||
}
|
||||
@@ -1716,7 +1730,7 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc
|
||||
return;
|
||||
}
|
||||
|
||||
//printf("CmdType: %04X\n", cmdType);
|
||||
// printf("CmdType: %04X\n", cmdType);
|
||||
|
||||
switch (cmdType) {
|
||||
case CS_CMD_MISC:
|
||||
@@ -2197,41 +2211,43 @@ void Cutscene_HandleEntranceTriggers(PlayState* play) {
|
||||
|
||||
void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
||||
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", ((void)0, gSaveContext.respawnFlag));
|
||||
LUSLOG_INFO("Cutscene_HandleConditionalTriggers - entranceIndex: %#x cutsceneIndex: %#x", gSaveContext.entranceIndex, gSaveContext.cutsceneIndex);
|
||||
LUSLOG_INFO("Cutscene_HandleConditionalTriggers - entranceIndex: %#x cutsceneIndex: %#x",
|
||||
gSaveContext.entranceIndex, gSaveContext.cutsceneIndex);
|
||||
|
||||
if (!GameInteractor_Should(VB_PLAY_TRANSITION_CS, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
if ((gSaveContext.entranceIndex == ENTR_DESERT_COLOSSUS_OUTSIDE_TEMPLE) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT)) {
|
||||
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) && (gSaveContext.respawnFlag <= 0) &&
|
||||
(gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
if ((gSaveContext.entranceIndex == ENTR_DESERT_COLOSSUS_OUTSIDE_TEMPLE) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT);
|
||||
gSaveContext.entranceIndex = ENTR_DESERT_COLOSSUS_EAST_EXIT;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
} else if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_NOCTURNE_OF_SHADOW, (
|
||||
(gSaveContext.entranceIndex == ENTR_KAKARIKO_VILLAGE_FRONT_GATE) &&
|
||||
LINK_IS_ADULT &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)
|
||||
))) {
|
||||
} else if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_NOCTURNE_OF_SHADOW,
|
||||
((gSaveContext.entranceIndex == ENTR_KAKARIKO_VILLAGE_FRONT_GATE) &&
|
||||
LINK_IS_ADULT &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)))) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
} else if ((gSaveContext.entranceIndex == ENTR_LOST_WOODS_BRIDGE_EAST_EXIT) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
|
||||
} else if ((gSaveContext.entranceIndex == ENTR_LOST_WOODS_BRIDGE_EAST_EXIT) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE);
|
||||
if (GameInteractor_Should(VB_GIVE_ITEM_FAIRY_OCARINA, true)) {
|
||||
Item_Give(play, ITEM_OCARINA_FAIRY);
|
||||
}
|
||||
gSaveContext.entranceIndex = ENTR_LOST_WOODS_SOUTH_EXIT;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
} else if (GameInteractor_Should(VB_BE_ELIGIBLE_FOR_LIGHT_ARROWS, (
|
||||
CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) &&
|
||||
CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
|
||||
LINK_IS_ADULT &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS) &&
|
||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TEMPLE_OF_TIME)
|
||||
))) {
|
||||
} else if (GameInteractor_Should(
|
||||
VB_BE_ELIGIBLE_FOR_LIGHT_ARROWS,
|
||||
(CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
|
||||
LINK_IS_ADULT &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS) &&
|
||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TEMPLE_OF_TIME)))) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
||||
gSaveContext.entranceIndex = ENTR_TEMPLE_OF_TIME_ENTRANCE;
|
||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||
@@ -2245,8 +2261,7 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
||||
}
|
||||
|
||||
void Cutscene_SetSegment(PlayState* play, void* segment) {
|
||||
if (SEGMENT_NUMBER(segment) != 0)
|
||||
{
|
||||
if (SEGMENT_NUMBER(segment) != 0) {
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(segment);
|
||||
} else {
|
||||
play->csCtx.segment = segment;
|
||||
|
||||
+86
-139
@@ -382,16 +382,16 @@ DrawItemTableEntry sDrawItemTable[] = {
|
||||
{ GetItem_DrawJewelGoron, { gGiGoronRubyGemDL, gGiGoronRubySettingDL } },
|
||||
{ GetItem_DrawJewelZora, { gGiZoraSapphireGemDL, gGiZoraSapphireSettingDL } },
|
||||
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Generic
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, // Generic
|
||||
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Zelda's Lullaby
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Epona's song
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Saria's song
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Sun's song
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Song of time
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Song of storms
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, // Zelda's Lullaby
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, // Epona's song
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, // Saria's song
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, // Sun's song
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, // Song of time
|
||||
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, // Song of storms
|
||||
{ GetItem_DrawTriforcePiece, { gTriforcePiece0DL } }, // Triforce Piece
|
||||
{ GetItem_DrawFishingPole, { gFishingPoleGiDL } }, // Fishing Pole
|
||||
{ GetItem_DrawFishingPole, { gFishingPoleGiDL } }, // Fishing Pole
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -512,8 +512,7 @@ void GetItem_DrawMaskOrBombchu(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_26Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -525,8 +524,7 @@ void GetItem_DrawSoldOut(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 5);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -538,20 +536,17 @@ void GetItem_DrawBlueFire(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0),
|
||||
0 * (play->state.frames * 0), 16, 32, 1, 1 * (play->state.frames * 1),
|
||||
1 * -(play->state.frames * 8), 16, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 16,
|
||||
32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 8), 16, 32));
|
||||
Matrix_Push();
|
||||
Matrix_Translate(-8.0f, -2.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
Matrix_Pop();
|
||||
|
||||
@@ -564,22 +559,18 @@ void GetItem_DrawPoes(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0),
|
||||
0 * (play->state.frames * 0), 16, 32, 1, 1 * (play->state.frames * 1),
|
||||
1 * -(play->state.frames * 6), 16, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 16,
|
||||
32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 6), 16, 32));
|
||||
Matrix_Push();
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
Matrix_Pop();
|
||||
@@ -593,22 +584,18 @@ void GetItem_DrawFairy(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0),
|
||||
0 * (play->state.frames * 0), 32, 32, 1, 1 * (play->state.frames * 1),
|
||||
1 * -(play->state.frames * 6), 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 32,
|
||||
32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 6), 32, 32));
|
||||
Matrix_Push();
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
Matrix_Pop();
|
||||
|
||||
@@ -623,16 +610,13 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 drawId) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0) % 256,
|
||||
1 * (play->state.frames * 2) % 256, 64, 64, 1,
|
||||
0 * (play->state.frames * 0) % 128, 1 * (play->state.frames * 1) % 128, 32,
|
||||
32));
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
1 * (play->state.frames * 2) % 256, 64, 64, 1, 0 * (play->state.frames * 0) % 128,
|
||||
1 * (play->state.frames * 1) % 128, 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -644,17 +628,14 @@ void GetItem_DrawSkullToken(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0),
|
||||
1 * -(play->state.frames * 5), 32, 32, 1, 0 * (play->state.frames * 0),
|
||||
0 * (play->state.frames * 0), 32, 64));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * -(play->state.frames * 5), 32,
|
||||
32, 1, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 32, 64));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -666,8 +647,7 @@ void GetItem_DrawEggOrMedallion(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_26Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
|
||||
@@ -680,13 +660,11 @@ void GetItem_DrawCompass(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 5);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -699,19 +677,16 @@ void GetItem_DrawPotion(PlayState* play, s16 drawId) {
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, -1 * (play->state.frames * 1),
|
||||
1 * (play->state.frames * 1), 32, 32, 1, -1 * (play->state.frames * 1),
|
||||
1 * (play->state.frames * 1), 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), 32,
|
||||
32, 1, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[3]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[4]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[5]);
|
||||
|
||||
@@ -725,11 +700,9 @@ void GetItem_DrawGoronSword(PlayState* play, s16 drawId) {
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 1),
|
||||
0 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 1),
|
||||
0 * (play->state.frames * 1), 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32,
|
||||
32, 1, 0 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -742,11 +715,9 @@ void GetItem_DrawDekuNuts(PlayState* play, s16 drawId) {
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6),
|
||||
1 * (play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 6),
|
||||
1 * (play->state.frames * 6), 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32,
|
||||
32, 1, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -759,13 +730,11 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) {
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 1),
|
||||
1 * -(play->state.frames * 3), 32, 32, 1, 0 * (play->state.frames * 1),
|
||||
1 * -(play->state.frames * 2), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 3), 32,
|
||||
32, 1, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 2), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.Hearts.Changed"), 0)) {
|
||||
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("Consumable.Hearts.Value"), (Color_RGB8) { 255, 70, 50 });
|
||||
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("Consumable.Hearts.Value"), (Color_RGB8){ 255, 70, 50 });
|
||||
gDPSetGrayscaleColor(POLY_XLU_DISP++, color.r, color.g, color.b, 255);
|
||||
gSPGrayscale(POLY_XLU_DISP++, true);
|
||||
}
|
||||
@@ -783,11 +752,9 @@ void GetItem_DrawFish(PlayState* play, s16 drawId) {
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0),
|
||||
1 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 0),
|
||||
1 * (play->state.frames * 1), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32,
|
||||
32, 1, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -799,8 +766,7 @@ void GetItem_DrawOpa0(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -812,13 +778,11 @@ void GetItem_DrawOpa0Xlu1(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -826,20 +790,20 @@ void GetItem_DrawOpa0Xlu1(PlayState* play, s16 drawId) {
|
||||
|
||||
void GetItem_DrawGenericMusicNote(PlayState* play, s16 drawId) {
|
||||
s32 pad;
|
||||
s16 color_slot = drawId-120; //0 = generic
|
||||
s16 color_slot = drawId - 120; // 0 = generic
|
||||
s16* colors[7][3] = {
|
||||
{255,255,255}, //Generic Song (full white)
|
||||
{109, 73,143}, //Lullaby
|
||||
{217,110, 48}, //Epona
|
||||
{ 62,109, 23}, //Saria
|
||||
{237,231, 62}, //Sun
|
||||
{ 98,177,211}, //Time
|
||||
{146,146,146} //Storms
|
||||
{ 255, 255, 255 }, // Generic Song (full white)
|
||||
{ 109, 73, 143 }, // Lullaby
|
||||
{ 217, 110, 48 }, // Epona
|
||||
{ 62, 109, 23 }, // Saria
|
||||
{ 237, 231, 62 }, // Sun
|
||||
{ 98, 177, 211 }, // Time
|
||||
{ 146, 146, 146 } // Storms
|
||||
};
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, __FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, __FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255);
|
||||
gSPGrayscale(POLY_XLU_DISP++, true);
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
@@ -855,8 +819,7 @@ void GetItem_DrawXlu01(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
|
||||
@@ -869,14 +832,12 @@ void GetItem_DrawOpa10Xlu2(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -888,13 +849,11 @@ void GetItem_DrawMagicArrow(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
|
||||
@@ -908,11 +867,9 @@ void GetItem_DrawMagicSpell(PlayState* play, s16 drawId) {
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2),
|
||||
1 * -(play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 1),
|
||||
-1 * (play->state.frames * 2), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), 1 * -(play->state.frames * 6), 32,
|
||||
32, 1, 1 * (play->state.frames * 1), -1 * (play->state.frames * 2), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
@@ -926,8 +883,7 @@ void GetItem_DrawOpa1023(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
@@ -942,14 +898,12 @@ void GetItem_DrawOpa10Xlu32(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
|
||||
@@ -964,14 +918,12 @@ void GetItem_DrawSmallRupee(PlayState* play, s16 drawId) {
|
||||
Matrix_Scale(0.7f, 0.7f, 0.7f, MTXMODE_APPLY);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
|
||||
@@ -985,11 +937,9 @@ void GetItem_DrawScale(PlayState* play, s16 drawId) {
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2),
|
||||
-1 * (play->state.frames * 2), 64, 64, 1, 1 * (play->state.frames * 4),
|
||||
1 * -(play->state.frames * 4), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), -1 * (play->state.frames * 2), 64,
|
||||
64, 1, 1 * (play->state.frames * 4), 1 * -(play->state.frames * 4), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
@@ -1004,14 +954,12 @@ void GetItem_DrawBulletBag(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[4]);
|
||||
@@ -1025,8 +973,7 @@ void GetItem_DrawWallet(PlayState* play, s16 drawId) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]);
|
||||
@@ -1051,13 +998,13 @@ void GetItem_DrawTriforcePiece(PlayState* play, s16 drawId) {
|
||||
|
||||
switch (index) {
|
||||
case 1:
|
||||
triforcePieceDL = (Gfx*) gTriforcePiece1DL;
|
||||
triforcePieceDL = (Gfx*)gTriforcePiece1DL;
|
||||
break;
|
||||
case 2:
|
||||
triforcePieceDL = (Gfx*) gTriforcePiece2DL;
|
||||
triforcePieceDL = (Gfx*)gTriforcePiece2DL;
|
||||
break;
|
||||
default:
|
||||
triforcePieceDL = (Gfx*) gTriforcePiece0DL;
|
||||
triforcePieceDL = (Gfx*)gTriforcePiece0DL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
||||
}
|
||||
}
|
||||
|
||||
//dumb doo doo command to change the type of an object's blur on the fly. Link's Swords with unique trail colors.
|
||||
// dumb doo doo command to change the type of an object's blur on the fly. Link's Swords with unique trail colors.
|
||||
void EffectBlure_ChangeType(EffectBlure* this, int type) {
|
||||
this->trailType = type;
|
||||
}
|
||||
@@ -831,7 +831,6 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
||||
} else {
|
||||
EffectBlure_DrawElemHermiteInterpolation(this, elem, i, gfxCtx);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
@@ -1170,7 +1169,6 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
||||
} else {
|
||||
gSP1Quadrangle(POLY_XLU_DISP++, j - 2, j - 1, j + 1, j, 0);
|
||||
|
||||
|
||||
if (this->unkFlag == 1) {
|
||||
phi_t2 = 0;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
||||
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPVertex(POLY_XLU_DISP++, sVertices, 4, 0);
|
||||
gSP2Triangles(POLY_XLU_DISP++, 0, 1, 2, 0, 0, 3, 1, 0);
|
||||
|
||||
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ void EffectSs_InitInfo(PlayState* play, s32 tableSize) {
|
||||
for (i = 0; i < ARRAY_COUNT(gEffectSsOverlayTable); i++) {
|
||||
overlay = &gEffectSsOverlayTable[i];
|
||||
osSyncPrintf("effect index %3d:size=%6dbyte romsize=%6dbyte\n", i,
|
||||
(uintptr_t)overlay->vramEnd - (uintptr_t)overlay->vramStart, overlay->vromEnd - overlay->vromStart);
|
||||
(uintptr_t)overlay->vramEnd - (uintptr_t)overlay->vramStart,
|
||||
overlay->vromEnd - overlay->vromStart);
|
||||
}
|
||||
|
||||
sEffectSsInfo.table =
|
||||
GAMESTATE_ALLOC_MC(&play->state, tableSize * sizeof(EffectSs));
|
||||
sEffectSsInfo.table = GAMESTATE_ALLOC_MC(&play->state, tableSize * sizeof(EffectSs));
|
||||
assert(sEffectSsInfo.table != NULL);
|
||||
|
||||
sEffectSsInfo.searchStartIndex = 0;
|
||||
@@ -216,10 +216,11 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) {
|
||||
osSyncPrintf(VT_RST);
|
||||
}
|
||||
|
||||
initInfo = (void*)(uintptr_t)((overlayEntry->initInfo != NULL)
|
||||
? (void*)((uintptr_t)overlayEntry->initInfo -
|
||||
((intptr_t)overlayEntry->vramStart - (intptr_t)overlayEntry->loadedRamAddr))
|
||||
: NULL);
|
||||
initInfo =
|
||||
(void*)(uintptr_t)((overlayEntry->initInfo != NULL) ? (void*)((uintptr_t)overlayEntry->initInfo -
|
||||
((intptr_t)overlayEntry->vramStart -
|
||||
(intptr_t)overlayEntry->loadedRamAddr))
|
||||
: NULL);
|
||||
}
|
||||
|
||||
if (initInfo->init == NULL) {
|
||||
|
||||
@@ -30,15 +30,9 @@
|
||||
// 1, \
|
||||
// },
|
||||
|
||||
#define DEFINE_EFFECT_SS(name, _1) \
|
||||
{ \
|
||||
(uintptr_t)0, \
|
||||
(uintptr_t)0, \
|
||||
0, \
|
||||
0, \
|
||||
NULL, \
|
||||
&name##_InitVars, \
|
||||
1, \
|
||||
#define DEFINE_EFFECT_SS(name, _1) \
|
||||
{ \
|
||||
(uintptr_t)0, (uintptr_t)0, 0, 0, NULL, &name##_InitVars, 1, \
|
||||
},
|
||||
|
||||
#define DEFINE_EFFECT_SS_UNSET(_0) { 0 },
|
||||
|
||||
@@ -154,13 +154,11 @@ void func_800286CC(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s
|
||||
EffectSsDust_Spawn(play, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, 10, 0);
|
||||
}
|
||||
|
||||
void func_8002873C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
|
||||
s16 life) {
|
||||
void func_8002873C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life) {
|
||||
EffectSsDust_Spawn(play, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, life, 0);
|
||||
}
|
||||
|
||||
void func_800287AC(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
|
||||
s16 life) {
|
||||
void func_800287AC(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life) {
|
||||
EffectSsDust_Spawn(play, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, life, 0);
|
||||
}
|
||||
|
||||
@@ -229,13 +227,13 @@ void EffectSsKiraKira_SpawnSmallYellow(PlayState* play, Vec3f* pos, Vec3f* veloc
|
||||
EffectSsKiraKira_SpawnDispersed(play, pos, velocity, accel, &primColor, &envColor, 1000, 16);
|
||||
}
|
||||
|
||||
void EffectSsKiraKira_SpawnSmall(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
Color_RGBA8* primColor, Color_RGBA8* envColor) {
|
||||
void EffectSsKiraKira_SpawnSmall(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
|
||||
Color_RGBA8* envColor) {
|
||||
EffectSsKiraKira_SpawnDispersed(play, pos, velocity, accel, primColor, envColor, 1000, 16);
|
||||
}
|
||||
|
||||
void EffectSsKiraKira_SpawnDispersed(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life) {
|
||||
void EffectSsKiraKira_SpawnDispersed(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
|
||||
Color_RGBA8* envColor, s16 scale, s32 life) {
|
||||
EffectSsKiraKiraInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -255,8 +253,8 @@ void EffectSsKiraKira_SpawnDispersed(PlayState* play, Vec3f* pos, Vec3f* velocit
|
||||
EffectSs_Spawn(play, EFFECT_SS_KIRAKIRA, 128, &initParams);
|
||||
}
|
||||
|
||||
void EffectSsKiraKira_SpawnFocused(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life) {
|
||||
void EffectSsKiraKira_SpawnFocused(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
|
||||
Color_RGBA8* envColor, s16 scale, s32 life) {
|
||||
EffectSsKiraKiraInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -303,8 +301,7 @@ void EffectSsBomb2_SpawnFade(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f
|
||||
EffectSs_Spawn(play, EFFECT_SS_BOMB2, 10, &initParams);
|
||||
}
|
||||
|
||||
void EffectSsBomb2_SpawnLayered(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
|
||||
s16 scaleStep) {
|
||||
void EffectSsBomb2_SpawnLayered(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep) {
|
||||
EffectSsBomb2InitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -344,8 +341,8 @@ void EffectSsBlast_SpawnWhiteCustomScale(PlayState* play, Vec3f* pos, Vec3f* vel
|
||||
EffectSsBlast_Spawn(play, pos, velocity, accel, &primColor, &envColor, scale, scaleStep, 35, life);
|
||||
}
|
||||
|
||||
void EffectSsBlast_SpawnShockwave(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 life) {
|
||||
void EffectSsBlast_SpawnShockwave(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
|
||||
Color_RGBA8* envColor, s16 life) {
|
||||
EffectSsBlast_Spawn(play, pos, velocity, accel, primColor, envColor, 100, 375, 35, life);
|
||||
}
|
||||
|
||||
@@ -401,8 +398,8 @@ void EffectSsGSpk_SpawnFuse(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* ve
|
||||
}
|
||||
|
||||
// unused
|
||||
void EffectSsGSpk_SpawnRandColor(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
s16 scale, s16 scaleStep) {
|
||||
void EffectSsGSpk_SpawnRandColor(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
|
||||
s16 scaleStep) {
|
||||
Color_RGBA8 primColor = { 255, 255, 150, 255 };
|
||||
Color_RGBA8 envColor = { 255, 0, 0, 0 };
|
||||
s32 randOffset = (Rand_ZeroOne() * 20.0f) - 10.0f;
|
||||
@@ -477,8 +474,8 @@ void EffectSsGRipple_Spawn(PlayState* play, Vec3f* pos, s16 radius, s16 radiusMa
|
||||
|
||||
// EffectSsGSplash Spawn Functions
|
||||
|
||||
void EffectSsGSplash_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
|
||||
s16 type, s16 scale) {
|
||||
void EffectSsGSplash_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type,
|
||||
s16 scale) {
|
||||
EffectSsGSplashInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -518,8 +515,8 @@ void EffectSsGFire_Spawn(PlayState* play, Vec3f* pos) {
|
||||
|
||||
// EffectSsLightning Spawn Functions
|
||||
|
||||
void EffectSsLightning_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
|
||||
s16 scale, s16 yaw, s16 life, s16 numBolts) {
|
||||
void EffectSsLightning_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale,
|
||||
s16 yaw, s16 life, s16 numBolts) {
|
||||
EffectSsLightningInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -535,8 +532,8 @@ void EffectSsLightning_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor
|
||||
|
||||
// EffectSsDtBubble Spawn Functions
|
||||
|
||||
void EffectSsDtBubble_SpawnColorProfile(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
|
||||
s16 life, s16 colorProfile, s16 randXZ) {
|
||||
void EffectSsDtBubble_SpawnColorProfile(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 life,
|
||||
s16 colorProfile, s16 randXZ) {
|
||||
EffectSsDtBubbleInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -579,8 +576,8 @@ void EffectSsDtBubble_SpawnCustomColor(PlayState* play, Vec3f* pos, Vec3f* veloc
|
||||
* - due to how life is implemented it is capped at 200. Any value over 200 is accepted, but the fragment will
|
||||
* only live for 200 frames
|
||||
*/
|
||||
void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale,
|
||||
s16 objId, s16 life, Gfx* dList) {
|
||||
void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale, s16 objId,
|
||||
s16 life, Gfx* dList) {
|
||||
EffectSsHahenInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -604,8 +601,8 @@ void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* ac
|
||||
* - due to how life is implemented it is capped at 200. Any value over 200 is accepted, but the fragment will
|
||||
* only live for 200 frames
|
||||
*/
|
||||
void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 unused, s16 scale,
|
||||
s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList) {
|
||||
void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 unused, s16 scale, s16 randScaleRange,
|
||||
s16 count, s16 objId, s16 life, Gfx* dList) {
|
||||
s32 i;
|
||||
Vec3f velocity;
|
||||
Vec3f accel;
|
||||
@@ -618,8 +615,8 @@ void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 u
|
||||
velocity.z = (Rand_ZeroOne() - 0.5f) * burstScale;
|
||||
velocity.y = ((Rand_ZeroOne() * 0.5f) + 0.5f) * burstScale;
|
||||
|
||||
EffectSsHahen_Spawn(play, pos, &velocity, &accel, unused, Rand_S16Offset(scale, randScaleRange), objId,
|
||||
life, dList);
|
||||
EffectSsHahen_Spawn(play, pos, &velocity, &accel, unused, Rand_S16Offset(scale, randScaleRange), objId, life,
|
||||
dList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -640,8 +637,8 @@ void EffectSsStick_Spawn(PlayState* play, Vec3f* pos, s16 yaw) {
|
||||
|
||||
// EffectSsSibuki Spawn Functions
|
||||
|
||||
void EffectSsSibuki_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 moveDelay,
|
||||
s16 direction, s16 scale) {
|
||||
void EffectSsSibuki_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 moveDelay, s16 direction,
|
||||
s16 scale) {
|
||||
EffectSsSibukiInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -681,8 +678,8 @@ void EffectSsSibuki2_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f*
|
||||
|
||||
// EffectSsGMagma2 Spawn Functions
|
||||
|
||||
void EffectSsGMagma2_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
|
||||
s16 updateRate, s16 drawMode, s16 scale) {
|
||||
void EffectSsGMagma2_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 updateRate,
|
||||
s16 drawMode, s16 scale) {
|
||||
EffectSsGMagma2InitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -734,8 +731,7 @@ void EffectSsHitMark_SpawnCustomScale(PlayState* play, s32 type, s16 scale, Vec3
|
||||
* param changes the color of the ball. Refer to FhgFlashLightBallParam for the options.
|
||||
* Note: this type requires OBJECT_FHG to be loaded
|
||||
*/
|
||||
void EffectSsFhgFlash_SpawnLightBall(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
|
||||
u8 param) {
|
||||
void EffectSsFhgFlash_SpawnLightBall(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, u8 param) {
|
||||
EffectSsFhgFlashInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -799,9 +795,9 @@ void EffectSsSolderSrchBall_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity,
|
||||
|
||||
// EffectSsKakera Spawn Functions
|
||||
|
||||
void EffectSsKakera_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5,
|
||||
s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx,
|
||||
s16 objId, Gfx* dList) {
|
||||
void EffectSsKakera_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5, s16 arg6,
|
||||
s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx, s16 objId,
|
||||
Gfx* dList) {
|
||||
EffectSsKakeraInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -867,8 +863,8 @@ void EffectSsIcePiece_SpawnBurst(PlayState* play, Vec3f* refPos, f32 scale) {
|
||||
pos.y += vecScales[i].y;
|
||||
pos.z += vecScales[i].z;
|
||||
|
||||
EffectSsIcePiece_Spawn(play, &pos, (Rand_ZeroFloat(1.0f) + 0.5f) * ((scale * 1.3f) * 100.0f), &velocity,
|
||||
&accel, 25);
|
||||
EffectSsIcePiece_Spawn(play, &pos, (Rand_ZeroFloat(1.0f) + 0.5f) * ((scale * 1.3f) * 100.0f), &velocity, &accel,
|
||||
25);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -924,8 +920,8 @@ void EffectSsEnIce_SpawnFlyingVec3s(PlayState* play, Actor* actor, Vec3s* pos, s
|
||||
EffectSs_Spawn(play, EFFECT_SS_EN_ICE, 80, &initParams);
|
||||
}
|
||||
|
||||
void EffectSsEnIce_Spawn(PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel,
|
||||
Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life) {
|
||||
void EffectSsEnIce_Spawn(PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
|
||||
Color_RGBA8* envColor, s32 life) {
|
||||
EffectSsEnIceInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -979,8 +975,7 @@ void EffectSsFireTail_SpawnFlame(PlayState* play, Actor* actor, Vec3f* pos, f32
|
||||
void EffectSsFireTail_SpawnFlameOnPlayer(PlayState* play, f32 scale, s16 bodyPart, f32 colorIntensity) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
EffectSsFireTail_SpawnFlame(play, &player->actor, &player->bodyPartsPos[bodyPart], scale, bodyPart,
|
||||
colorIntensity);
|
||||
EffectSsFireTail_SpawnFlame(play, &player->actor, &player->bodyPartsPos[bodyPart], scale, bodyPart, colorIntensity);
|
||||
}
|
||||
|
||||
// EffectSsEnFire Spawn Functions
|
||||
@@ -1136,15 +1131,14 @@ void EffectSsDeadDs_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* a
|
||||
EffectSs_Spawn(play, EFFECT_SS_DEAD_DS, 100, &initParams);
|
||||
}
|
||||
|
||||
void EffectSsDeadDs_SpawnStationary(PlayState* play, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha,
|
||||
s32 life) {
|
||||
void EffectSsDeadDs_SpawnStationary(PlayState* play, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha, s32 life) {
|
||||
EffectSsDeadDs_Spawn(play, pos, &sZeroVec, &sZeroVec, scale, scaleStep, alpha, life);
|
||||
}
|
||||
|
||||
// EffectSsDeadSound Spawn Functions
|
||||
|
||||
void EffectSsDeadSound_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, u16 sfxId,
|
||||
s16 lowerPriority, s16 repeatMode, s32 life) {
|
||||
void EffectSsDeadSound_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, u16 sfxId, s16 lowerPriority,
|
||||
s16 repeatMode, s32 life) {
|
||||
EffectSsDeadSoundInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
@@ -1162,8 +1156,8 @@ void EffectSsDeadSound_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f
|
||||
}
|
||||
}
|
||||
|
||||
void EffectSsDeadSound_SpawnStationary(PlayState* play, Vec3f* pos, u16 sfxId, s16 lowerPriority,
|
||||
s16 repeatMode, s32 life) {
|
||||
void EffectSsDeadSound_SpawnStationary(PlayState* play, Vec3f* pos, u16 sfxId, s16 lowerPriority, s16 repeatMode,
|
||||
s32 life) {
|
||||
EffectSsDeadSound_Spawn(play, pos, &sZeroVec, &sZeroVec, sfxId, lowerPriority, repeatMode, life);
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ u16 ElfMessage_GetSariaText(PlayState* play) {
|
||||
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Actor_FindNearby(play, &player->actor, ACTOR_EN_SA, 4, 800.0f) == NULL) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SARIA_HINT)) {
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SARIA_HINT)) {
|
||||
return 0x161;
|
||||
}
|
||||
msgs = sChildSariaMsgs;
|
||||
|
||||
@@ -54,7 +54,7 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
{ 25, 60, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
//extern CollisionHeader D_06000730; // gHookshotTargetCol ?
|
||||
// extern CollisionHeader D_06000730; // gHookshotTargetCol ?
|
||||
|
||||
static CollisionHeader* sColHeaders[] = {
|
||||
&gLargerCubeCol, // A_OBJ_GRASS_CLUMP, A_OBJ_TREE_STUMP
|
||||
@@ -72,7 +72,8 @@ static Gfx* sDLists[] = {
|
||||
gFlatRotBlockDL,
|
||||
gFlatRotBlockDL,
|
||||
gSmallCubeDL,
|
||||
gHookshotPostDL, /* gHookshotPostDL ? */ // 0x06000210, // OTRTODO!
|
||||
gHookshotPostDL,
|
||||
/* gHookshotPostDL ? */ // 0x06000210, // OTRTODO!
|
||||
gGrassBladesDL,
|
||||
gTreeStumpDL,
|
||||
gSignRectangularDL,
|
||||
@@ -359,8 +360,7 @@ void EnAObj_Draw(Actor* thisx, PlayState* play) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 1, 60, 60, 60, 50);
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDLists[type]);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
+48
-47
@@ -336,7 +336,8 @@ void EnItem00_SetupAction(EnItem00* this, EnItem00ActionFunc actionFunc) {
|
||||
void EnItem00_SetObjectDependency(EnItem00* this, PlayState* play, s16 objectIndex) {
|
||||
// Remove object dependency for Enemy Randomizer and Crowd Control to allow Like-likes to
|
||||
// drop equipment correctly in rooms where Like-likes normally don't spawn.
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Enabled"), 0))) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) ||
|
||||
(CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Enabled"), 0))) {
|
||||
this->actor.objBankIndex = 0;
|
||||
} else {
|
||||
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, objectIndex);
|
||||
@@ -710,8 +711,7 @@ void func_8001E304(EnItem00* this, PlayState* play) {
|
||||
pos.x = this->actor.world.pos.x + (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
pos.y = this->actor.world.pos.y + (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
pos.z = this->actor.world.pos.z + (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
EffectSsKiraKira_SpawnSmall(play, &pos, &sEffectVelocity, &sEffectAccel, &sEffectPrimColor,
|
||||
&sEffectEnvColor);
|
||||
EffectSsKiraKira_SpawnSmall(play, &pos, &sEffectVelocity, &sEffectAccel, &sEffectPrimColor, &sEffectEnvColor);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 0x0003) {
|
||||
@@ -768,15 +768,13 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
|
||||
// Rotate some drops when 3D drops are on, otherwise reset rotation back to 0 for billboard effect
|
||||
if (
|
||||
(this->actor.params == ITEM00_HEART && this->unk_15A >= 0) ||
|
||||
if ((this->actor.params == ITEM00_HEART && this->unk_15A >= 0) ||
|
||||
(this->actor.params >= ITEM00_ARROWS_SMALL && this->actor.params <= ITEM00_SMALL_KEY) ||
|
||||
this->actor.params == ITEM00_BOMBS_A ||
|
||||
this->actor.params == ITEM00_ARROWS_SINGLE ||
|
||||
this->actor.params == ITEM00_BOMBS_A || this->actor.params == ITEM00_ARROWS_SINGLE ||
|
||||
this->actor.params == ITEM00_BOMBS_SPECIAL ||
|
||||
(this->actor.params >= ITEM00_BOMBCHU && this->actor.params <= ITEM00_SOH_GIVE_ITEM_ENTRY_GI)
|
||||
) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) || (this->actor.params >= ITEM00_SOH_DUMMY && this->actor.params <= ITEM00_SOH_GIVE_ITEM_ENTRY_GI)) {
|
||||
(this->actor.params >= ITEM00_BOMBCHU && this->actor.params <= ITEM00_SOH_GIVE_ITEM_ENTRY_GI)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) ||
|
||||
(this->actor.params >= ITEM00_SOH_DUMMY && this->actor.params <= ITEM00_SOH_GIVE_ITEM_ENTRY_GI)) {
|
||||
this->actor.shape.rot.y += 960;
|
||||
} else {
|
||||
this->actor.shape.rot.y = 0;
|
||||
@@ -967,7 +965,8 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((*params <= ITEM00_RUPEE_RED) || (*params == ITEM00_RUPEE_ORANGE)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (getItemId != GI_NONE) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
Flags_SetCollectible(play, this->collectibleFlag);
|
||||
@@ -975,7 +974,8 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
Flags_SetCollectible(play, this->collectibleFlag);
|
||||
@@ -1181,7 +1181,6 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
typedef enum {
|
||||
PARTICLE_BRIGHT_GREEN,
|
||||
PARTICLE_RED,
|
||||
@@ -1357,8 +1356,7 @@ void EnItem00_DrawRupee(EnItem00* this, PlayState* play) {
|
||||
texIndex = this->actor.params - 0x10;
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
Color_RGB8 rupeeColor;
|
||||
u8 shouldColor = 0;
|
||||
@@ -1422,8 +1420,7 @@ void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
|
||||
|
||||
POLY_OPA_DISP = Gfx_SetupDL_66(POLY_OPA_DISP);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetTexturePersp(POLY_OPA_DISP++, G_TP_PERSP);
|
||||
@@ -1455,8 +1452,7 @@ void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sItemDropTex[texIndex]));
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gItemDropDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -1473,14 +1469,12 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
func_8002EBCC(&this->actor, play, 0);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gHeartPieceExteriorDL);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gHeartContainerInteriorDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -1496,8 +1490,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gHeartPieceInteriorDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -1553,8 +1546,8 @@ s16 func_8001F404(s16 dropId) {
|
||||
}
|
||||
|
||||
// #region [Randomizer] [Enchancment]
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("EnableBombchuDrops"), 0) ||
|
||||
(IS_RANDO && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("EnableBombchuDrops"), 0) ||
|
||||
(IS_RANDO && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
|
||||
(dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL) &&
|
||||
(!IS_RANDO || Randomizer_GetSettingValue(RSK_BOMBCHU_BAG) || INV_CONTENT(ITEM_BOMB) != ITEM_NONE)) {
|
||||
dropId = EnItem00_ConvertBombDropToBombchu(dropId);
|
||||
@@ -1589,22 +1582,24 @@ EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) {
|
||||
|
||||
params &= 0x3FFF;
|
||||
|
||||
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { return NULL; }
|
||||
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) {
|
||||
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x,
|
||||
spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED, true);
|
||||
EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
|
||||
DEADSOUND_REPEAT_MODE_OFF, 40);
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
|
||||
spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED, true);
|
||||
EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true, DEADSOUND_REPEAT_MODE_OFF,
|
||||
40);
|
||||
} else {
|
||||
if (!param8000) {
|
||||
params = func_8001F404(params & 0x00FF);
|
||||
}
|
||||
|
||||
if (params != -1) {
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, spawnPos->x,
|
||||
spawnPos->y, spawnPos->z, 0, 0, 0, params | param8000 | param3F00, true);
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, spawnPos->x, spawnPos->y,
|
||||
spawnPos->z, 0, 0, 0, params | param8000 | param3F00, true);
|
||||
if ((spawnedActor != NULL) && !param8000) {
|
||||
spawnedActor->actor.velocity.y = !param4000 ? 8.0f : -2.0f;
|
||||
spawnedActor->actor.speedXZ = 2.0f;
|
||||
@@ -1634,19 +1629,21 @@ EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params) {
|
||||
|
||||
params &= 0x3FFF;
|
||||
|
||||
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { return NULL; }
|
||||
|
||||
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) {
|
||||
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x,
|
||||
spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED, true);
|
||||
EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
|
||||
DEADSOUND_REPEAT_MODE_OFF, 40);
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
|
||||
spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED, true);
|
||||
EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true, DEADSOUND_REPEAT_MODE_OFF,
|
||||
40);
|
||||
} else {
|
||||
params = func_8001F404(params & 0x00FF);
|
||||
if (params != -1) {
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, spawnPos->x,
|
||||
spawnPos->y, spawnPos->z, 0, 0, 0, params | param8000 | param3F00, true);
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, spawnPos->x, spawnPos->y,
|
||||
spawnPos->z, 0, 0, 0, params | param8000 | param3F00, true);
|
||||
if ((spawnedActor != NULL) && !param8000) {
|
||||
spawnedActor->actor.velocity.y = 0.0f;
|
||||
spawnedActor->actor.speedXZ = 0.0f;
|
||||
@@ -1671,7 +1668,9 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
|
||||
param8000 = params & 0x8000;
|
||||
params &= 0x7FFF;
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NoRandomDrops"), 0)) { return; }
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NoRandomDrops"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (fromActor != NULL) {
|
||||
if (fromActor->dropFlag) {
|
||||
@@ -1709,16 +1708,18 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
|
||||
|
||||
if (dropId == ITEM00_FLEXIBLE) {
|
||||
if (gSaveContext.health <= 0x10) { // 1 heart or less
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0,
|
||||
0, 0, FAIRY_HEAL_TIMED, true);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0,
|
||||
FAIRY_HEAL_TIMED, true);
|
||||
EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
|
||||
DEADSOUND_REPEAT_MODE_OFF, 40);
|
||||
return;
|
||||
} else if (gSaveContext.health <= 0x30 && !CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { // 3 hearts or less
|
||||
} else if (gSaveContext.health <= 0x30 &&
|
||||
!CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { // 3 hearts or less
|
||||
params = 0xB * 0x10;
|
||||
dropTableIndex = 0x0;
|
||||
dropId = ITEM00_HEART;
|
||||
} else if (gSaveContext.health <= 0x50 && !CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { // 5 hearts or less
|
||||
} else if (gSaveContext.health <= 0x50 &&
|
||||
!CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { // 5 hearts or less
|
||||
params = 0xA * 0x10;
|
||||
dropTableIndex = 0x0;
|
||||
dropId = ITEM00_HEART;
|
||||
|
||||
@@ -67,10 +67,10 @@ u16 sReactionTextIds[][PLAYER_MASK_MAX] = {
|
||||
u16 Text_GetFaceReaction(PlayState* play, u32 reactionSet) {
|
||||
u8 currentMask = Player_GetMask(play);
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && currentMask == PLAYER_MASK_BUNNY) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA &&
|
||||
currentMask == PLAYER_MASK_BUNNY) {
|
||||
return 0;
|
||||
} else {
|
||||
return sReactionTextIds[reactionSet][currentMask];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -90,7 +90,8 @@ void TransitionCircle_Start(void* thisx) {
|
||||
} else {
|
||||
this->texY = 0x1F4;
|
||||
if (this->appearanceType == TCA_RIPPLE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
guPerspective(&this->projection, &this->normal, 60.0f, (4.0f / 3.0f), 10.0f, 12800.0f, 1.0f);
|
||||
@@ -115,7 +116,8 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) {
|
||||
if (this->direction != 0) {
|
||||
if (this->texY == 0) {
|
||||
if (this->appearanceType == TCA_RIPPLE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
this->texY += this->speed * 3 / updateRate;
|
||||
|
||||
@@ -18,7 +18,7 @@ void TransitionTriforce_Start(void* thisx) {
|
||||
void* TransitionTriforce_Init(void* thisx) {
|
||||
TransitionTriforce* this = (TransitionTriforce*)thisx;
|
||||
|
||||
memset(this,0, sizeof(*this));
|
||||
memset(this, 0, sizeof(*this));
|
||||
guOrtho(&this->projection, -160.0f, 160.0f, -120.0f, 120.0f, -1000.0f, 1000.0f, 1.0f);
|
||||
this->transPos = 1.0f;
|
||||
this->state = 2;
|
||||
|
||||
@@ -59,10 +59,10 @@ s32 SkelCurve_Update(PlayState* play, SkelAnimeCurve* skelCurve) {
|
||||
s32 j;
|
||||
|
||||
transformIndex = SEGMENTED_TO_VIRTUAL(skelCurve->transUpdIdx);
|
||||
|
||||
|
||||
if (ResourceMgr_OTRSigCheck(transformIndex))
|
||||
transformIndex = ResourceMgr_LoadAnimByName(transformIndex);
|
||||
|
||||
|
||||
transformRefIdx = SEGMENTED_TO_VIRTUAL(transformIndex->refIndex);
|
||||
transData = SEGMENTED_TO_VIRTUAL(transformIndex->transformData);
|
||||
transformCopyValues = SEGMENTED_TO_VIRTUAL(transformIndex->copyValues);
|
||||
@@ -109,8 +109,7 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelAnimeCurve* skelCurv
|
||||
|
||||
Matrix_Push();
|
||||
|
||||
if (overrideLimbDraw == NULL ||
|
||||
(overrideLimbDraw != NULL && overrideLimbDraw(play, skelCurve, limbIndex, data))) {
|
||||
if (overrideLimbDraw == NULL || (overrideLimbDraw != NULL && overrideLimbDraw(play, skelCurve, limbIndex, data))) {
|
||||
Vec3f scale;
|
||||
Vec3s rot;
|
||||
Vec3f pos;
|
||||
@@ -179,8 +178,8 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelAnimeCurve* skelCurv
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void SkelCurve_Draw(Actor* actor, PlayState* play, SkelAnimeCurve* skelCurve,
|
||||
OverrideCurveLimbDraw overrideLimbDraw, PostCurveLimbDraw postLimbDraw, s32 lod, void* data) {
|
||||
void SkelCurve_Draw(Actor* actor, PlayState* play, SkelAnimeCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw,
|
||||
PostCurveLimbDraw postLimbDraw, s32 lod, void* data) {
|
||||
if (skelCurve->transforms != NULL) {
|
||||
SkelCurve_DrawLimb(play, 0, skelCurve, overrideLimbDraw, postLimbDraw, lod, data);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input) {
|
||||
|
||||
if (!frameAdvCtx->enabled || CVarGetInteger(CVAR_DEVELOPER_TOOLS("FrameAdvanceTick"), 0) ||
|
||||
(CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_R) ||
|
||||
(CHECK_BTN_ALL(input->cur.button, BTN_R) && (++frameAdvCtx->timer >= 9))))) {
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_R) ||
|
||||
(CHECK_BTN_ALL(input->cur.button, BTN_R) && (++frameAdvCtx->timer >= 9))))) {
|
||||
CVarClear(CVAR_DEVELOPER_TOOLS("FrameAdvanceTick"));
|
||||
frameAdvCtx->timer = 0;
|
||||
return true;
|
||||
|
||||
@@ -50,7 +50,7 @@ void GameOver_Update(PlayState* play) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// restore "temporary B" to the B Button if not a sword item
|
||||
if (gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI &&
|
||||
@@ -77,7 +77,8 @@ void GameOver_Update(PlayState* play) {
|
||||
for (int buttonIndex = 0; buttonIndex < ARRAY_COUNT(gSaveContext.buttonStatus); buttonIndex++) {
|
||||
gSaveContext.buttonStatus[buttonIndex] = BTN_ENABLED;
|
||||
}
|
||||
gSaveContext.forceRisingButtonAlphas = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC = 0;
|
||||
gSaveContext.forceRisingButtonAlphas = gSaveContext.unk_13E8 = gSaveContext.unk_13EA =
|
||||
gSaveContext.unk_13EC = 0;
|
||||
|
||||
Environment_InitGameOverLights(play);
|
||||
gGameOverTimer = 20;
|
||||
|
||||
+33
-29
@@ -5,7 +5,8 @@
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
s32 func_8006CFC0(s32 scene) {
|
||||
s32 validScenes[] = { SCENE_HYRULE_FIELD, SCENE_LAKE_HYLIA, SCENE_GERUDO_VALLEY, SCENE_GERUDOS_FORTRESS, SCENE_LON_LON_RANCH };
|
||||
s32 validScenes[] = { SCENE_HYRULE_FIELD, SCENE_LAKE_HYLIA, SCENE_GERUDO_VALLEY, SCENE_GERUDOS_FORTRESS,
|
||||
SCENE_LON_LON_RANCH };
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(validScenes); i++) {
|
||||
@@ -70,25 +71,27 @@ void func_8006D0EC(PlayState* play, Player* player) {
|
||||
horseActor =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1, true);
|
||||
horseActor->room = -1;
|
||||
} else if ((gSaveContext.entranceIndex == ENTR_LON_LON_RANCH_7) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) {
|
||||
} else if ((gSaveContext.entranceIndex == ENTR_LON_LON_RANCH_7) &&
|
||||
(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) {
|
||||
Actor* horseActor =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1, true);
|
||||
assert(horseActor != NULL);
|
||||
} else if ((play->sceneNum == gSaveContext.horseData.scene) &&
|
||||
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!IS_RANDO ||
|
||||
(IS_RANDO && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
|
||||
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D5, true) &&
|
||||
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_B4, true) &&
|
||||
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_A4, true) &&
|
||||
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE)))) || DREG(1) != 0)) {
|
||||
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) &&
|
||||
(!IS_RANDO || (IS_RANDO && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
|
||||
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_D5, true) &&
|
||||
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_B4, true) &&
|
||||
GameInteractor_Should(VB_HAVE_OCARINA_NOTE_A4, true) &&
|
||||
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE)))) ||
|
||||
DREG(1) != 0)) {
|
||||
// "Set by existence of horse %d %d %d"
|
||||
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED),
|
||||
DREG(1));
|
||||
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene,
|
||||
Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED), DREG(1));
|
||||
|
||||
if (func_8006CFC0(gSaveContext.horseData.scene)) {
|
||||
Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE,
|
||||
gSaveContext.horseData.pos.x, gSaveContext.horseData.pos.y,
|
||||
gSaveContext.horseData.pos.z, 0, gSaveContext.horseData.angle, 0, 1, true);
|
||||
Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, gSaveContext.horseData.pos.x,
|
||||
gSaveContext.horseData.pos.y, gSaveContext.horseData.pos.z, 0,
|
||||
gSaveContext.horseData.angle, 0, 1, true);
|
||||
assert(horseActor != NULL);
|
||||
if (play->sceneNum == SCENE_GERUDOS_FORTRESS) {
|
||||
horseActor->room = -1;
|
||||
@@ -100,9 +103,9 @@ void func_8006D0EC(PlayState* play, Player* player) {
|
||||
osSyncPrintf(VT_RST);
|
||||
func_8006D074(play);
|
||||
}
|
||||
} else if ((play->sceneNum == SCENE_LON_LON_RANCH) && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0)) {
|
||||
Actor* horseActor =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1, true);
|
||||
} else if ((play->sceneNum == SCENE_LON_LON_RANCH) && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) &&
|
||||
(DREG(1) == 0)) {
|
||||
Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1, true);
|
||||
assert(horseActor != NULL);
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0)) {
|
||||
for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
|
||||
@@ -159,8 +162,8 @@ void func_8006D684(PlayState* play, Player* player) {
|
||||
spawnPos = spawnPositions[3];
|
||||
}
|
||||
|
||||
player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, spawnPos.x, spawnPos.y,
|
||||
spawnPos.z, 0, player->actor.world.rot.y, 0, 7, true);
|
||||
player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, spawnPos.x, spawnPos.y, spawnPos.z, 0,
|
||||
player->actor.world.rot.y, 0, 7, true);
|
||||
assert(player->rideActor != NULL);
|
||||
|
||||
Actor_MountHorse(play, player, player->rideActor);
|
||||
@@ -201,9 +204,9 @@ void func_8006D684(PlayState* play, Player* player) {
|
||||
D_8011F9B8[i].pos.z = player->actor.world.pos.z;
|
||||
}
|
||||
|
||||
player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE,
|
||||
D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y, D_8011F9B8[i].pos.z, 0,
|
||||
player->actor.world.rot.y, 0, D_8011F9B8[i].type, true);
|
||||
player->rideActor =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y,
|
||||
D_8011F9B8[i].pos.z, 0, player->actor.world.rot.y, 0, D_8011F9B8[i].type, true);
|
||||
assert(player->rideActor != NULL);
|
||||
|
||||
Actor_MountHorse(play, player, player->rideActor);
|
||||
@@ -216,9 +219,9 @@ void func_8006D684(PlayState* play, Player* player) {
|
||||
temp = 0x8000;
|
||||
}
|
||||
|
||||
player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE,
|
||||
D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y, D_8011F9B8[i].pos.z, 0,
|
||||
D_8011F9B8[i].angle, 0, D_8011F9B8[i].type | temp, true);
|
||||
player->rideActor =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y,
|
||||
D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type | temp, true);
|
||||
assert(player->rideActor != NULL);
|
||||
|
||||
player->actor.world.pos.x = D_8011F9B8[i].pos.x;
|
||||
@@ -236,9 +239,8 @@ void func_8006D684(PlayState* play, Player* player) {
|
||||
|
||||
Play_CameraSetAtEye(play, play->activeCamera, &player->actor.world.pos, &sp54);
|
||||
} else {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x,
|
||||
D_8011F9B8[i].pos.y, D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0,
|
||||
D_8011F9B8[i].type, true);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y,
|
||||
D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -258,8 +260,10 @@ void func_8006DC68(PlayState* play, Player* player) {
|
||||
|
||||
if (func_8006CFC0(play->sceneNum)) {
|
||||
if ((gSaveContext.sceneSetupIndex > 3) ||
|
||||
((gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_11 || gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_12 ||
|
||||
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_13 || gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_15) &&
|
||||
((gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_11 ||
|
||||
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_12 ||
|
||||
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_13 ||
|
||||
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_15) &&
|
||||
(gSaveContext.respawnFlag == 0)) ||
|
||||
((play->sceneNum == SCENE_LON_LON_RANCH) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0))) {
|
||||
|
||||
@@ -205,7 +205,8 @@ u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) {
|
||||
if (equipment == EQUIP_TYPE_TUNIC) {
|
||||
gSaveContext.equips.equipment |= EQUIP_VALUE_TUNIC_KOKIRI << (EQUIP_TYPE_TUNIC * 4);
|
||||
// non-vanilla: remove goron and zora tunics from item buttons if assignable tunics is on
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 0) && equipValue != EQUIP_VALUE_TUNIC_KOKIRI) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 0) &&
|
||||
equipValue != EQUIP_VALUE_TUNIC_KOKIRI) {
|
||||
ItemID item = (equipValue == EQUIP_VALUE_TUNIC_GORON ? ITEM_TUNIC_GORON : ITEM_TUNIC_ZORA);
|
||||
for (int i = 1; i < ARRAY_COUNT(gSaveContext.equips.buttonItems); i++) {
|
||||
if (gSaveContext.equips.buttonItems[i] == item) {
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
/**
|
||||
* Configures and schedules a JPEG decoder task and waits for it to finish.
|
||||
*/
|
||||
void Jpeg_ScheduleDecoderTask(JpegContext* ctx)
|
||||
{
|
||||
void Jpeg_ScheduleDecoderTask(JpegContext* ctx) {
|
||||
#if 0
|
||||
static OSTask_t sJpegTask = {
|
||||
M_NJPEGTASK, // type
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// }
|
||||
|
||||
#define KALEIDO_OVERLAY(name) \
|
||||
{ 0 }
|
||||
{ 0 }
|
||||
|
||||
KaleidoMgrOverlay gKaleidoMgrOverlayTable[] = {
|
||||
KALEIDO_OVERLAY(kaleido_scope),
|
||||
@@ -22,16 +22,16 @@ KaleidoMgrOverlay* gKaleidoMgrCurOvl = NULL;
|
||||
u8 gBossMarkState = 0;
|
||||
|
||||
void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl) {
|
||||
//LOG_CHECK_NULL_POINTER("KaleidoArea_allocp", sKaleidoAreaPtr);
|
||||
// LOG_CHECK_NULL_POINTER("KaleidoArea_allocp", sKaleidoAreaPtr);
|
||||
|
||||
ovl->loadedRamAddr = sKaleidoAreaPtr;
|
||||
Overlay_Load(ovl->vromStart, ovl->vromEnd, ovl->vramStart, ovl->vramEnd, ovl->loadedRamAddr);
|
||||
|
||||
//osSyncPrintf(VT_FGCOL(GREEN));
|
||||
//osSyncPrintf("OVL(k):Seg:%08x-%08x Ram:%08x-%08x Off:%08x %s\n", ovl->vramStart, ovl->vramEnd, ovl->loadedRamAddr,
|
||||
//(uintptr_t)ovl->loadedRamAddr + (uintptr_t)ovl->vramEnd - (uintptr_t)ovl->vramStart,
|
||||
//(uintptr_t)ovl->vramStart - (uintptr_t)ovl->loadedRamAddr, ovl->name);
|
||||
//osSyncPrintf(VT_RST);
|
||||
// osSyncPrintf(VT_FGCOL(GREEN));
|
||||
// osSyncPrintf("OVL(k):Seg:%08x-%08x Ram:%08x-%08x Off:%08x %s\n", ovl->vramStart, ovl->vramEnd,
|
||||
// ovl->loadedRamAddr, (uintptr_t)ovl->loadedRamAddr + (uintptr_t)ovl->vramEnd - (uintptr_t)ovl->vramStart,
|
||||
//(uintptr_t)ovl->vramStart - (uintptr_t)ovl->loadedRamAddr, ovl->name);
|
||||
// osSyncPrintf(VT_RST);
|
||||
|
||||
ovl->offset = (uintptr_t)ovl->loadedRamAddr - (uintptr_t)ovl->vramStart;
|
||||
gKaleidoMgrCurOvl = ovl;
|
||||
|
||||
@@ -59,8 +59,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
|
||||
|
||||
GameInteractor_ExecuteOnKaleidoUpdate();
|
||||
|
||||
if (!gSaveContext.ship.stats.gameComplete &&
|
||||
(!IS_BOSS_RUSH || !gSaveContext.ship.quest.data.bossRush.isPaused)) {
|
||||
if (!gSaveContext.ship.stats.gameComplete && (!IS_BOSS_RUSH || !gSaveContext.ship.quest.data.bossRush.isPaused)) {
|
||||
gSaveContext.ship.stats.pauseTimer++;
|
||||
}
|
||||
|
||||
@@ -89,8 +88,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
|
||||
pauseCtx->state++;
|
||||
}
|
||||
} else if (pauseCtx->state != 0) {
|
||||
if (gKaleidoMgrCurOvl != kaleidoScopeOvl)
|
||||
{
|
||||
if (gKaleidoMgrCurOvl != kaleidoScopeOvl) {
|
||||
if (gKaleidoMgrCurOvl != NULL) {
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
// "Kaleido area Player Forced Elimination"
|
||||
@@ -108,8 +106,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
|
||||
KaleidoManager_LoadOvl(kaleidoScopeOvl);
|
||||
}
|
||||
|
||||
if (gKaleidoMgrCurOvl == kaleidoScopeOvl)
|
||||
{
|
||||
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {
|
||||
sKaleidoScopeUpdateFunc(play);
|
||||
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
|
||||
@@ -132,8 +129,7 @@ void KaleidoScopeCall_Draw(PlayState* play) {
|
||||
if (R_PAUSE_MENU_MODE >= 3) {
|
||||
if (((play->pauseCtx.state >= 4) && (play->pauseCtx.state <= 7)) ||
|
||||
((play->pauseCtx.state >= 11) && (play->pauseCtx.state <= 18))) {
|
||||
if (gKaleidoMgrCurOvl == kaleidoScopeOvl)
|
||||
{
|
||||
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {
|
||||
sKaleidoScopeDrawFunc(play);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,10 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
Input* input = &play->state.input[0];
|
||||
|
||||
if (pauseCtx->state == 0 && pauseCtx->debugState == 0 && play->gameOverCtx.state == GAMEOVER_INACTIVE &&
|
||||
play->transitionTrigger == TRANS_TRIGGER_OFF && play->transitionMode == TRANS_MODE_OFF && gSaveContext.cutsceneIndex < 0xFFF0 &&
|
||||
gSaveContext.nextCutsceneIndex < 0xFFF0 && !Play_InCsMode(play) &&
|
||||
play->shootingGalleryStatus <= 1 && gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY && gSaveContext.magicState != MAGIC_STATE_FILL &&
|
||||
play->transitionTrigger == TRANS_TRIGGER_OFF && play->transitionMode == TRANS_MODE_OFF &&
|
||||
gSaveContext.cutsceneIndex < 0xFFF0 && gSaveContext.nextCutsceneIndex < 0xFFF0 && !Play_InCsMode(play) &&
|
||||
play->shootingGalleryStatus <= 1 && gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY &&
|
||||
gSaveContext.magicState != MAGIC_STATE_FILL &&
|
||||
(play->sceneNum != SCENE_BOMBCHU_BOWLING_ALLEY || !Flags_GetSwitch(play, 0x38))) {
|
||||
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_L) && CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||
@@ -31,7 +32,6 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
else
|
||||
CVarSetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0);
|
||||
|
||||
|
||||
WREG(16) = -175;
|
||||
WREG(17) = 155;
|
||||
|
||||
|
||||
+10
-11
@@ -11,8 +11,7 @@
|
||||
extern MessageTableEntry* sJpnMessageEntryTablePtr;
|
||||
|
||||
// #region SOH [Port] Asset tables we can pull from instead of from ROM
|
||||
const char* fontTbl[140] =
|
||||
{
|
||||
const char* fontTbl[140] = {
|
||||
gMsgChar20SpaceTex,
|
||||
gMsgChar21ExclamationMarkTex,
|
||||
gMsgChar22QuotationMarkTex,
|
||||
@@ -4132,8 +4131,7 @@ static const char* kanjiFontTbl[] = {
|
||||
gMsgKanji98FCEmptyTex,
|
||||
};
|
||||
|
||||
const char* msgStaticTbl[] =
|
||||
{
|
||||
const char* msgStaticTbl[] = {
|
||||
gDefaultMessageBackgroundTex,
|
||||
gSignMessageBackgroundTex,
|
||||
gNoteStaffMessageBackgroundTex,
|
||||
@@ -4149,7 +4147,8 @@ const char* msgStaticTbl[] =
|
||||
* at `codePointIndex`. The value of `character` is the SHIFT-JIS encoding of the character.
|
||||
*/
|
||||
void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex) {
|
||||
// DmaMgr_RequestSync(&font->charTexBuf[codePointIndex], _kanjiSegmentStart + Kanji_OffsetFromShiftJIS(character), 0x80);
|
||||
// DmaMgr_RequestSync(&font->charTexBuf[codePointIndex], _kanjiSegmentStart + Kanji_OffsetFromShiftJIS(character),
|
||||
// 0x80);
|
||||
|
||||
// #region SOH [NTSC]
|
||||
// This function is called even for non-nstc, but this function would be empty for non-ntsc.
|
||||
@@ -4170,9 +4169,9 @@ void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex) {
|
||||
* at `codePointIndex`. The value of `character` is the ASCII codepoint subtract ' '/0x20.
|
||||
*/
|
||||
void Font_LoadChar(Font* font, u8 character, u16 codePointIndex) {
|
||||
//DmaMgr_SendRequest1(&font->charTexBuf[codePointIndex],
|
||||
//&_nes_font_staticSegmentRomStart[character * FONT_CHAR_TEX_SIZE], FONT_CHAR_TEX_SIZE,
|
||||
//__FILE__, __LINE__);
|
||||
// DmaMgr_SendRequest1(&font->charTexBuf[codePointIndex],
|
||||
//&_nes_font_staticSegmentRomStart[character * FONT_CHAR_TEX_SIZE], FONT_CHAR_TEX_SIZE,
|
||||
//__FILE__, __LINE__);
|
||||
|
||||
if (character < 0x8B)
|
||||
memcpy(&font->charTexBuf[codePointIndex], fontTbl[character], strlen(fontTbl[character]) + 1);
|
||||
@@ -4220,7 +4219,7 @@ void Font_LoadOrderedFont(Font* font) {
|
||||
|
||||
offset = (font->msgBuf[codePointIndex] - '\x20') * FONT_CHAR_TEX_SIZE;
|
||||
memcpy(fontBuf, fontTbl[offset / FONT_CHAR_TEX_SIZE], strlen(fontTbl[offset / FONT_CHAR_TEX_SIZE]) + 1);
|
||||
//DmaMgr_SendRequest1(fontBuf, fontStatic + offset, FONT_CHAR_TEX_SIZE, __FILE__, __LINE__);
|
||||
// DmaMgr_SendRequest1(fontBuf, fontStatic + offset, FONT_CHAR_TEX_SIZE, __FILE__, __LINE__);
|
||||
fontBufIndex += FONT_CHAR_TEX_SIZE / 8;
|
||||
}
|
||||
}
|
||||
@@ -4248,7 +4247,6 @@ void Font_LoadOrderedFontNTSC(Font* font) {
|
||||
len = (u32)size / 2;
|
||||
memcpy(font->msgBuf, msgEntry->segment, size);
|
||||
|
||||
|
||||
fontBufIndex = 0;
|
||||
for (codePointIndex = 0; font->msgBufWide[codePointIndex] != 0x8170; codePointIndex++) {
|
||||
if (len < codePointIndex) {
|
||||
@@ -4260,7 +4258,8 @@ void Font_LoadOrderedFontNTSC(Font* font) {
|
||||
offset = Kanji_OffsetFromShiftJIS(font->msgBufWide[codePointIndex]);
|
||||
offset /= FONT_CHAR_TEX_SIZE;
|
||||
memcpy(&font->fontBuf[fontBufIndex * 8], kanjiFontTbl[offset], strlen(kanjiFontTbl[offset]) + 1);
|
||||
// DmaMgr_RequestSync(&font->fontBuf[fontBufIndex * 8], (uintptr_t)_kanjiSegmentStart + offset, FONT_CHAR_TEX_SIZE);
|
||||
// DmaMgr_RequestSync(&font->fontBuf[fontBufIndex * 8], (uintptr_t)_kanjiSegmentStart + offset,
|
||||
// FONT_CHAR_TEX_SIZE);
|
||||
fontBufIndex += FONT_CHAR_TEX_SIZE / 8;
|
||||
}
|
||||
}
|
||||
|
||||
+85
-101
@@ -116,7 +116,7 @@ struct_8011FC1C D_8011FC1C[][9] = {
|
||||
{ 0x3556, 0x4000, 0, 0, 0 },
|
||||
{ 0x4000, 0x5556, 1, 0, 1 },
|
||||
{ 0x5556, 0xAAAB, 0, 1, 1 },
|
||||
// { 0x5556, 0xAAAB, 0, 2, 2 },
|
||||
// { 0x5556, 0xAAAB, 0, 2, 2 },
|
||||
{ 0xAAAB, 0xB556, 1, 1, 2 },
|
||||
{ 0xB556, 0xC001, 0, 2, 2 },
|
||||
{ 0xC001, 0xCAAC, 1, 2, 3 },
|
||||
@@ -218,9 +218,9 @@ LightInfo sSGameOverLightInfo;
|
||||
u8 sGameOverLightsIntensity;
|
||||
u16 D_8015FDB0;
|
||||
|
||||
void LoadSkyboxPalette(SkyboxContext* skyboxCtx, int paletteIndex, char* palTex, int width,
|
||||
int height);
|
||||
void LoadSkyboxTex(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height, int offsetW, int offsetH);
|
||||
void LoadSkyboxPalette(SkyboxContext* skyboxCtx, int paletteIndex, char* palTex, int width, int height);
|
||||
void LoadSkyboxTex(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height,
|
||||
int offsetW, int offsetH);
|
||||
void Skybox_Update(SkyboxContext* skyboxCtx);
|
||||
|
||||
s32 func_8006F0A0(s32 a0) {
|
||||
@@ -696,12 +696,12 @@ void Environment_UpdateSkybox(PlayState* play, u8 skyboxId, EnvironmentContext*
|
||||
|
||||
envCtx->skybox1Index = newSkybox1Index;
|
||||
|
||||
//size = gSkyboxFiles[newSkybox1Index].file.vromEnd - gSkyboxFiles[newSkybox1Index].file.vromStart;
|
||||
// size = gSkyboxFiles[newSkybox1Index].file.vromEnd - gSkyboxFiles[newSkybox1Index].file.vromStart;
|
||||
|
||||
//osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
|
||||
//DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->staticSegments[0],
|
||||
//gSkyboxFiles[newSkybox1Index].file.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
//__FILE__, __LINE__);
|
||||
// osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
|
||||
// DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->staticSegments[0],
|
||||
// gSkyboxFiles[newSkybox1Index].file.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
//__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
if ((envCtx->skybox2Index != newSkybox2Index) && (envCtx->skyboxDmaState == SKYBOX_DMA_INACTIVE)) {
|
||||
@@ -716,11 +716,11 @@ void Environment_UpdateSkybox(PlayState* play, u8 skyboxId, EnvironmentContext*
|
||||
|
||||
envCtx->skybox2Index = newSkybox2Index;
|
||||
|
||||
//size = gSkyboxFiles[newSkybox2Index].file.vromEnd - gSkyboxFiles[newSkybox2Index].file.vromStart;
|
||||
//osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
|
||||
//DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->staticSegments[1],
|
||||
//gSkyboxFiles[newSkybox2Index].file.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
//__FILE__, __LINE__);
|
||||
// size = gSkyboxFiles[newSkybox2Index].file.vromEnd - gSkyboxFiles[newSkybox2Index].file.vromStart;
|
||||
// osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
|
||||
// DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->staticSegments[1],
|
||||
// gSkyboxFiles[newSkybox2Index].file.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
//__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
if (envCtx->skyboxDmaState == SKYBOX_DMA_FILE1_DONE) {
|
||||
@@ -731,20 +731,20 @@ void Environment_UpdateSkybox(PlayState* play, u8 skyboxId, EnvironmentContext*
|
||||
SkyboxTableEntry entryA = sSkyboxTable[newSkybox1Index];
|
||||
LoadSkyboxPalette(skyboxCtx, 0, entryA.palettes[0], 16, 8);
|
||||
|
||||
//size = gSkyboxFiles[newSkybox1Index].palette.vromEnd - gSkyboxFiles[newSkybox1Index].palette.vromStart;
|
||||
//osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
|
||||
//DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->palettes,
|
||||
//gSkyboxFiles[newSkybox1Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
//__FILE__, __LINE__);
|
||||
// size = gSkyboxFiles[newSkybox1Index].palette.vromEnd -
|
||||
// gSkyboxFiles[newSkybox1Index].palette.vromStart; osCreateMesgQueue(&envCtx->loadQueue,
|
||||
// &envCtx->loadMsg, 1); DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->palettes,
|
||||
// gSkyboxFiles[newSkybox1Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
//__FILE__, __LINE__);
|
||||
} else {
|
||||
SkyboxTableEntry entryA = sSkyboxTable[newSkybox1Index];
|
||||
LoadSkyboxPalette(skyboxCtx, 1, entryA.palettes[0], 16, 8);
|
||||
|
||||
//size = gSkyboxFiles[newSkybox1Index].palette.vromEnd - gSkyboxFiles[newSkybox1Index].palette.vromStart;
|
||||
//osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
|
||||
//DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->palettes + size,
|
||||
//gSkyboxFiles[newSkybox1Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
//__FILE__, __LINE__);
|
||||
// size = gSkyboxFiles[newSkybox1Index].palette.vromEnd -
|
||||
// gSkyboxFiles[newSkybox1Index].palette.vromStart; osCreateMesgQueue(&envCtx->loadQueue,
|
||||
// &envCtx->loadMsg, 1); DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->palettes + size,
|
||||
// gSkyboxFiles[newSkybox1Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
//__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
Skybox_Update(skyboxCtx);
|
||||
@@ -753,24 +753,22 @@ void Environment_UpdateSkybox(PlayState* play, u8 skyboxId, EnvironmentContext*
|
||||
if (envCtx->skyboxDmaState == SKYBOX_DMA_FILE2_DONE) {
|
||||
envCtx->skyboxDmaState = SKYBOX_DMA_PAL2_START;
|
||||
|
||||
if ((newSkybox2Index & 1) ^ ((newSkybox2Index & 4) >> 2))
|
||||
{
|
||||
if ((newSkybox2Index & 1) ^ ((newSkybox2Index & 4) >> 2)) {
|
||||
SkyboxTableEntry entryA = sSkyboxTable[newSkybox2Index];
|
||||
LoadSkyboxPalette(skyboxCtx, 0, entryA.palettes[0], 16, 8);
|
||||
|
||||
/*size = gSkyboxFiles[newSkybox2Index].palette.vromEnd - gSkyboxFiles[newSkybox2Index].palette.vromStart;
|
||||
osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
|
||||
DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->palettes,
|
||||
/*size = gSkyboxFiles[newSkybox2Index].palette.vromEnd -
|
||||
gSkyboxFiles[newSkybox2Index].palette.vromStart; osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg,
|
||||
1); DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->palettes,
|
||||
gSkyboxFiles[newSkybox2Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
__FILE__, __LINE__);*/
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
SkyboxTableEntry entryA = sSkyboxTable[newSkybox2Index];
|
||||
LoadSkyboxPalette(skyboxCtx, 1, entryA.palettes[0], 16, 8);
|
||||
|
||||
/*size = gSkyboxFiles[newSkybox2Index].palette.vromEnd - gSkyboxFiles[newSkybox2Index].palette.vromStart;
|
||||
osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
|
||||
DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->palettes + size,
|
||||
/*size = gSkyboxFiles[newSkybox2Index].palette.vromEnd -
|
||||
gSkyboxFiles[newSkybox2Index].palette.vromStart; osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg,
|
||||
1); DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->palettes + size,
|
||||
gSkyboxFiles[newSkybox2Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL,
|
||||
__FILE__, __LINE__);*/
|
||||
}
|
||||
@@ -779,15 +777,11 @@ void Environment_UpdateSkybox(PlayState* play, u8 skyboxId, EnvironmentContext*
|
||||
}
|
||||
|
||||
if ((envCtx->skyboxDmaState == SKYBOX_DMA_FILE1_START) || (envCtx->skyboxDmaState == SKYBOX_DMA_FILE2_START)) {
|
||||
//if (osRecvMesg(&envCtx->loadQueue, 0, OS_MESG_NOBLOCK) == 0)
|
||||
{
|
||||
envCtx->skyboxDmaState++;
|
||||
}
|
||||
// if (osRecvMesg(&envCtx->loadQueue, 0, OS_MESG_NOBLOCK) == 0)
|
||||
{ envCtx->skyboxDmaState++; }
|
||||
} else if (envCtx->skyboxDmaState >= SKYBOX_DMA_FILE1_DONE) {
|
||||
//if (osRecvMesg(&envCtx->loadQueue, 0, OS_MESG_NOBLOCK) == 0)
|
||||
{
|
||||
envCtx->skyboxDmaState = SKYBOX_DMA_INACTIVE;
|
||||
}
|
||||
// if (osRecvMesg(&envCtx->loadQueue, 0, OS_MESG_NOBLOCK) == 0)
|
||||
{ envCtx->skyboxDmaState = SKYBOX_DMA_INACTIVE; }
|
||||
}
|
||||
|
||||
envCtx->skyboxBlend = skyboxBlend;
|
||||
@@ -886,9 +880,8 @@ void Environment_PrintDebugInfo(PlayState* play, Gfx** gfx) {
|
||||
void func_80075B44(PlayState* play);
|
||||
void func_800766C4(PlayState* play);
|
||||
|
||||
void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx,
|
||||
PauseContext* pauseCtx, MessageContext* msgCtx, GameOverContext* gameOverCtx,
|
||||
GraphicsContext* gfxCtx) {
|
||||
void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx, PauseContext* pauseCtx,
|
||||
MessageContext* msgCtx, GameOverContext* gameOverCtx, GraphicsContext* gfxCtx) {
|
||||
f32 sp8C;
|
||||
f32 sp88 = 0.0f;
|
||||
u16 i;
|
||||
@@ -897,7 +890,8 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
||||
EnvLightSettings* lightSettingsList = play->envCtx.lightSettingsList;
|
||||
s32 adjustment;
|
||||
|
||||
if ((((void)0, gSaveContext.gameMode) != GAMEMODE_NORMAL) && (((void)0, gSaveContext.gameMode) != GAMEMODE_END_CREDITS)) {
|
||||
if ((((void)0, gSaveContext.gameMode) != GAMEMODE_NORMAL) &&
|
||||
(((void)0, gSaveContext.gameMode) != GAMEMODE_END_CREDITS)) {
|
||||
func_800AA16C(play);
|
||||
}
|
||||
|
||||
@@ -927,7 +921,8 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
||||
}
|
||||
|
||||
if ((pauseCtx->state == 0) && (gameOverCtx->state == GAMEOVER_INACTIVE)) {
|
||||
if (((msgCtx->msgLength == 0) && (msgCtx->msgMode == 0)) || (((void)0, gSaveContext.gameMode) == GAMEMODE_END_CREDITS)) {
|
||||
if (((msgCtx->msgLength == 0) && (msgCtx->msgMode == 0)) ||
|
||||
(((void)0, gSaveContext.gameMode) == GAMEMODE_END_CREDITS)) {
|
||||
if ((envCtx->unk_1A == 0) && !FrameAdvance_IsEnabled(play) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF || ((void)0, gSaveContext.gameMode) != GAMEMODE_NORMAL)) {
|
||||
|
||||
@@ -1326,9 +1321,9 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
||||
play->envCtx.sunPos.z = +(Math_CosS(((void)0, gSaveContext.dayTime) - 0x8000) * 20.0f) * 25.0f;
|
||||
}
|
||||
|
||||
if (gSaveContext.entranceIndex != ENTR_HYRULE_FIELD_PAST_BRIDGE_SPAWN || ((void)0, gSaveContext.sceneSetupIndex) != 5) {
|
||||
Matrix_Translate(play->view.eye.x + play->envCtx.sunPos.x,
|
||||
play->view.eye.y + play->envCtx.sunPos.y,
|
||||
if (gSaveContext.entranceIndex != ENTR_HYRULE_FIELD_PAST_BRIDGE_SPAWN ||
|
||||
((void)0, gSaveContext.sceneSetupIndex) != 5) {
|
||||
Matrix_Translate(play->view.eye.x + play->envCtx.sunPos.x, play->view.eye.y + play->envCtx.sunPos.y,
|
||||
play->view.eye.z + play->envCtx.sunPos.z, MTXMODE_NEW);
|
||||
|
||||
y = play->envCtx.sunPos.y / 25.0f;
|
||||
@@ -1363,25 +1358,22 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
||||
|
||||
static Vtx vertices[] = {
|
||||
VTX(-31, -31, 0, 0, 0, 255, 255, 255, 255),
|
||||
VTX(32, -31, 0, 2016, 0, 255, 255, 255, 255),
|
||||
VTX(-31, 32, 0, 0, 2016, 255, 255, 255, 255),
|
||||
VTX(32, 32, 0, 2016, 2016, 255, 255, 255, 255),
|
||||
VTX(32, -31, 0, 2016, 0, 255, 255, 255, 255),
|
||||
VTX(-31, 32, 0, 0, 2016, 255, 255, 255, 255),
|
||||
VTX(32, 32, 0, 2016, 2016, 255, 255, 255, 255),
|
||||
};
|
||||
|
||||
// Replacement for gSunDL
|
||||
gSPMatrix(POLY_OPA_DISP++, SEG_ADDR(1, 0), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPLoadTextureBlock_4b(POLY_OPA_DISP++, gSun1Tex, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_CLAMP,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP,
|
||||
6, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gDPLoadMultiBlock_4b(POLY_OPA_DISP++, gSunEvening1Tex, 0x0100, 1, G_IM_FMT_I, 64, 64, 0,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPVertex(POLY_OPA_DISP++, vertices, 4, 0);
|
||||
gSP2Triangles(POLY_OPA_DISP++, 0, 1, 2, 0, 2, 1, 3, 0);
|
||||
|
||||
Matrix_Translate(play->view.eye.x - play->envCtx.sunPos.x,
|
||||
play->view.eye.y - play->envCtx.sunPos.y,
|
||||
Matrix_Translate(play->view.eye.x - play->envCtx.sunPos.x, play->view.eye.y - play->envCtx.sunPos.y,
|
||||
play->view.eye.z - play->envCtx.sunPos.z, MTXMODE_NEW);
|
||||
|
||||
color = -y / 120.0f;
|
||||
@@ -1415,19 +1407,18 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void Environment_DrawSunLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view,
|
||||
GraphicsContext* gfxCtx, Vec3f pos, s32 unused) {
|
||||
void Environment_DrawSunLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view, GraphicsContext* gfxCtx,
|
||||
Vec3f pos, s32 unused) {
|
||||
if ((play->envCtx.unk_EE[1] == 0) && (play->envCtx.unk_17 == 0)) {
|
||||
Environment_DrawLensFlare(play, &play->envCtx, &play->view, play->state.gfxCtx, pos, 2000,
|
||||
370, Math_CosS(((void)0, gSaveContext.dayTime) - 0x8000) * 120.0f, 400, 1);
|
||||
Environment_DrawLensFlare(play, &play->envCtx, &play->view, play->state.gfxCtx, pos, 2000, 370,
|
||||
Math_CosS(((void)0, gSaveContext.dayTime) - 0x8000) * 120.0f, 400, 1);
|
||||
}
|
||||
}
|
||||
|
||||
f32 sLensFlareScales[] = { 23.0f, 12.0f, 7.0f, 5.0f, 3.0f, 10.0f, 6.0f, 2.0f, 3.0f, 1.0f };
|
||||
|
||||
void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view,
|
||||
GraphicsContext* gfxCtx, Vec3f pos, s32 unused, s16 scale, f32 colorIntensity,
|
||||
s16 screenFillAlpha, u8 arg9) {
|
||||
void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view, GraphicsContext* gfxCtx,
|
||||
Vec3f pos, s32 unused, s16 scale, f32 colorIntensity, s16 screenFillAlpha, u8 arg9) {
|
||||
s16 i;
|
||||
f32 tempX;
|
||||
f32 tempY;
|
||||
@@ -1562,7 +1553,6 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
|
||||
|
||||
alpha *= 1.0f - fogInfluence;
|
||||
|
||||
|
||||
if (!(isOffScreen ^ 0)) {
|
||||
Math_SmoothStepToF(&envCtx->unk_88, unk88Target, 0.5f, 0.05f, 0.001f);
|
||||
} else {
|
||||
@@ -1570,10 +1560,9 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
|
||||
}
|
||||
|
||||
POLY_XLU_DISP = func_800947AC(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, lensFlareColors[i].r, lensFlareColors[i].g, lensFlareColors[i].b,
|
||||
alpha * envCtx->unk_88);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, lensFlareColors[i].r, lensFlareColors[i].g, lensFlareColors[i].b,
|
||||
alpha * envCtx->unk_88);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetCombineLERP(POLY_XLU_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0,
|
||||
0, PRIMITIVE, 0);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
@@ -1709,8 +1698,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
|
||||
Matrix_RotateY(-rotY, MTXMODE_APPLY);
|
||||
Matrix_RotateX(M_PI / 2 - rotX, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.4f, 1.2f, 0.4f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gRaindropDL);
|
||||
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
@@ -1722,7 +1710,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
|
||||
|
||||
for (i = 0; i < play->envCtx.unk_EE[1]; i++) {
|
||||
FrameInterpolation_RecordOpenChild("Droplet Ring", i);
|
||||
|
||||
|
||||
if (!firstDone) {
|
||||
Gfx_SetupDL_25Xlu(gfxCtx);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0);
|
||||
@@ -1740,8 +1728,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffShockwaveDL);
|
||||
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
@@ -1753,8 +1740,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
|
||||
}
|
||||
|
||||
void func_80074CE8(PlayState* play, u32 arg1) {
|
||||
if ((play->envCtx.unk_BD != arg1) && (play->envCtx.unk_D8 >= 1.0f) &&
|
||||
(play->envCtx.unk_BF == 0xFF)) {
|
||||
if ((play->envCtx.unk_BD != arg1) && (play->envCtx.unk_D8 >= 1.0f) && (play->envCtx.unk_BF == 0xFF)) {
|
||||
if (arg1 > 30) {
|
||||
arg1 = 0;
|
||||
}
|
||||
@@ -1778,8 +1764,7 @@ void func_80074CE8(PlayState* play, u32 arg1) {
|
||||
* An example usage of a filter is to dim the skybox in cloudy conditions.
|
||||
*/
|
||||
void Environment_DrawSkyboxFilters(PlayState* play) {
|
||||
if (((play->skyboxId != SKYBOX_NONE) && (play->lightCtx.fogNear < 980)) ||
|
||||
(play->skyboxId == SKYBOX_UNSET_1D)) {
|
||||
if (((play->skyboxId != SKYBOX_NONE) && (play->lightCtx.fogNear < 980)) || (play->skyboxId == SKYBOX_UNSET_1D)) {
|
||||
f32 alpha;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
@@ -1807,9 +1792,8 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_57Opa(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, play->envCtx.skyboxFilterColor[0],
|
||||
play->envCtx.skyboxFilterColor[1], play->envCtx.skyboxFilterColor[2],
|
||||
play->envCtx.skyboxFilterColor[3]);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, play->envCtx.skyboxFilterColor[0], play->envCtx.skyboxFilterColor[1],
|
||||
play->envCtx.skyboxFilterColor[2], play->envCtx.skyboxFilterColor[3]);
|
||||
gDPFillRectangle(POLY_OPA_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -1990,14 +1974,13 @@ void Environment_DrawLightning(PlayState* play, s32 unused) {
|
||||
Matrix_Scale(22.0f, 100.0f, 22.0f, MTXMODE_APPLY);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 128);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 255, 128);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(lightningTextures[sLightningBolts[i].textureIndex]));
|
||||
Gfx_SetupDL_61Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, SEG_ADDR(1, 0), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffLightningDL);
|
||||
}
|
||||
|
||||
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
|
||||
@@ -2008,7 +1991,8 @@ void Environment_PlaySceneSequence(PlayState* play) {
|
||||
play->envCtx.unk_E0 = 0xFF;
|
||||
|
||||
// both lost woods exits on the bridge from kokiri to hyrule field
|
||||
if (((void)0, gSaveContext.entranceIndex) == ENTR_LOST_WOODS_BRIDGE_WEST_EXIT || ((void)0, gSaveContext.entranceIndex) == ENTR_LOST_WOODS_BRIDGE_EAST_EXIT) {
|
||||
if (((void)0, gSaveContext.entranceIndex) == ENTR_LOST_WOODS_BRIDGE_WEST_EXIT ||
|
||||
((void)0, gSaveContext.entranceIndex) == ENTR_LOST_WOODS_BRIDGE_EAST_EXIT) {
|
||||
Audio_PlayNatureAmbienceSequence(NATURE_ID_KOKIRI_REGION);
|
||||
} else if (((void)0, gSaveContext.forcedSeqId) != NA_BGM_GENERAL_SFX) {
|
||||
if (!Environment_IsForcedSequenceDisabled()) {
|
||||
@@ -2110,8 +2094,7 @@ void func_80075B44(PlayState* play) {
|
||||
gSaveContext.bgsDayCount++;
|
||||
gSaveContext.dogIsLost = true;
|
||||
Sfx_PlaySfxCentered(NA_SE_EV_CHICKEN_CRY_M);
|
||||
if ((Inventory_ReplaceItem(play, ITEM_WEIRD_EGG, ITEM_CHICKEN) ||
|
||||
Inventory_HatchPocketCucco(play)) &&
|
||||
if ((Inventory_ReplaceItem(play, ITEM_WEIRD_EGG, ITEM_CHICKEN) || Inventory_HatchPocketCucco(play)) &&
|
||||
play->csCtx.state == 0 && !Player_InCsMode(play)) {
|
||||
GameInteractor_ExecuteOnCuccoOrChickenHatch();
|
||||
Message_StartTextbox(play, 0x3066, NULL);
|
||||
@@ -2122,12 +2105,11 @@ void func_80075B44(PlayState* play) {
|
||||
case 7:
|
||||
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_CRITTER_1 << 4 | NATURE_CHANNEL_CRITTER_3,
|
||||
CHANNEL_IO_PORT_1, 0);
|
||||
if (play->envCtx.unk_EE[0] == 0 && play->envCtx.unk_F2[0] == 0)
|
||||
{
|
||||
// OTRTODO: This is where corrupt audio happens. Commenting this out seems to not introduce any side effects?
|
||||
// Further investigation is needed...
|
||||
//Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_CRITTER_4 << 4 | NATURE_CHANNEL_CRITTER_5,
|
||||
//CHANNEL_IO_PORT_1, 1);
|
||||
if (play->envCtx.unk_EE[0] == 0 && play->envCtx.unk_F2[0] == 0) {
|
||||
// OTRTODO: This is where corrupt audio happens. Commenting this out seems to not introduce any side
|
||||
// effects? Further investigation is needed...
|
||||
// Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_CRITTER_4 << 4 | NATURE_CHANNEL_CRITTER_5,
|
||||
// CHANNEL_IO_PORT_1, 1);
|
||||
}
|
||||
play->envCtx.unk_E0++;
|
||||
break;
|
||||
@@ -2147,9 +2129,8 @@ void Environment_DrawCustomLensFlare(PlayState* play) {
|
||||
pos.y = gCustomLensFlarePos.y;
|
||||
pos.z = gCustomLensFlarePos.z;
|
||||
|
||||
Environment_DrawLensFlare(play, &play->envCtx, &play->view, play->state.gfxCtx, pos,
|
||||
gLensFlareUnused, gLensFlareScale, gLensFlareColorIntensity,
|
||||
gLensFlareScreenFillAlpha, 0);
|
||||
Environment_DrawLensFlare(play, &play->envCtx, &play->view, play->state.gfxCtx, pos, gLensFlareUnused,
|
||||
gLensFlareScale, gLensFlareColorIntensity, gLensFlareScreenFillAlpha, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2310,19 +2291,22 @@ Color_RGB8 sSandstormEnvColors[] = {
|
||||
u16 previousPatchedSandstormScreenSize = 0;
|
||||
|
||||
void Environment_PatchSandstorm(PlayState* play) {
|
||||
if (previousPatchedSandstormScreenSize == ABS(OTRGetRectDimensionFromLeftEdge(0)) + ABS(OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH))) {
|
||||
if (previousPatchedSandstormScreenSize ==
|
||||
ABS(OTRGetRectDimensionFromLeftEdge(0)) + ABS(OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH))) {
|
||||
return;
|
||||
}
|
||||
|
||||
Gfx gfxPatchSandstormRect[] = {
|
||||
gsSPWideTextureRectangle(OTRGetRectDimensionFromLeftEdge(0) << 2, 0,
|
||||
OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH) << 2, 0x03C0, G_TX_RENDERTILE, 0, 0, 0x008C, -0x008C),
|
||||
OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH) << 2, 0x03C0, G_TX_RENDERTILE, 0, 0,
|
||||
0x008C, -0x008C),
|
||||
};
|
||||
ResourceMgr_PatchGfxByName(gFieldSandstormDL, "gfxPatchSandstormRect0", 24, gfxPatchSandstormRect[0]);
|
||||
ResourceMgr_PatchGfxByName(gFieldSandstormDL, "gfxPatchSandstormRect1", 25, gfxPatchSandstormRect[1]);
|
||||
ResourceMgr_PatchGfxByName(gFieldSandstormDL, "gfxPatchSandstormRect2", 26, gfxPatchSandstormRect[2]);
|
||||
|
||||
previousPatchedSandstormScreenSize = ABS(OTRGetRectDimensionFromLeftEdge(0)) + ABS(OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH));
|
||||
previousPatchedSandstormScreenSize =
|
||||
ABS(OTRGetRectDimensionFromLeftEdge(0)) + ABS(OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH));
|
||||
}
|
||||
|
||||
void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) {
|
||||
|
||||
+30
-29
@@ -122,19 +122,19 @@ s16 sHeartsDDEnv[2][3];
|
||||
|
||||
void HealthMeter_Init(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
Color_RGB8 mainColor = {HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B};
|
||||
Color_RGB8 mainColor = { HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.Hearts.Changed"), 0)) {
|
||||
mainColor = CVarGetColor24(CVAR_COSMETIC("Consumable.Hearts.Value"), mainColor);
|
||||
}
|
||||
Color_RGB8 mainBorder = {HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B};
|
||||
Color_RGB8 mainBorder = { HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.HeartBorder.Changed"), 0)) {
|
||||
mainBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.HeartBorder.Value"), mainBorder);
|
||||
}
|
||||
Color_RGB8 ddColor = {HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B};
|
||||
Color_RGB8 ddColor = { HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.DDHearts.Changed"), 0)) {
|
||||
ddColor = CVarGetColor24(CVAR_COSMETIC("Consumable.DDHearts.Value"), ddColor);
|
||||
}
|
||||
Color_RGB8 ddBorder = {HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B};
|
||||
Color_RGB8 ddBorder = { HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.DDHeartBorder.Changed"), 0)) {
|
||||
ddBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.DDHeartBorder.Value"), ddBorder);
|
||||
}
|
||||
@@ -184,19 +184,19 @@ void HealthMeter_Update(PlayState* play) {
|
||||
Right_LM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.R"), 0);
|
||||
Bottom_LM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.B"), 0);
|
||||
|
||||
Color_RGB8 mainColor = {HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B};
|
||||
Color_RGB8 mainColor = { HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.Hearts.Changed"), 0)) {
|
||||
mainColor = CVarGetColor24(CVAR_COSMETIC("Consumable.Hearts.Value"), mainColor);
|
||||
}
|
||||
Color_RGB8 mainBorder = {HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B};
|
||||
Color_RGB8 mainBorder = { HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.HeartBorder.Changed"), 0)) {
|
||||
mainBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.HeartBorder.Value"), mainBorder);
|
||||
}
|
||||
Color_RGB8 ddColor = {HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B};
|
||||
Color_RGB8 ddColor = { HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.DDHearts.Changed"), 0)) {
|
||||
ddColor = CVarGetColor24(CVAR_COSMETIC("Consumable.DDHearts.Value"), ddColor);
|
||||
}
|
||||
Color_RGB8 ddBorder = {HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B};
|
||||
Color_RGB8 ddBorder = { HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.DDHeartBorder.Changed"), 0)) {
|
||||
ddBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.DDHeartBorder.Value"), ddBorder);
|
||||
}
|
||||
@@ -346,11 +346,11 @@ s16 getHealthMeterXOffset() {
|
||||
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == ANCHOR_LEFT) {
|
||||
return OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0)+X_Margins +
|
||||
return OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0) + X_Margins +
|
||||
70.0f);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
X_Margins = Right_LM_Margin;
|
||||
return OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0)+X_Margins +
|
||||
return OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0) + X_Margins +
|
||||
70.0f);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == ANCHOR_NONE) {
|
||||
return CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0) + 70.0f;
|
||||
@@ -358,23 +358,23 @@ s16 getHealthMeterXOffset() {
|
||||
return -9999;
|
||||
}
|
||||
} else {
|
||||
return OTRGetDimensionFromLeftEdge(0.0f)+X_Margins;
|
||||
return OTRGetDimensionFromLeftEdge(0.0f) + X_Margins;
|
||||
}
|
||||
}
|
||||
|
||||
s16 getHealthMeterYOffset() {
|
||||
s16 Y_Margins;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Hearts.UseMargins"), 0) != 0)
|
||||
Y_Margins = (Top_LM_Margin*-1);
|
||||
Y_Margins = (Top_LM_Margin * -1);
|
||||
else
|
||||
Y_Margins = 0;
|
||||
|
||||
f32 HeartsScale = 0.7f;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
HeartsScale = CVarGetFloat(CVAR_COSMETIC("HUD.HeartsCount.Scale"), 0.7f);
|
||||
return CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosY"), 0)+Y_Margins+(HeartsScale*15);
|
||||
return CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosY"), 0) + Y_Margins + (HeartsScale * 15);
|
||||
} else {
|
||||
return 0.0f+Y_Margins;
|
||||
return 0.0f + Y_Margins;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,11 +430,11 @@ void HealthMeter_Draw(PlayState* play) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
offsetY = CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosY"), 0)+Y_Margins+(HeartsScale*15);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == ANCHOR_LEFT) {
|
||||
offsetX = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
offsetX = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"),
|
||||
0)+X_Margins+70.0f); } else if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
X_Margins = Right_LM_Margin;
|
||||
offsetX = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == ANCHOR_NONE) {
|
||||
offsetX = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"),
|
||||
0)+X_Margins+70.0f); } else if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == ANCHOR_NONE) {
|
||||
offsetX = CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0)+70.0f;
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == HIDDEN) {
|
||||
offsetX = -9999;
|
||||
@@ -568,8 +568,8 @@ void HealthMeter_Draw(PlayState* play) {
|
||||
|
||||
temp3 = offsetY;
|
||||
temp2 = offsetX;
|
||||
temp4 = 1.0f;//Heart texture size
|
||||
temp4 /= 0.68f; //Hearts Scaled size
|
||||
temp4 = 1.0f; // Heart texture size
|
||||
temp4 /= 0.68f; // Hearts Scaled size
|
||||
temp4 *= 1 << 10;
|
||||
temp1 = 8.0f;
|
||||
temp1 *= 0.68f;
|
||||
@@ -578,12 +578,12 @@ void HealthMeter_Draw(PlayState* play) {
|
||||
(s32)temp4, (s32)temp4);*/
|
||||
Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||
Matrix_SetTranslateScaleMtx2(matrix,
|
||||
HeartsScale, //Scale X
|
||||
HeartsScale, //Scale Y
|
||||
HeartsScale, //Scale Z
|
||||
-130+offsetX, //Pos X
|
||||
(-94+offsetY) *-1, //Pos Y
|
||||
0.0f); //Pos Z
|
||||
HeartsScale, // Scale X
|
||||
HeartsScale, // Scale Y
|
||||
HeartsScale, // Scale Z
|
||||
-130 + offsetX, // Pos X
|
||||
(-94 + offsetY) * -1, // Pos Y
|
||||
0.0f); // Pos Z
|
||||
gSPMatrix(OVERLAY_DISP++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPVertex(OVERLAY_DISP++, sp154, 4, 0);
|
||||
gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0);
|
||||
@@ -632,7 +632,7 @@ void HealthMeter_Draw(PlayState* play) {
|
||||
|
||||
offsetX += 10.0f;
|
||||
s32 lineLength = CVarGetInteger(CVAR_COSMETIC("HUD.Hearts.LineLength"), 10);
|
||||
if (lineLength != 0 && (i+1)%lineLength == 0) {
|
||||
if (lineLength != 0 && (i + 1) % lineLength == 0) {
|
||||
offsetX = PosX_anchor;
|
||||
offsetY += 10.0f;
|
||||
}
|
||||
@@ -651,8 +651,9 @@ void HealthMeter_HandleCriticalAlarm(PlayState* play) {
|
||||
if (interfaceCtx->unk_22A <= 0) {
|
||||
interfaceCtx->unk_22A = 0;
|
||||
interfaceCtx->unk_22C = 0;
|
||||
if (CVarGetInteger(CVAR_AUDIO("LowHpAlarm"), 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) &&
|
||||
(play->pauseCtx.debugState == 0) && HealthMeter_IsCritical() && !Play_InCsMode(play)) {
|
||||
if (CVarGetInteger(CVAR_AUDIO("LowHpAlarm"), 0) == 0 && !Player_InCsMode(play) &&
|
||||
(play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) && HealthMeter_IsCritical() &&
|
||||
!Play_InCsMode(play)) {
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_HITPOINT_ALARM);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ void Lights_GlowCheck(PlayState* play) {
|
||||
if ((multDest.z > 1.0f) && y >= shrink && y <= SCREEN_HEIGHT - shrink) {
|
||||
wZ = (s32)((multDest.z * wDest) * 16352.0f) + 16352;
|
||||
zBuf = OTRGetPixelDepth(x, y) * 4;
|
||||
|
||||
|
||||
if (wZ < (zBuf >> 3)) {
|
||||
params->drawGlow = true;
|
||||
}
|
||||
@@ -436,8 +436,7 @@ void Lights_DrawGlow(PlayState* play) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, params->color[0], params->color[1], params->color[2], 50);
|
||||
Matrix_Translate(params->x, params->y, params->z, MTXMODE_NEW);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGlowCircleDL);
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void* ZeldaArena_Calloc(size_t num, size_t size) {
|
||||
|
||||
ret = __osMalloc(&sZeldaArena, n);
|
||||
if (ret != NULL) {
|
||||
memset(ret, 0,n);
|
||||
memset(ret, 0, n);
|
||||
}
|
||||
|
||||
ZeldaArena_CheckPointer(ret, n, "zelda_calloc", "確保");
|
||||
|
||||
@@ -309,13 +309,30 @@ static u8 sFloorID[10][8] = {
|
||||
static s16 sSkullFloorIconY[10] = { -47, -47, -33, -47, -47, -5, -19, -47, -99, -99 };
|
||||
|
||||
MapData gMapDataTable = {
|
||||
sFloorTexIndexOffset, sBossFloor, sRoomPalette,
|
||||
sMaxPaletteCount, sPaletteRoom, sRoomCompassOffsetX,
|
||||
sRoomCompassOffsetY, sDgnMinimapCount, sDgnMinimapTexIndexOffset,
|
||||
sOwMinimapPosX, sOwMinimapPosY, sOwCompassInfo,
|
||||
sDgnMinimapTexIndexBase, sDgnCompassInfo, sOwMinimapWidth,
|
||||
sOwMinimapHeight, sOwEntranceIconPosX, sOwEntranceIconPosY,
|
||||
sOwEntranceFlag, sFloorCoordY, sSwitchEntryCount,
|
||||
sSwitchFromRoom, sSwitchFromFloor, sSwitchToRoom,
|
||||
sFloorID, sSkullFloorIconY,
|
||||
sFloorTexIndexOffset,
|
||||
sBossFloor,
|
||||
sRoomPalette,
|
||||
sMaxPaletteCount,
|
||||
sPaletteRoom,
|
||||
sRoomCompassOffsetX,
|
||||
sRoomCompassOffsetY,
|
||||
sDgnMinimapCount,
|
||||
sDgnMinimapTexIndexOffset,
|
||||
sOwMinimapPosX,
|
||||
sOwMinimapPosY,
|
||||
sOwCompassInfo,
|
||||
sDgnMinimapTexIndexBase,
|
||||
sDgnCompassInfo,
|
||||
sOwMinimapWidth,
|
||||
sOwMinimapHeight,
|
||||
sOwEntranceIconPosX,
|
||||
sOwEntranceIconPosY,
|
||||
sOwEntranceFlag,
|
||||
sFloorCoordY,
|
||||
sSwitchEntryCount,
|
||||
sSwitchFromRoom,
|
||||
sSwitchFromFloor,
|
||||
sSwitchToRoom,
|
||||
sFloorID,
|
||||
sSkullFloorIconY,
|
||||
};
|
||||
|
||||
+188
-98
@@ -92,8 +92,7 @@ void Map_SetFloorPalettesData(PlayState* play, s16 floor) {
|
||||
}
|
||||
}
|
||||
|
||||
const char* minimapTableOW[] =
|
||||
{
|
||||
const char* minimapTableOW[] = {
|
||||
gHyruleFieldMinimapTex,
|
||||
gKakarikoVillageMinimapTex,
|
||||
gGraveyardMinimapTex,
|
||||
@@ -120,8 +119,7 @@ const char* minimapTableOW[] =
|
||||
gGerudosFortressMinimapTex,
|
||||
};
|
||||
|
||||
const char* minimapTableDangeon[] =
|
||||
{
|
||||
const char* minimapTableDangeon[] = {
|
||||
gDekuTreeRoom0Floor1MinimapTex,
|
||||
gDekuTreeRoom1MinimapTex,
|
||||
gDekuTreeRoom2MinimapTex,
|
||||
@@ -414,9 +412,9 @@ void Map_InitData(PlayState* play, s16 room) {
|
||||
osSyncPrintf("KKK=%d\n", extendedMapIndex);
|
||||
osSyncPrintf(VT_RST);
|
||||
sEntranceIconMapIndex = extendedMapIndex;
|
||||
//DmaMgr_SendRequest1(interfaceCtx->mapSegment,
|
||||
// DmaMgr_SendRequest1(interfaceCtx->mapSegment,
|
||||
//(uintptr_t)_map_grand_staticSegmentRomStart + gMapData->owMinimapTexOffset[extendedMapIndex],
|
||||
//gMapData->owMinimapTexSize[mapIndex], __FILE__, __LINE__);
|
||||
// gMapData->owMinimapTexSize[mapIndex], __FILE__, __LINE__);
|
||||
|
||||
if (sEntranceIconMapIndex < 24) {
|
||||
play->interfaceCtx.mapSegment[0] = ResourceGetDataByName(minimapTableOW[sEntranceIconMapIndex]);
|
||||
@@ -448,14 +446,15 @@ void Map_InitData(PlayState* play, s16 room) {
|
||||
osSyncPrintf("デクの樹ダンジョンMAP テクスチャDMA(%x) scene_id_offset=%d VREG(30)=%d\n", room,
|
||||
mapIndex, VREG(30));
|
||||
osSyncPrintf(VT_RST);
|
||||
//DmaMgr_SendRequest1(play->interfaceCtx.mapSegment,
|
||||
// DmaMgr_SendRequest1(play->interfaceCtx.mapSegment,
|
||||
//(uintptr_t)_map_i_staticSegmentRomStart +
|
||||
//((gMapData->dgnMinimapTexIndexOffset[mapIndex] + room) * 0xFF0),
|
||||
//0xFF0, __FILE__, __LINE__);
|
||||
// 0xFF0, __FILE__, __LINE__);
|
||||
|
||||
play->interfaceCtx.mapSegment[0] = ResourceGetDataByName(
|
||||
minimapTableDangeon[gMapData->dgnMinimapTexIndexOffset[mapIndex] + room]);
|
||||
play->interfaceCtx.mapSegmentName[0] = minimapTableDangeon[gMapData->dgnMinimapTexIndexOffset[mapIndex] + room];
|
||||
play->interfaceCtx.mapSegment[0] =
|
||||
ResourceGetDataByName(minimapTableDangeon[gMapData->dgnMinimapTexIndexOffset[mapIndex] + room]);
|
||||
play->interfaceCtx.mapSegmentName[0] =
|
||||
minimapTableDangeon[gMapData->dgnMinimapTexIndexOffset[mapIndex] + room];
|
||||
R_COMPASS_OFFSET_X = gMapData->roomCompassOffsetX[mapIndex][room];
|
||||
R_COMPASS_OFFSET_Y = gMapData->roomCompassOffsetY[mapIndex][room];
|
||||
Map_SetFloorPalettesData(play, VREG(30));
|
||||
@@ -618,7 +617,9 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
||||
s16 X_Margins_Minimap;
|
||||
s16 Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ORIGINAL_LOCATION) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ORIGINAL_LOCATION) {
|
||||
X_Margins_Minimap = Right_MM_Margin;
|
||||
};
|
||||
Y_Margins_Minimap = Bottom_MM_Margin;
|
||||
} else {
|
||||
X_Margins_Minimap = 0;
|
||||
@@ -630,7 +631,7 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
||||
if (play->interfaceCtx.minimapAlpha >= 0xAA) {
|
||||
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
|
||||
|
||||
//Player current position (yellow arrow)
|
||||
// Player current position (yellow arrow)
|
||||
gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
@@ -647,9 +648,9 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
||||
mapWidth = 96;
|
||||
}
|
||||
|
||||
// The compass offset value is a factor of 10 compared to N64 screen pixels and originates in the center of the screen
|
||||
// Compute the additional mirror offset value by normalizing the original offset position
|
||||
// and taking it's distance to the center of the map, duplicating that result and casting back to a factor of 10
|
||||
// The compass offset value is a factor of 10 compared to N64 screen pixels and originates in the center of the
|
||||
// screen Compute the additional mirror offset value by normalizing the original offset position and taking it's
|
||||
// distance to the center of the map, duplicating that result and casting back to a factor of 10
|
||||
s16 mirrorOffset = ((mapWidth / 2) - ((R_COMPASS_OFFSET_X / 10) - (mapStartPosX - SCREEN_WIDTH / 2))) * 2 * 10;
|
||||
|
||||
tempX = player->actor.world.pos.x;
|
||||
@@ -657,65 +658,103 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
||||
tempX /= R_COMPASS_SCALE_X * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1);
|
||||
tempZ /= R_COMPASS_SCALE_Y;
|
||||
|
||||
s16 tempXOffset = R_COMPASS_OFFSET_X + (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? mirrorOffset : 0);
|
||||
s16 tempXOffset =
|
||||
R_COMPASS_OFFSET_X + (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? mirrorOffset : 0);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_LEFT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Left_MM_Margin;
|
||||
};
|
||||
Matrix_Translate(
|
||||
OTRGetDimensionFromLeftEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)*10)) /10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
OTRGetDimensionFromLeftEdge((tempXOffset + (X_Margins_Minimap * 10) + tempX +
|
||||
(CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) * 10)) /
|
||||
10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap * 10) * -1) - tempZ +
|
||||
((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) * 10) * -1)) /
|
||||
10.0f,
|
||||
0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Right_MM_Margin;
|
||||
};
|
||||
Matrix_Translate(
|
||||
OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap * 10) + tempX +
|
||||
(CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) * 10)) /
|
||||
10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap * 10) * -1) - tempZ +
|
||||
((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) * 10) * -1)) /
|
||||
10.0f,
|
||||
0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_NONE) {
|
||||
Matrix_Translate(
|
||||
(tempXOffset + tempX + (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)*10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
(tempXOffset + tempX + (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) * 10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap * 10) * -1) - tempZ +
|
||||
((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) * 10) * -1)) /
|
||||
10.0f,
|
||||
0.0f, MTXMODE_NEW);
|
||||
}
|
||||
} else {
|
||||
Matrix_Translate(OTRGetDimensionFromRightEdge((tempXOffset+(X_Margins_Minimap*10) + tempX) / 10.0f), (R_COMPASS_OFFSET_Y+((Y_Margins_Minimap*10)*-1) - tempZ) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
Matrix_Translate(OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap * 10) + tempX) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap * 10) * -1) - tempZ) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
}
|
||||
Matrix_Scale(0.4f, 0.4f, 0.4f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(-1.6f, MTXMODE_APPLY);
|
||||
tempX = ((0x7FFF - player->actor.shape.rot.y) / 0x400) * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1);
|
||||
tempX = ((0x7FFF - player->actor.shape.rot.y) / 0x400) *
|
||||
(CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1);
|
||||
Matrix_RotateY(tempX / 10.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, currentPositionColor.r, currentPositionColor.g, currentPositionColor.b, 255);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, currentPositionColor.r, currentPositionColor.g, currentPositionColor.b,
|
||||
255);
|
||||
gSPDisplayList(OVERLAY_DISP++, gCompassArrowDL);
|
||||
|
||||
//Player map entry (red arrow)
|
||||
// Player map entry (red arrow)
|
||||
tempX = sPlayerInitialPosX;
|
||||
tempZ = sPlayerInitialPosZ;
|
||||
tempX /= R_COMPASS_SCALE_X * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1);
|
||||
tempZ /= R_COMPASS_SCALE_Y;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_LEFT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Left_MM_Margin;
|
||||
};
|
||||
Matrix_Translate(
|
||||
OTRGetDimensionFromLeftEdge((tempXOffset + (X_Margins_Minimap * 10) + tempX + (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) * 10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) * 10) * -1)) /10.0f, 0.0f, MTXMODE_NEW);
|
||||
OTRGetDimensionFromLeftEdge((tempXOffset + (X_Margins_Minimap * 10) + tempX +
|
||||
(CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) * 10)) /
|
||||
10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap * 10) * -1) - tempZ +
|
||||
((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) * 10) * -1)) /
|
||||
10.0f,
|
||||
0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Right_MM_Margin;
|
||||
};
|
||||
Matrix_Translate(
|
||||
OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) * 10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) * 10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap * 10) + tempX +
|
||||
(CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) * 10)) /
|
||||
10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap * 10) * -1) - tempZ +
|
||||
((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) * 10) * -1)) /
|
||||
10.0f,
|
||||
0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_NONE) {
|
||||
Matrix_Translate(
|
||||
(tempXOffset + tempX + (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)*10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
(tempXOffset + tempX + (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) * 10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) * 10) * -1)) /
|
||||
10.0f,
|
||||
0.0f, MTXMODE_NEW);
|
||||
}
|
||||
} else {
|
||||
Matrix_Translate(OTRGetDimensionFromRightEdge((tempXOffset+(X_Margins_Minimap*10) + tempX) / 10.0f), (R_COMPASS_OFFSET_Y+((Y_Margins_Minimap*10)*-1) - tempZ) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
Matrix_Translate(OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap * 10) + tempX) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap * 10) * -1) - tempZ) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
}
|
||||
Matrix_Scale(VREG(9) / 100.0f, VREG(9) / 100.0f, VREG(9) / 100.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(VREG(52) / 10.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((sPlayerInitialDirection * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1)) / 10.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
Matrix_RotateY((sPlayerInitialDirection * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1)) /
|
||||
10.0f,
|
||||
MTXMODE_APPLY);
|
||||
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, lastEntranceColor.r, lastEntranceColor.g, lastEntranceColor.b, 255);
|
||||
gSPDisplayList(OVERLAY_DISP++, gCompassArrowDL);
|
||||
@@ -728,7 +767,7 @@ void Minimap_Draw(PlayState* play) {
|
||||
s32 pad[2];
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s32 mapIndex = gSaveContext.mapIndex;
|
||||
Color_RGB8 minimapColor = {0, 255, 255};
|
||||
Color_RGB8 minimapColor = { 0, 255, 255 };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.Changed"), 0)) {
|
||||
minimapColor = CVarGetColor24(CVAR_COSMETIC("HUD.Minimap.Value"), minimapColor);
|
||||
}
|
||||
@@ -741,11 +780,13 @@ void Minimap_Draw(PlayState* play) {
|
||||
CVarGetInteger(CVAR_DEVELOPER_TOOLS("EnableMapToggle"), 0);
|
||||
|
||||
if (play->pauseCtx.state < 4) {
|
||||
//Minimap margins
|
||||
// Minimap margins
|
||||
s16 X_Margins_Minimap;
|
||||
s16 Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ORIGINAL_LOCATION) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ORIGINAL_LOCATION) {
|
||||
X_Margins_Minimap = Right_MM_Margin;
|
||||
};
|
||||
Y_Margins_Minimap = Bottom_MM_Margin;
|
||||
} else {
|
||||
X_Margins_Minimap = 0;
|
||||
@@ -769,9 +810,11 @@ void Minimap_Draw(PlayState* play) {
|
||||
TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
||||
if (CHECK_DUNGEON_ITEM(DUNGEON_MAP, mapIndex)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b, interfaceCtx->minimapAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b,
|
||||
interfaceCtx->minimapAlpha);
|
||||
|
||||
u8 mirrorMode = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? G_TX_MIRROR : G_TX_NOMIRROR;
|
||||
u8 mirrorMode =
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? G_TX_MIRROR : G_TX_NOMIRROR;
|
||||
gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegmentName[0], G_IM_FMT_I, 96, 85, 0,
|
||||
mirrorMode | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
@@ -779,13 +822,22 @@ void Minimap_Draw(PlayState* play) {
|
||||
s16 dgnMiniMapX = OTRGetRectDimensionFromRightEdge(R_DGN_MINIMAP_X + X_Margins_Minimap);
|
||||
s16 dgnMiniMapY = R_DGN_MINIMAP_Y + Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
dgnMiniMapY = R_DGN_MINIMAP_Y + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)+Y_Margins_Minimap;
|
||||
dgnMiniMapY = R_DGN_MINIMAP_Y + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) +
|
||||
Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_LEFT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
dgnMiniMapX = OTRGetDimensionFromLeftEdge(R_DGN_MINIMAP_X + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+X_Margins_Minimap);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Left_MM_Margin;
|
||||
};
|
||||
dgnMiniMapX = OTRGetDimensionFromLeftEdge(
|
||||
R_DGN_MINIMAP_X + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) +
|
||||
X_Margins_Minimap);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
dgnMiniMapX = OTRGetDimensionFromRightEdge(R_DGN_MINIMAP_X + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) +X_Margins_Minimap);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Right_MM_Margin;
|
||||
};
|
||||
dgnMiniMapX = OTRGetDimensionFromRightEdge(
|
||||
R_DGN_MINIMAP_X + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) +
|
||||
X_Margins_Minimap);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_NONE) {
|
||||
dgnMiniMapX = CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0);
|
||||
}
|
||||
@@ -809,7 +861,8 @@ void Minimap_Draw(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play) && enableMapToggle) {
|
||||
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play) &&
|
||||
enableMapToggle) {
|
||||
osSyncPrintf("Game_play_demo_mode_check=%d\n", Play_InCsMode(play));
|
||||
// clang-format off
|
||||
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
|
||||
@@ -845,24 +898,34 @@ void Minimap_Draw(PlayState* play) {
|
||||
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
|
||||
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b, interfaceCtx->minimapAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b,
|
||||
interfaceCtx->minimapAlpha);
|
||||
|
||||
u8 mirrorMode = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? G_TX_MIRROR : G_TX_NOMIRROR;
|
||||
gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegmentName[0], G_IM_FMT_IA,
|
||||
gMapData->owMinimapWidth[mapIndex], gMapData->owMinimapHeight[mapIndex], 0,
|
||||
mirrorMode | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
mirrorMode | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
s16 oWMiniMapX = OTRGetRectDimensionFromRightEdge(R_OW_MINIMAP_X + X_Margins_Minimap);
|
||||
s16 oWMiniMapY = R_OW_MINIMAP_Y + Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
oWMiniMapY = R_OW_MINIMAP_Y+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)+Y_Margins_Minimap;
|
||||
oWMiniMapY =
|
||||
R_OW_MINIMAP_Y + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) + Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_LEFT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
oWMiniMapX = OTRGetDimensionFromLeftEdge(R_OW_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+X_Margins_Minimap);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Left_MM_Margin;
|
||||
};
|
||||
oWMiniMapX = OTRGetDimensionFromLeftEdge(
|
||||
R_OW_MINIMAP_X + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) +
|
||||
X_Margins_Minimap);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
oWMiniMapX = OTRGetDimensionFromRightEdge(R_OW_MINIMAP_X + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) +X_Margins_Minimap);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Right_MM_Margin;
|
||||
};
|
||||
oWMiniMapX = OTRGetDimensionFromRightEdge(
|
||||
R_OW_MINIMAP_X + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) +
|
||||
X_Margins_Minimap);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_NONE) {
|
||||
oWMiniMapX = CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0);
|
||||
}
|
||||
@@ -876,10 +939,11 @@ void Minimap_Draw(PlayState* play) {
|
||||
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, oWMiniMapX << 2, oWMiniMapY << 2,
|
||||
(oWMiniMapX + gMapData->owMinimapWidth[mapIndex]) << 2,
|
||||
(oWMiniMapY + gMapData->owMinimapHeight[mapIndex]) << 2, G_TX_RENDERTILE, sValue,
|
||||
0, 1 << 10, 1 << 10);
|
||||
(oWMiniMapY + gMapData->owMinimapHeight[mapIndex]) << 2, G_TX_RENDERTILE,
|
||||
sValue, 0, 1 << 10, 1 << 10);
|
||||
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b, interfaceCtx->minimapAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b,
|
||||
interfaceCtx->minimapAlpha);
|
||||
|
||||
s16 iconSize = 8;
|
||||
|
||||
@@ -889,50 +953,66 @@ void Minimap_Draw(PlayState* play) {
|
||||
s16 origX = gMapData->owEntranceIconPosX[sEntranceIconMapIndex];
|
||||
|
||||
// Compute the distance of the center of the original texture location to the center of the map
|
||||
// Then duplicate that and right-align the texture (extra 2 pixels are due to the texture being a 6px left-aligned in a 8px tex)
|
||||
s16 distFromCenter = (R_OW_MINIMAP_X + (gMapData->owMinimapWidth[mapIndex] / 2)) - (origX + (iconSize / 2));
|
||||
// Then duplicate that and right-align the texture (extra 2 pixels are due to the texture being
|
||||
// a 6px left-aligned in a 8px tex)
|
||||
s16 distFromCenter =
|
||||
(R_OW_MINIMAP_X + (gMapData->owMinimapWidth[mapIndex] / 2)) - (origX + (iconSize / 2));
|
||||
s16 mirrorOffset = distFromCenter * 2 + (iconSize / 2) - 2;
|
||||
s16 newX = origX + (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? mirrorOffset : 0);
|
||||
|
||||
// The game authentically uses larger negative values for the entrance icon Y pos value. Normally only the first 12 bits
|
||||
// would be read when the final value is passed into `gSPTextureRectangle`, but our cosmetic hud placements requires using
|
||||
// `gSPWideTextureRectangle` which reads the first 24 bits instead. This caused the icon to be placed off screen.
|
||||
// To address this, we take only the first 10 bits (which are later left-shifted by 2 to get our final 12 bits)
|
||||
// to fix the entrance icon position when used with `gSPWideTextureRectangle`
|
||||
// The game authentically uses larger negative values for the entrance icon Y pos value.
|
||||
// Normally only the first 12 bits would be read when the final value is passed into
|
||||
// `gSPTextureRectangle`, but our cosmetic hud placements requires using
|
||||
// `gSPWideTextureRectangle` which reads the first 24 bits instead. This caused the icon to be
|
||||
// placed off screen. To address this, we take only the first 10 bits (which are later
|
||||
// left-shifted by 2 to get our final 12 bits) to fix the entrance icon position when used with
|
||||
// `gSPWideTextureRectangle`
|
||||
s16 newY = gMapData->owEntranceIconPosY[sEntranceIconMapIndex] & 0x3FF;
|
||||
|
||||
s16 entranceX = OTRGetRectDimensionFromRightEdge(newX + X_Margins_Minimap);
|
||||
s16 entranceY = newY + Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
entranceY = newY + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) + Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_LEFT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromLeftEdge(newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_LEFT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Left_MM_Margin;
|
||||
};
|
||||
entranceX = OTRGetRectDimensionFromLeftEdge(
|
||||
newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromRightEdge(newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Right_MM_Margin;
|
||||
};
|
||||
entranceX = OTRGetRectDimensionFromRightEdge(
|
||||
newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_NONE) {
|
||||
entranceX = newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0);
|
||||
entranceX =
|
||||
newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0);
|
||||
}
|
||||
}
|
||||
|
||||
// For icons that normally would be placed in 0,0 leave them there based on the left edge dimension
|
||||
// or hide them entirely if the fix is applied
|
||||
// For icons that normally would be placed in 0,0 leave them there based on the left edge
|
||||
// dimension or hide them entirely if the fix is applied
|
||||
if (gMapData->owEntranceIconPosY[sEntranceIconMapIndex] == 0) {
|
||||
entranceY = 0;
|
||||
entranceX = CVarGetInteger(CVAR_ENHANCEMENT("FixDungeonMinimapIcon"), 0) ? -9999 : OTRGetRectDimensionFromLeftEdge(0);
|
||||
entranceX = CVarGetInteger(CVAR_ENHANCEMENT("FixDungeonMinimapIcon"), 0)
|
||||
? -9999
|
||||
: OTRGetRectDimensionFromLeftEdge(0);
|
||||
}
|
||||
|
||||
//! @bug UB: sEntranceIconMapIndex can be up to 23 and is accessing owEntranceFlag which is size 20
|
||||
//! @bug UB: sEntranceIconMapIndex can be up to 23 and is accessing owEntranceFlag which is size
|
||||
//! 20
|
||||
if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) ||
|
||||
((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) &&
|
||||
((gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]) ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("AlwaysShowDungeonMinimapIcon"), 0)))) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||
iconSize, iconSize, 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);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, entranceX << 2, entranceY << 2, (entranceX + iconSize) << 2,
|
||||
(entranceY + iconSize) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
iconSize, iconSize, 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);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, entranceX << 2, entranceY << 2,
|
||||
(entranceX + iconSize) << 2, (entranceY + iconSize) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -942,30 +1022,40 @@ void Minimap_Draw(PlayState* play) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
entranceY = 154 + Y_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_LEFT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromLeftEdge(origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Left_MM_Margin;
|
||||
};
|
||||
entranceX = OTRGetRectDimensionFromLeftEdge(
|
||||
origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromRightEdge(origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap = Right_MM_Margin;
|
||||
};
|
||||
entranceX = OTRGetRectDimensionFromRightEdge(
|
||||
origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_NONE) {
|
||||
entranceX = origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0);
|
||||
entranceX =
|
||||
origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Ice Cavern entrance icon
|
||||
if ((play->sceneNum == SCENE_ZORAS_FOUNTAIN) && ((gSaveContext.infTable[26] & gBitFlags[9]) ||
|
||||
if ((play->sceneNum == SCENE_ZORAS_FOUNTAIN) &&
|
||||
((gSaveContext.infTable[26] & gBitFlags[9]) ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("AlwaysShowDungeonMinimapIcon"), 0))) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, iconSize,
|
||||
iconSize, 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);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, entranceX << 2, entranceY << 2, (entranceX + iconSize) << 2,
|
||||
(entranceY + iconSize) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||
iconSize, iconSize, 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);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, entranceX << 2, entranceY << 2,
|
||||
(entranceX + iconSize) << 2, (entranceY + iconSize) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
Minimap_DrawCompassIcons(play); // Draw icons for the player spawn and current position
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play) && enableMapToggle) {
|
||||
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play) &&
|
||||
enableMapToggle) {
|
||||
// clang-format off
|
||||
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
|
||||
|
||||
+57
-41
@@ -45,41 +45,41 @@ static MapMarkInfo sMapMarkInfoTable[] = {
|
||||
{ gMapBossIconTex, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 32, 32, 1 << 10, 1 << 10 }, // Boss Skull Icon
|
||||
};
|
||||
|
||||
//static MapMarkDataOverlay sMapMarkDataOvl = {
|
||||
// NULL,
|
||||
// //(uintptr_t)_ovl_map_mark_dataSegmentRomStart,
|
||||
// //(uintptr_t)_ovl_map_mark_dataSegmentRomEnd,
|
||||
// //_ovl_map_mark_dataSegmentStart,
|
||||
// //_ovl_map_mark_dataSegmentEnd,
|
||||
// 0, 0, 0, 0,
|
||||
// gMapMarkDataTableVanilla,
|
||||
//};
|
||||
// static MapMarkDataOverlay sMapMarkDataOvl = {
|
||||
// NULL,
|
||||
// //(uintptr_t)_ovl_map_mark_dataSegmentRomStart,
|
||||
// //(uintptr_t)_ovl_map_mark_dataSegmentRomEnd,
|
||||
// //_ovl_map_mark_dataSegmentStart,
|
||||
// //_ovl_map_mark_dataSegmentEnd,
|
||||
// 0, 0, 0, 0,
|
||||
// gMapMarkDataTableVanilla,
|
||||
// };
|
||||
|
||||
MapMarkData** sLoadedMarkDataTable;
|
||||
|
||||
void MapMark_Init(PlayState* play) {
|
||||
//MapMarkDataOverlay* overlay = &sMapMarkDataOvl;
|
||||
//u32 overlaySize = (uintptr_t)overlay->vramEnd - (uintptr_t)overlay->vramStart;
|
||||
// MapMarkDataOverlay* overlay = &sMapMarkDataOvl;
|
||||
// u32 overlaySize = (uintptr_t)overlay->vramEnd - (uintptr_t)overlay->vramStart;
|
||||
|
||||
//overlay->loadedRamAddr = GAMESTATE_ALLOC_MC(&play->state, overlaySize);
|
||||
//LOG_CHECK_NULL_POINTER("dlftbl->allocp", overlay->loadedRamAddr);
|
||||
// overlay->loadedRamAddr = GAMESTATE_ALLOC_MC(&play->state, overlaySize);
|
||||
// LOG_CHECK_NULL_POINTER("dlftbl->allocp", overlay->loadedRamAddr);
|
||||
|
||||
//Overlay_Load(overlay->vromStart, overlay->vromEnd, overlay->vramStart, overlay->vramEnd, overlay->loadedRamAddr);
|
||||
// Overlay_Load(overlay->vromStart, overlay->vromEnd, overlay->vramStart, overlay->vramEnd, overlay->loadedRamAddr);
|
||||
|
||||
if(ResourceMgr_IsGameMasterQuest()) {
|
||||
if (ResourceMgr_IsGameMasterQuest()) {
|
||||
sLoadedMarkDataTable = gMapMarkDataTableMq;
|
||||
} else {
|
||||
sLoadedMarkDataTable = gMapMarkDataTableVanilla;
|
||||
}
|
||||
//sLoadedMarkDataTable = gMapMarkDataTableVanilla;
|
||||
//sLoadedMarkDataTable = (void*)(uintptr_t)(
|
||||
// sLoadedMarkDataTable = gMapMarkDataTableVanilla;
|
||||
// sLoadedMarkDataTable = (void*)(uintptr_t)(
|
||||
//(overlay->vramTable != NULL)
|
||||
//? (void*)((uintptr_t)overlay->vramTable - ((intptr_t)overlay->vramStart - (intptr_t)overlay->loadedRamAddr))
|
||||
//: NULL);
|
||||
}
|
||||
|
||||
void MapMark_ClearPointers(PlayState* play) {
|
||||
//sMapMarkDataOvl.loadedRamAddr = NULL;
|
||||
// sMapMarkDataOvl.loadedRamAddr = NULL;
|
||||
sLoadedMarkDataTable = NULL;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,9 @@ void MapMark_DrawForDungeon(PlayState* play) {
|
||||
s32 X_Margins_Minimap_ic;
|
||||
s32 Y_Margins_Minimap_ic;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ORIGINAL_LOCATION) {X_Margins_Minimap_ic = Right_MC_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ORIGINAL_LOCATION) {
|
||||
X_Margins_Minimap_ic = Right_MC_Margin;
|
||||
};
|
||||
Y_Margins_Minimap_ic = Bottom_MC_Margin;
|
||||
} else {
|
||||
X_Margins_Minimap_ic = 0;
|
||||
@@ -132,40 +134,55 @@ void MapMark_DrawForDungeon(PlayState* play) {
|
||||
}
|
||||
|
||||
markPoint = &mapMarkIconData->points[0];
|
||||
//Place each chest / boss room icon
|
||||
// Place each chest / boss room icon
|
||||
for (i = 0; i < mapMarkIconData->count; i++) {
|
||||
if ((mapMarkIconData->markType != MAP_MARK_CHEST) || !Flags_GetTreasure(play, markPoint->chestFlag)) {
|
||||
markInfo = &sMapMarkInfoTable[mapMarkIconData->markType];
|
||||
int height = markInfo->textureHeight * 1.0f; //Adjust Height with scale
|
||||
int width = markInfo->textureWidth * 1.0f; //Adjust Width with scale
|
||||
int height = markInfo->textureHeight * 1.0f; // Adjust Height with scale
|
||||
int width = markInfo->textureWidth * 1.0f; // Adjust Width with scale
|
||||
int height_factor = (1 << 10) * markInfo->textureHeight / height;
|
||||
int width_factor = (1 << 10) * markInfo->textureWidth / width;
|
||||
|
||||
// The original mark point X originates from the left edge of the map
|
||||
// For mirror mode, we compute the new mark point X by subtracting it from the right side of the
|
||||
// dungeon map and the textures width
|
||||
s16 markPointX = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? 96 - markPoint->x - width : markPoint->x;
|
||||
s16 markPointX =
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? 96 - markPoint->x - width : markPoint->x;
|
||||
|
||||
//Minimap chest / boss icon
|
||||
const s32 PosX_Minimap_ori = GREG(94) + OTRGetRectDimensionFromRightEdge(markPointX+X_Margins_Minimap_ic) + 204;
|
||||
// Minimap chest / boss icon
|
||||
const s32 PosX_Minimap_ori =
|
||||
GREG(94) + OTRGetRectDimensionFromRightEdge(markPointX + X_Margins_Minimap_ic) + 204;
|
||||
const s32 PosY_Minimap_ori = GREG(95) + markPoint->y + Y_Margins_Minimap_ic + 140;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) != ORIGINAL_LOCATION) {
|
||||
rectTop = (markPoint->y + Y_Margins_Minimap_ic + 140+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0));
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_LEFT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap_ic = Left_MC_Margin;};
|
||||
if (play->sceneNum == SCENE_DEKU_TREE || play->sceneNum == SCENE_DODONGOS_CAVERN || play->sceneNum == SCENE_JABU_JABU ||
|
||||
play->sceneNum == SCENE_FOREST_TEMPLE || play->sceneNum == SCENE_FIRE_TEMPLE || play->sceneNum == SCENE_WATER_TEMPLE ||
|
||||
play->sceneNum == SCENE_SPIRIT_TEMPLE || play->sceneNum == SCENE_SHADOW_TEMPLE || play->sceneNum == SCENE_BOTTOM_OF_THE_WELL ||
|
||||
play->sceneNum == SCENE_ICE_CAVERN) {
|
||||
rectLeft = OTRGetRectDimensionFromLeftEdge(markPointX+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+204+X_Margins_Minimap_ic);
|
||||
rectTop = (markPoint->y + Y_Margins_Minimap_ic + 140 +
|
||||
CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0));
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_LEFT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap_ic = Left_MC_Margin;
|
||||
};
|
||||
if (play->sceneNum == SCENE_DEKU_TREE || play->sceneNum == SCENE_DODONGOS_CAVERN ||
|
||||
play->sceneNum == SCENE_JABU_JABU || play->sceneNum == SCENE_FOREST_TEMPLE ||
|
||||
play->sceneNum == SCENE_FIRE_TEMPLE || play->sceneNum == SCENE_WATER_TEMPLE ||
|
||||
play->sceneNum == SCENE_SPIRIT_TEMPLE || play->sceneNum == SCENE_SHADOW_TEMPLE ||
|
||||
play->sceneNum == SCENE_BOTTOM_OF_THE_WELL || play->sceneNum == SCENE_ICE_CAVERN) {
|
||||
rectLeft = OTRGetRectDimensionFromLeftEdge(
|
||||
markPointX + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) + 204 +
|
||||
X_Margins_Minimap_ic);
|
||||
} else {
|
||||
rectLeft = OTRGetRectDimensionFromLeftEdge(markPointX+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+204+X_Margins_Minimap_ic);
|
||||
rectLeft = OTRGetRectDimensionFromLeftEdge(
|
||||
markPointX + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) + 204 +
|
||||
X_Margins_Minimap_ic);
|
||||
}
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_RIGHT) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
|
||||
rectLeft = OTRGetRectDimensionFromRightEdge(markPointX+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) + 204 +X_Margins_Minimap_ic);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {
|
||||
X_Margins_Minimap_ic = Right_MC_Margin;
|
||||
};
|
||||
rectLeft = OTRGetRectDimensionFromRightEdge(
|
||||
markPointX + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) + 204 +
|
||||
X_Margins_Minimap_ic);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == ANCHOR_NONE) {
|
||||
rectLeft = markPointX+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+204+X_Margins_Minimap_ic;
|
||||
rectLeft = markPointX + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0) + 204 +
|
||||
X_Margins_Minimap_ic;
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == HIDDEN) {
|
||||
rectLeft = -9999;
|
||||
}
|
||||
@@ -179,10 +196,9 @@ void MapMark_DrawForDungeon(PlayState* play) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, markInfo->texture, markInfo->imageFormat, G_IM_SIZ_MARK,
|
||||
markInfo->textureWidth, markInfo->textureHeight, 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);
|
||||
//Changed to a Wide texture to support Left anchor.
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, rectLeft << 2, rectTop << 2, rectLeft + width << 2,
|
||||
rectTop + height << 2, G_TX_RENDERTILE, 0, 0, width_factor,
|
||||
height_factor);
|
||||
// Changed to a Wide texture to support Left anchor.
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, rectLeft << 2, rectTop << 2, rectLeft + width << 2,
|
||||
rectTop + height << 2, G_TX_RENDERTILE, 0, 0, width_factor, height_factor);
|
||||
}
|
||||
|
||||
markPoint++;
|
||||
|
||||
+260
-216
File diff suppressed because it is too large
Load Diff
@@ -5,15 +5,11 @@
|
||||
#include "global.h"
|
||||
|
||||
// OTRTODO
|
||||
u64 gMojiFontTex[] =
|
||||
{
|
||||
u64 gMojiFontTex[] = {
|
||||
0,
|
||||
};
|
||||
|
||||
u64 gMojiFontTLUTs[4][4] =
|
||||
{
|
||||
0
|
||||
};
|
||||
u64 gMojiFontTLUTs[4][4] = { 0 };
|
||||
|
||||
// how big to draw the characters on screen
|
||||
#define DISP_CHAR_WIDTH 8
|
||||
|
||||
@@ -91,7 +91,6 @@ Vec3f* OLib_VecSphToVec3f(Vec3f* dest, VecSph* sph) {
|
||||
sinPitch = Math_SinS(sph->pitch);
|
||||
sinYaw = Math_SinS(sph->yaw);
|
||||
}
|
||||
|
||||
|
||||
v.x = sph->r * sinPitch * sinYaw;
|
||||
v.y = sph->r * cosPitch;
|
||||
|
||||
@@ -70,13 +70,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
PosRot sp8C;
|
||||
f32 tempRand;
|
||||
Unique9OnePointCs* csInfo = ONEPOINT_CS_INFO(csCam);
|
||||
|
||||
|
||||
// #region SOH [Enhancement]
|
||||
//the default is 90, lower values necessary to prevent camera swing as animation speeds up
|
||||
// the default is 90, lower values necessary to prevent camera swing as animation speeds up
|
||||
s16 camCrawlTemp = CVarGetInteger(CVAR_ENHANCEMENT("CrawlSpeed"), 1);
|
||||
s16 camCrawlTimer = D_8012042C / camCrawlTemp;
|
||||
// #endregion
|
||||
|
||||
|
||||
switch (csId) {
|
||||
case 1020:
|
||||
if (timer < 20) {
|
||||
@@ -253,8 +253,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
D_801211D4[0].atTargetInit.y = actor->focus.pos.y - 5.0f;
|
||||
D_801211D4[0].atTargetInit.z = actor->focus.pos.z;
|
||||
spC0 = ((EnSw*)actor)->unk_364;
|
||||
osSyncPrintf("%s(%d): xyz_t: %s (%f %f %f)\n", __FILE__, __LINE__, "&cp", spC0.x, spC0.y,
|
||||
spC0.z);
|
||||
osSyncPrintf("%s(%d): xyz_t: %s (%f %f %f)\n", __FILE__, __LINE__, "&cp", spC0.x, spC0.y, spC0.z);
|
||||
D_801211D4[0].eyeTargetInit.x = (actor->focus.pos.x + (120.0f * spC0.x)) - (Rand_ZeroOne() * 20.0f);
|
||||
D_801211D4[0].eyeTargetInit.y = actor->focus.pos.y + (120.0f * spC0.y) + 20.0f;
|
||||
D_801211D4[0].eyeTargetInit.z = (actor->focus.pos.z + (120.0f * spC0.z)) - (Rand_ZeroOne() * 20.0f);
|
||||
@@ -350,7 +349,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
|
||||
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120434);
|
||||
break;
|
||||
// #endregion
|
||||
// #endregion
|
||||
} else {
|
||||
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
|
||||
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
|
||||
|
||||
+969
-713
File diff suppressed because it is too large
Load Diff
+76
-54
@@ -44,11 +44,11 @@ void Play_SpawnScene(PlayState* play, s32 sceneId, s32 spawn);
|
||||
// This macro prints the number "1" with a file and line number if R_ENABLE_PLAY_LOGS is enabled.
|
||||
// For example, it can be used to trace the play state execution at a high level.
|
||||
// SOHTODO: Revert log statements everywhere back to authentic, and deal with dynamic line/file names via macro
|
||||
#define PLAY_LOG(line) \
|
||||
do { \
|
||||
if (1 & HREG(63)) { \
|
||||
#define PLAY_LOG(line) \
|
||||
do { \
|
||||
if (1 & HREG(63)) { \
|
||||
LOG_NUM("1", 1 /*, "../z_play.c", line */); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
void enableBetaQuest();
|
||||
@@ -66,8 +66,8 @@ void Play_SetViewpoint(PlayState* play, s16 viewpoint) {
|
||||
play->unk_1242B = viewpoint;
|
||||
|
||||
if ((YREG(15) != 0x10) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
Audio_PlaySoundGeneral((viewpoint == 1) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral((viewpoint == 1) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos,
|
||||
4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
Play_RequestViewpointBgCam(play);
|
||||
@@ -487,8 +487,8 @@ void Play_Init(GameState* thisx) {
|
||||
} else {
|
||||
gSaveContext.sceneSetupIndex = 0;
|
||||
}
|
||||
} else if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_KOKIRI_FOREST) &&
|
||||
LINK_IS_ADULT && !IS_CUTSCENE_LAYER) {
|
||||
} else if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_KOKIRI_FOREST) && LINK_IS_ADULT &&
|
||||
!IS_CUTSCENE_LAYER) {
|
||||
gSaveContext.sceneSetupIndex = (Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) ? 3 : 2;
|
||||
}
|
||||
|
||||
@@ -519,8 +519,7 @@ void Play_Init(GameState* thisx) {
|
||||
gSaveContext.bgsDayCount++;
|
||||
gSaveContext.dogIsLost = true;
|
||||
|
||||
if (Inventory_ReplaceItem(play, ITEM_WEIRD_EGG, ITEM_CHICKEN) ||
|
||||
Inventory_HatchPocketCucco(play)) {
|
||||
if (Inventory_ReplaceItem(play, ITEM_WEIRD_EGG, ITEM_CHICKEN) || Inventory_HatchPocketCucco(play)) {
|
||||
GameInteractor_ExecuteOnCuccoOrChickenHatch();
|
||||
Message_StartTextbox(play, 0x3066, NULL);
|
||||
}
|
||||
@@ -645,10 +644,10 @@ void Play_Init(GameState* thisx) {
|
||||
if (gSaveContext.ship.stats.sceneNum != gPlayState->sceneNum) {
|
||||
u16 idx = gSaveContext.ship.stats.tsIdx;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].sceneTime = gSaveContext.ship.stats.sceneTimer / 2;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].roomTime = gSaveContext.ship.stats.roomTimer / 2;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].roomTime = gSaveContext.ship.stats.roomTimer / 2;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].scene = gSaveContext.ship.stats.sceneNum;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].room = gSaveContext.ship.stats.roomNum;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].isRoom =
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].isRoom =
|
||||
gPlayState->sceneNum == gSaveContext.ship.stats.sceneTimestamps[idx].scene &&
|
||||
gPlayState->roomCtx.curRoom.num != gSaveContext.ship.stats.sceneTimestamps[idx].room;
|
||||
gSaveContext.ship.stats.tsIdx++;
|
||||
@@ -659,7 +658,7 @@ void Play_Init(GameState* thisx) {
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].roomTime = gSaveContext.ship.stats.roomTimer / 2;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].scene = gSaveContext.ship.stats.sceneNum;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].room = gSaveContext.ship.stats.roomNum;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].isRoom =
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].isRoom =
|
||||
gPlayState->sceneNum == gSaveContext.ship.stats.sceneTimestamps[idx].scene &&
|
||||
gPlayState->roomCtx.curRoom.num != gSaveContext.ship.stats.sceneTimestamps[idx].room;
|
||||
gSaveContext.ship.stats.tsIdx++;
|
||||
@@ -738,26 +737,53 @@ void Play_Update(PlayState* play) {
|
||||
|
||||
// #region SOH [Stats] Gameplay stats: Count button presses
|
||||
if (!gSaveContext.ship.stats.gameComplete) {
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_A)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_A]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_B)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_B]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_CUP)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_CUP]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_CRIGHT)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_CRIGHT]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_CLEFT)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_CLEFT]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_CDOWN)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_CDOWN]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_DUP)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_DUP]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_DRIGHT)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_DRIGHT]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_DDOWN)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_DDOWN]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_DLEFT)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_DLEFT]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_L)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_L]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_R)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_R]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_Z)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_Z]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_START)) {gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_START]++;}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_A)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_A]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_B)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_B]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_CUP)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_CUP]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_CRIGHT)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_CRIGHT]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_CLEFT)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_CLEFT]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_CDOWN)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_CDOWN]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_DUP)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_DUP]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_DRIGHT)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_DRIGHT]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_DDOWN)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_DDOWN]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_DLEFT)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_DLEFT]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_L)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_L]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_R)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_R]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_Z)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_Z]++;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input[0].press.button, BTN_START)) {
|
||||
gSaveContext.ship.stats.count[COUNT_BUTTON_PRESSES_START]++;
|
||||
}
|
||||
|
||||
// Start RTA timing on first non-c-up input after intro cutscene
|
||||
if (
|
||||
!gSaveContext.ship.stats.fileCreatedAt && !Player_InCsMode(play) &&
|
||||
((input[0].press.button && input[0].press.button != 0x8) || input[0].rel.stick_x != 0 || input[0].rel.stick_y != 0)
|
||||
) {
|
||||
if (!gSaveContext.ship.stats.fileCreatedAt && !Player_InCsMode(play) &&
|
||||
((input[0].press.button && input[0].press.button != 0x8) || input[0].rel.stick_x != 0 ||
|
||||
input[0].rel.stick_y != 0)) {
|
||||
gSaveContext.ship.stats.fileCreatedAt = GetUnixTimestamp();
|
||||
}
|
||||
}
|
||||
@@ -856,22 +882,19 @@ void Play_Update(PlayState* play) {
|
||||
play->transitionCtx.setColor(&play->transitionCtx.data, RGBA8(160, 160, 160, 255));
|
||||
|
||||
if (play->transitionCtx.setEnvColor != NULL) {
|
||||
play->transitionCtx.setEnvColor(&play->transitionCtx.data,
|
||||
RGBA8(160, 160, 160, 255));
|
||||
play->transitionCtx.setEnvColor(&play->transitionCtx.data, RGBA8(160, 160, 160, 255));
|
||||
}
|
||||
} else if (play->transitionCtx.transitionType == TRANS_TYPE_FADE_GREEN) {
|
||||
play->transitionCtx.setColor(&play->transitionCtx.data, RGBA8(140, 140, 100, 255));
|
||||
|
||||
if (play->transitionCtx.setEnvColor != NULL) {
|
||||
play->transitionCtx.setEnvColor(&play->transitionCtx.data,
|
||||
RGBA8(140, 140, 100, 255));
|
||||
play->transitionCtx.setEnvColor(&play->transitionCtx.data, RGBA8(140, 140, 100, 255));
|
||||
}
|
||||
} else if (play->transitionCtx.transitionType == TRANS_TYPE_FADE_BLUE) {
|
||||
play->transitionCtx.setColor(&play->transitionCtx.data, RGBA8(70, 100, 110, 255));
|
||||
|
||||
if (play->transitionCtx.setEnvColor != NULL) {
|
||||
play->transitionCtx.setEnvColor(&play->transitionCtx.data,
|
||||
RGBA8(70, 100, 110, 255));
|
||||
play->transitionCtx.setEnvColor(&play->transitionCtx.data, RGBA8(70, 100, 110, 255));
|
||||
}
|
||||
} else {
|
||||
play->transitionCtx.setColor(&play->transitionCtx.data, RGBA8(0, 0, 0, 0));
|
||||
@@ -1036,7 +1059,8 @@ void Play_Update(PlayState* play) {
|
||||
|
||||
case TRANS_MODE_SANDSTORM:
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
|
||||
if (play->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
if (play->envCtx.sandstormPrimA < 110) {
|
||||
@@ -1074,7 +1098,8 @@ void Play_Update(PlayState* play) {
|
||||
|
||||
case TRANS_MODE_SANDSTORM_END:
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
|
||||
if (play->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
if (play->envCtx.sandstormPrimA <= 0) {
|
||||
@@ -1144,13 +1169,14 @@ void Play_Update(PlayState* play) {
|
||||
// Gameplay stat tracking
|
||||
if (!gSaveContext.ship.stats.gameComplete &&
|
||||
(!IS_BOSS_RUSH || !gSaveContext.ship.quest.data.bossRush.isPaused)) {
|
||||
gSaveContext.ship.stats.playTimer++;
|
||||
gSaveContext.ship.stats.sceneTimer++;
|
||||
gSaveContext.ship.stats.roomTimer++;
|
||||
gSaveContext.ship.stats.playTimer++;
|
||||
gSaveContext.ship.stats.sceneTimer++;
|
||||
gSaveContext.ship.stats.roomTimer++;
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && Player_GetMask(play) == PLAYER_MASK_BUNNY) {
|
||||
gSaveContext.ship.stats.count[COUNT_TIME_BUNNY_HOOD]++;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA &&
|
||||
Player_GetMask(play) == PLAYER_MASK_BUNNY) {
|
||||
gSaveContext.ship.stats.count[COUNT_TIME_BUNNY_HOOD]++;
|
||||
}
|
||||
}
|
||||
|
||||
if (play->actorCtx.freezeFlashTimer && (play->actorCtx.freezeFlashTimer-- < 5)) {
|
||||
@@ -1392,8 +1418,8 @@ void Play_Draw(PlayState* play) {
|
||||
play->billboardMtxF.mf[3][0] = play->billboardMtxF.mf[3][1] = play->billboardMtxF.mf[3][2] = 0.0f;
|
||||
// This transpose is where the viewing matrix is properly converted into a billboard matrix
|
||||
Matrix_Transpose(&play->billboardMtxF);
|
||||
play->billboardMtx = Matrix_MtxFToMtx(MATRIX_CHECKFLOATS(&play->billboardMtxF),
|
||||
Graph_Alloc(gfxCtx, sizeof(Mtx)));
|
||||
play->billboardMtx =
|
||||
Matrix_MtxFToMtx(MATRIX_CHECKFLOATS(&play->billboardMtxF), Graph_Alloc(gfxCtx, sizeof(Mtx)));
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x01, play->billboardMtx);
|
||||
|
||||
@@ -1458,7 +1484,7 @@ void Play_Draw(PlayState* play) {
|
||||
Gfx* gfxP = POLY_OPA_DISP;
|
||||
|
||||
// SOH [Port] Draw game framebuffer using our custom handling
|
||||
//func_800C24BC(&play->pauseBgPreRender, &gfxP);
|
||||
// func_800C24BC(&play->pauseBgPreRender, &gfxP);
|
||||
FB_DrawFromFramebuffer(&gfxP, gPauseFrameBuffer, 255);
|
||||
POLY_OPA_DISP = gfxP;
|
||||
|
||||
@@ -1515,8 +1541,7 @@ void Play_Draw(PlayState* play) {
|
||||
}
|
||||
|
||||
if ((HREG(80) != 10) || (HREG(83) != 0)) {
|
||||
if ((play->skyboxCtx.unk_140 != 0) &&
|
||||
(GET_ACTIVE_CAM(play)->setting != CAM_SET_PREREND_FIXED)) {
|
||||
if ((play->skyboxCtx.unk_140 != 0) && (GET_ACTIVE_CAM(play)->setting != CAM_SET_PREREND_FIXED)) {
|
||||
Vec3f quakeOffset;
|
||||
|
||||
Camera_GetSkyboxOffset(&quakeOffset, GET_ACTIVE_CAM(play));
|
||||
@@ -1713,9 +1738,7 @@ void Play_Main(GameState* thisx) {
|
||||
int newIngameTime = maxInGameDayTicks * percent;
|
||||
|
||||
gSaveContext.dayTime = newIngameTime;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
u8 PlayerGrounded(Player* player) {
|
||||
@@ -2192,8 +2215,7 @@ void Play_PerformSave(PlayState* play) {
|
||||
uint8_t prevStatus = gSaveContext.buttonStatus[0];
|
||||
|
||||
// Replicate the B button restore from minigames/epona that kaleido does
|
||||
if (gSaveContext.equips.buttonItems[0] == ITEM_SLINGSHOT ||
|
||||
gSaveContext.equips.buttonItems[0] == ITEM_BOW ||
|
||||
if (gSaveContext.equips.buttonItems[0] == ITEM_SLINGSHOT || gSaveContext.equips.buttonItems[0] == ITEM_BOW ||
|
||||
gSaveContext.equips.buttonItems[0] == ITEM_BOMBCHU ||
|
||||
gSaveContext.equips.buttonItems[0] == ITEM_FISHING_POLE ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_NONE && !Flags_GetInfTable(INFTABLE_SWORDLESS))) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "global.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA | ACTOR_FLAG_CAN_PRESS_SWITCHES)
|
||||
#define FLAGS \
|
||||
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
|
||||
ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA | ACTOR_FLAG_CAN_PRESS_SWITCHES)
|
||||
|
||||
void (*sPlayerCallInitFunc)(Actor* thisx, PlayState* play);
|
||||
void (*sPlayerCallDestroyFunc)(Actor* thisx, PlayState* play);
|
||||
|
||||
+243
-251
@@ -114,133 +114,53 @@ TextTriggerEntry sTextTriggers[] = {
|
||||
// Used to map model groups to model types for [animation, left hand, right hand, sheath, waist]
|
||||
u8 gPlayerModelTypes[PLAYER_MODELGROUP_MAX][PLAYER_MODELGROUPENTRY_MAX] = {
|
||||
/* PLAYER_MODELGROUP_0 */
|
||||
{
|
||||
PLAYER_ANIMTYPE_2,
|
||||
PLAYER_MODELTYPE_LH_OPEN,
|
||||
PLAYER_MODELTYPE_RH_SHIELD,
|
||||
PLAYER_MODELTYPE_SHEATH_16,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_2, PLAYER_MODELTYPE_LH_OPEN, PLAYER_MODELTYPE_RH_SHIELD, PLAYER_MODELTYPE_SHEATH_16,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD */
|
||||
{
|
||||
PLAYER_ANIMTYPE_1,
|
||||
PLAYER_MODELTYPE_LH_SWORD,
|
||||
PLAYER_MODELTYPE_RH_CLOSED,
|
||||
PLAYER_MODELTYPE_SHEATH_19,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_1, PLAYER_MODELTYPE_LH_SWORD, PLAYER_MODELTYPE_RH_CLOSED, PLAYER_MODELTYPE_SHEATH_19,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_SWORD_AND_SHIELD */
|
||||
{
|
||||
PLAYER_ANIMTYPE_1,
|
||||
PLAYER_MODELTYPE_LH_SWORD,
|
||||
PLAYER_MODELTYPE_RH_SHIELD,
|
||||
PLAYER_MODELTYPE_SHEATH_17,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_1, PLAYER_MODELTYPE_LH_SWORD, PLAYER_MODELTYPE_RH_SHIELD, PLAYER_MODELTYPE_SHEATH_17,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_DEFAULT */
|
||||
{
|
||||
PLAYER_ANIMTYPE_0,
|
||||
PLAYER_MODELTYPE_LH_OPEN,
|
||||
PLAYER_MODELTYPE_RH_OPEN,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_0, PLAYER_MODELTYPE_LH_OPEN, PLAYER_MODELTYPE_RH_OPEN, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_4 */
|
||||
{
|
||||
PLAYER_ANIMTYPE_0,
|
||||
PLAYER_MODELTYPE_LH_OPEN,
|
||||
PLAYER_MODELTYPE_RH_OPEN,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_0, PLAYER_MODELTYPE_LH_OPEN, PLAYER_MODELTYPE_RH_OPEN, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_BGS */
|
||||
{
|
||||
PLAYER_ANIMTYPE_3,
|
||||
PLAYER_MODELTYPE_LH_BGS,
|
||||
PLAYER_MODELTYPE_RH_CLOSED,
|
||||
PLAYER_MODELTYPE_SHEATH_19,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_3, PLAYER_MODELTYPE_LH_BGS, PLAYER_MODELTYPE_RH_CLOSED, PLAYER_MODELTYPE_SHEATH_19,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_BOW_SLINGSHOT */
|
||||
{
|
||||
PLAYER_ANIMTYPE_4,
|
||||
PLAYER_MODELTYPE_LH_CLOSED,
|
||||
PLAYER_MODELTYPE_RH_BOW_SLINGSHOT,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_4, PLAYER_MODELTYPE_LH_CLOSED, PLAYER_MODELTYPE_RH_BOW_SLINGSHOT, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_EXPLOSIVES */
|
||||
{
|
||||
PLAYER_ANIMTYPE_5,
|
||||
PLAYER_MODELTYPE_LH_OPEN,
|
||||
PLAYER_MODELTYPE_RH_OPEN,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_5, PLAYER_MODELTYPE_LH_OPEN, PLAYER_MODELTYPE_RH_OPEN, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_BOOMERANG */
|
||||
{
|
||||
PLAYER_ANIMTYPE_0,
|
||||
PLAYER_MODELTYPE_LH_BOOMERANG,
|
||||
PLAYER_MODELTYPE_RH_OPEN,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_0, PLAYER_MODELTYPE_LH_BOOMERANG, PLAYER_MODELTYPE_RH_OPEN, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_HOOKSHOT */
|
||||
{
|
||||
PLAYER_ANIMTYPE_4,
|
||||
PLAYER_MODELTYPE_LH_OPEN,
|
||||
PLAYER_MODELTYPE_RH_HOOKSHOT,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_4, PLAYER_MODELTYPE_LH_OPEN, PLAYER_MODELTYPE_RH_HOOKSHOT, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_10 */
|
||||
{
|
||||
PLAYER_ANIMTYPE_3,
|
||||
PLAYER_MODELTYPE_LH_CLOSED,
|
||||
PLAYER_MODELTYPE_RH_CLOSED,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_3, PLAYER_MODELTYPE_LH_CLOSED, PLAYER_MODELTYPE_RH_CLOSED, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_HAMMER */
|
||||
{
|
||||
PLAYER_ANIMTYPE_3,
|
||||
PLAYER_MODELTYPE_LH_HAMMER,
|
||||
PLAYER_MODELTYPE_RH_CLOSED,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_3, PLAYER_MODELTYPE_LH_HAMMER, PLAYER_MODELTYPE_RH_CLOSED, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_OCARINA */
|
||||
{
|
||||
PLAYER_ANIMTYPE_0,
|
||||
PLAYER_MODELTYPE_LH_OPEN,
|
||||
PLAYER_MODELTYPE_RH_OCARINA,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_0, PLAYER_MODELTYPE_LH_OPEN, PLAYER_MODELTYPE_RH_OCARINA, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_OOT */
|
||||
{
|
||||
PLAYER_ANIMTYPE_0,
|
||||
PLAYER_MODELTYPE_LH_OPEN,
|
||||
PLAYER_MODELTYPE_RH_OOT,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_0, PLAYER_MODELTYPE_LH_OPEN, PLAYER_MODELTYPE_RH_OOT, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_BOTTLE */
|
||||
{
|
||||
PLAYER_ANIMTYPE_0,
|
||||
PLAYER_MODELTYPE_LH_BOTTLE,
|
||||
PLAYER_MODELTYPE_RH_OPEN,
|
||||
PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_0, PLAYER_MODELTYPE_LH_BOTTLE, PLAYER_MODELTYPE_RH_OPEN, PLAYER_MODELTYPE_SHEATH_18,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
/* PLAYER_MODELGROUP_SWORD */
|
||||
{
|
||||
PLAYER_ANIMTYPE_0,
|
||||
PLAYER_MODELTYPE_LH_SWORD,
|
||||
PLAYER_MODELTYPE_RH_OPEN,
|
||||
PLAYER_MODELTYPE_SHEATH_19,
|
||||
PLAYER_MODELTYPE_WAIST
|
||||
},
|
||||
{ PLAYER_ANIMTYPE_0, PLAYER_MODELTYPE_LH_SWORD, PLAYER_MODELTYPE_RH_OPEN, PLAYER_MODELTYPE_SHEATH_19,
|
||||
PLAYER_MODELTYPE_WAIST },
|
||||
};
|
||||
|
||||
Gfx* sPlayerRightHandShieldDLs[PLAYER_SHIELD_MAX * 4] = {
|
||||
@@ -268,23 +188,35 @@ Gfx* sPlayerRightHandShieldDLs[PLAYER_SHIELD_MAX * 4] = {
|
||||
|
||||
Gfx* sSheathWithSwordDLs[(PLAYER_SHIELD_MAX + 2) * 4] = {
|
||||
// PLAYER_SHIELD_NONE
|
||||
gLinkAdultMasterSwordAndSheathNearDL, gLinkChildSwordAndSheathNearDL,
|
||||
gLinkAdultMasterSwordAndSheathFarDL, gLinkChildSwordAndSheathFarDL,
|
||||
gLinkAdultMasterSwordAndSheathNearDL,
|
||||
gLinkChildSwordAndSheathNearDL,
|
||||
gLinkAdultMasterSwordAndSheathFarDL,
|
||||
gLinkChildSwordAndSheathFarDL,
|
||||
// PLAYER_SHIELD_DEKU
|
||||
gLinkAdultMasterSwordAndSheathNearDL, gLinkChildDekuShieldSwordAndSheathNearDL,
|
||||
gLinkAdultMasterSwordAndSheathFarDL, gLinkChildDekuShieldSwordAndSheathFarDL,
|
||||
gLinkAdultMasterSwordAndSheathNearDL,
|
||||
gLinkChildDekuShieldSwordAndSheathNearDL,
|
||||
gLinkAdultMasterSwordAndSheathFarDL,
|
||||
gLinkChildDekuShieldSwordAndSheathFarDL,
|
||||
// PLAYER_SHIELD_HYLIAN
|
||||
gLinkAdultHylianShieldSwordAndSheathNearDL, gLinkChildHylianShieldSwordAndSheathNearDL,
|
||||
gLinkAdultHylianShieldSwordAndSheathFarDL, gLinkChildHylianShieldSwordAndSheathFarDL,
|
||||
gLinkAdultHylianShieldSwordAndSheathNearDL,
|
||||
gLinkChildHylianShieldSwordAndSheathNearDL,
|
||||
gLinkAdultHylianShieldSwordAndSheathFarDL,
|
||||
gLinkChildHylianShieldSwordAndSheathFarDL,
|
||||
// PLAYER_SHIELD_MIRROR
|
||||
gLinkAdultMirrorShieldSwordAndSheathNearDL, gLinkChildSwordAndSheathNearDL,
|
||||
gLinkAdultMirrorShieldSwordAndSheathFarDL, gLinkChildSwordAndSheathFarDL,
|
||||
gLinkAdultMirrorShieldSwordAndSheathNearDL,
|
||||
gLinkChildSwordAndSheathNearDL,
|
||||
gLinkAdultMirrorShieldSwordAndSheathFarDL,
|
||||
gLinkChildSwordAndSheathFarDL,
|
||||
// PLAYER_SHIELD_NONE (child, no sword)
|
||||
NULL, NULL,
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
// PLAYER_SHIELD_DEKU (child, no sword)
|
||||
NULL, gLinkChildDekuShieldWithMatrixDL,
|
||||
NULL, gLinkChildDekuShieldWithMatrixDL,
|
||||
NULL,
|
||||
gLinkChildDekuShieldWithMatrixDL,
|
||||
NULL,
|
||||
gLinkChildDekuShieldWithMatrixDL,
|
||||
};
|
||||
|
||||
Gfx* sSheathWithoutSwordDLs[(PLAYER_SHIELD_MAX + 2) * 4] = {
|
||||
@@ -322,11 +254,15 @@ Gfx* sSheathWithoutSwordDLs[(PLAYER_SHIELD_MAX + 2) * 4] = {
|
||||
|
||||
Gfx* gPlayerLeftHandBgsDLs[] = {
|
||||
// Biggoron Sword
|
||||
gLinkAdultLeftHandHoldingBgsNearDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
||||
gLinkAdultLeftHandHoldingBgsFarDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
||||
gLinkAdultLeftHandHoldingBgsNearDL,
|
||||
gLinkChildLeftHandHoldingMasterSwordDL,
|
||||
gLinkAdultLeftHandHoldingBgsFarDL,
|
||||
gLinkChildLeftHandHoldingMasterSwordDL,
|
||||
// Broken Giant's Knife
|
||||
gLinkAdultHandHoldingBrokenGiantsKnifeDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
||||
gLinkAdultHandHoldingBrokenGiantsKnifeFarDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
||||
gLinkAdultHandHoldingBrokenGiantsKnifeDL,
|
||||
gLinkChildLeftHandHoldingMasterSwordDL,
|
||||
gLinkAdultHandHoldingBrokenGiantsKnifeFarDL,
|
||||
gLinkChildLeftHandHoldingMasterSwordDL,
|
||||
};
|
||||
|
||||
Gfx* gPlayerLeftHandOpenDLs[] = {
|
||||
@@ -565,8 +501,9 @@ uint8_t Player_IsCustomLinkModel() {
|
||||
}
|
||||
|
||||
s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
|
||||
return (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (this->csAction != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
|
||||
(this->stateFlags1 & PLAYER_STATE1_LOADING) || (this->stateFlags3 & PLAYER_STATE3_FLYING_WITH_HOOKSHOT) ||
|
||||
return (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (this->csAction != 0) ||
|
||||
(play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_LOADING) ||
|
||||
(this->stateFlags3 & PLAYER_STATE3_FLYING_WITH_HOOKSHOT) ||
|
||||
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
|
||||
}
|
||||
|
||||
@@ -606,14 +543,17 @@ void Player_SetModelsForHoldingShield(Player* this) {
|
||||
if ((this->stateFlags1 & PLAYER_STATE1_SHIELDING) &&
|
||||
((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
|
||||
if ((CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
|
||||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
|
||||
!Player_HoldsTwoHandedWeapon(this)) &&
|
||||
!Player_IsChildWithHylianShield(this)) {
|
||||
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
|
||||
if (LINK_IS_CHILD && (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) && (this->currentShield == PLAYER_SHIELD_MIRROR)) {
|
||||
if (LINK_IS_CHILD && (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) &&
|
||||
(this->currentShield == PLAYER_SHIELD_MIRROR)) {
|
||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][0];
|
||||
} else if (LINK_IS_ADULT && (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) && (this->currentShield == PLAYER_SHIELD_DEKU)) {
|
||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][1];
|
||||
} else {
|
||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
|
||||
} else if (LINK_IS_ADULT && (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) &&
|
||||
(this->currentShield == PLAYER_SHIELD_DEKU)) {
|
||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][1];
|
||||
} else {
|
||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
|
||||
}
|
||||
if (this->sheathType == PLAYER_MODELTYPE_SHEATH_18) {
|
||||
this->sheathType = PLAYER_MODELTYPE_SHEATH_16;
|
||||
@@ -623,10 +563,10 @@ void Player_SetModelsForHoldingShield(Player* this) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) && LINK_IS_CHILD &&
|
||||
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
} else if ((CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) && LINK_IS_ADULT &&
|
||||
gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][1];
|
||||
gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][1];
|
||||
}
|
||||
this->modelAnimType = PLAYER_ANIMTYPE_2;
|
||||
this->itemAction = -1;
|
||||
@@ -642,13 +582,14 @@ void Player_SetModels(Player* this, s32 modelGroup) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) {
|
||||
if (LINK_IS_CHILD &&
|
||||
(this->leftHandType == PLAYER_MODELTYPE_LH_HAMMER ||
|
||||
((this->leftHandType == PLAYER_MODELTYPE_LH_SWORD || this->leftHandType == PLAYER_MODELTYPE_LH_BGS) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)))) {
|
||||
((this->leftHandType == PLAYER_MODELTYPE_LH_SWORD || this->leftHandType == PLAYER_MODELTYPE_LH_BGS) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)))) {
|
||||
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][0];
|
||||
}
|
||||
|
||||
if (LINK_IS_ADULT && (this->leftHandType == PLAYER_MODELTYPE_LH_BOOMERANG ||
|
||||
(this->leftHandType == PLAYER_MODELTYPE_LH_SWORD && gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI))) {
|
||||
(this->leftHandType == PLAYER_MODELTYPE_LH_SWORD &&
|
||||
gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI))) {
|
||||
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][1];
|
||||
}
|
||||
}
|
||||
@@ -663,7 +604,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) {
|
||||
if (LINK_IS_CHILD &&
|
||||
(this->rightHandType == PLAYER_MODELTYPE_RH_HOOKSHOT ||
|
||||
(this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_MIRROR))) {
|
||||
(this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_MIRROR))) {
|
||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][0];
|
||||
}
|
||||
if (LINK_IS_ADULT &&
|
||||
@@ -671,7 +612,9 @@ void Player_SetModels(Player* this, s32 modelGroup) {
|
||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][1];
|
||||
}
|
||||
}
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) && this->rightHandType == 11) { // If holding Bow/Slingshot
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) &&
|
||||
this->rightHandType == 11) { // If holding Bow/Slingshot
|
||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][Player_HoldsSlingshot(this)];
|
||||
}
|
||||
|
||||
@@ -680,21 +623,28 @@ void Player_SetModels(Player* this, s32 modelGroup) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) {
|
||||
if (LINK_IS_CHILD && (this->currentShield == PLAYER_SHIELD_HYLIAN && ((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS)) || (this->currentShield == PLAYER_SHIELD_MIRROR) && (gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI))) {
|
||||
if (LINK_IS_CHILD && (this->currentShield == PLAYER_SHIELD_HYLIAN &&
|
||||
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS)) ||
|
||||
(this->currentShield == PLAYER_SHIELD_MIRROR) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI))) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
} else if (LINK_IS_CHILD && this->currentShield == PLAYER_SHIELD_MIRROR && gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI &&
|
||||
this->sheathType == PLAYER_MODELTYPE_SHEATH_18) {
|
||||
} else if (LINK_IS_CHILD && this->currentShield == PLAYER_SHIELD_MIRROR &&
|
||||
gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI &&
|
||||
this->sheathType == PLAYER_MODELTYPE_SHEATH_18) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
} else if (LINK_IS_ADULT && (this->currentShield == PLAYER_SHIELD_DEKU && gSaveContext.equips.buttonItems[0] != ITEM_SWORD_MASTER) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER && this->sheathType == PLAYER_MODELTYPE_SHEATH_18 && this->currentShield == PLAYER_SHIELD_DEKU)) {
|
||||
} else if (LINK_IS_ADULT && (this->currentShield == PLAYER_SHIELD_DEKU &&
|
||||
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_MASTER) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER &&
|
||||
this->sheathType == PLAYER_MODELTYPE_SHEATH_18 && this->currentShield == PLAYER_SHIELD_DEKU)) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][1];
|
||||
} else if (LINK_IS_CHILD && this->sheathType == PLAYER_MODELTYPE_SHEATH_17 &&
|
||||
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) || (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS))) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
}
|
||||
} else if (LINK_IS_CHILD && this->sheathType == PLAYER_MODELTYPE_SHEATH_17 &&
|
||||
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS))) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Waist
|
||||
this->waistDLists = &sPlayerDListGroups[gPlayerModelTypes[modelGroup][4]][gSaveContext.linkAge];
|
||||
|
||||
@@ -756,10 +706,15 @@ void Player_ReleaseLockOn(Player* this) {
|
||||
* TODO: Learn more about this and give a name to PLAYER_STATE1_19
|
||||
*/
|
||||
void Player_ClearZTargeting(Player* this) {
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & (PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER)) ||
|
||||
(!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL)) && ((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
|
||||
this->stateFlags1 &= ~(PLAYER_STATE1_Z_TARGETING | PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS | PLAYER_STATE1_PARALLEL | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_LOCK_ON_FORCED_TO_RELEASE);
|
||||
} else if (!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER))) {
|
||||
if ((this->actor.bgCheckFlags & 1) ||
|
||||
(this->stateFlags1 & (PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER)) ||
|
||||
(!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL)) &&
|
||||
((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
|
||||
this->stateFlags1 &=
|
||||
~(PLAYER_STATE1_Z_TARGETING | PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS | PLAYER_STATE1_PARALLEL |
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_LOCK_ON_FORCED_TO_RELEASE);
|
||||
} else if (!(this->stateFlags1 &
|
||||
(PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER))) {
|
||||
this->stateFlags1 |= PLAYER_STATE1_FREEFALL;
|
||||
}
|
||||
|
||||
@@ -818,7 +773,8 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y
|
||||
s32 Player_GetStrength(void) {
|
||||
s32 strengthUpgrade = CUR_UPG_VALUE(UPG_STRENGTH);
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("ToggleStrength"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("StrengthDisabled"), 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("ToggleStrength"), 0) &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("StrengthDisabled"), 0)) {
|
||||
return PLAYER_STR_NONE;
|
||||
}
|
||||
|
||||
@@ -872,7 +828,7 @@ s32 Player_HoldsHookshot(Player* this) {
|
||||
}
|
||||
|
||||
s32 Player_HoldsBow(Player* this) {
|
||||
switch(this->heldItemAction){
|
||||
switch (this->heldItemAction) {
|
||||
case PLAYER_IA_BOW:
|
||||
case PLAYER_IA_BOW_FIRE:
|
||||
case PLAYER_IA_BOW_ICE:
|
||||
@@ -992,9 +948,12 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
|
||||
triggerEntry = &sTextTriggers[var];
|
||||
|
||||
if ((triggerEntry->flag != 0) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
|
||||
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger(CVAR_ENHANCEMENT("DisableTunicWarningText"), 0) == 0)) ||
|
||||
(((var == 0) &&
|
||||
(this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("DisableTunicWarningText"), 0) == 0)) ||
|
||||
(((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
|
||||
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger(CVAR_ENHANCEMENT("DisableTunicWarningText"), 0) == 0)))) {
|
||||
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("DisableTunicWarningText"), 0) == 0)))) {
|
||||
Message_StartTextbox(play, triggerEntry->textId, NULL);
|
||||
gSaveContext.textTriggerFlags |= triggerEntry->flag;
|
||||
}
|
||||
@@ -1016,7 +975,7 @@ u8 sEyeMouthIndexes[][2] = {
|
||||
*/
|
||||
|
||||
#if defined(MODDING) || defined(_MSC_VER) || defined(__GNUC__)
|
||||
//TODO: Formatting
|
||||
// TODO: Formatting
|
||||
void* sEyeTextures[2][8] = {
|
||||
{ gLinkAdultEyesOpenTex, gLinkAdultEyesHalfTex, gLinkAdultEyesClosedfTex, gLinkAdultEyesRollLeftTex,
|
||||
gLinkAdultEyesRollRightTex, gLinkAdultEyesShockTex, gLinkAdultEyesUnk1Tex, gLinkAdultEyesUnk2Tex },
|
||||
@@ -1067,13 +1026,12 @@ Color_RGB8 sGauntletColors[] = {
|
||||
};
|
||||
|
||||
Gfx* sBootDListGroups[][2] = {
|
||||
{ gLinkAdultLeftIronBootDL, gLinkAdultRightIronBootDL }, // PLAYER_BOOTS_IRON
|
||||
{ gLinkAdultLeftHoverBootDL, gLinkAdultRightHoverBootDL }, // PLAYER_BOOTS_HOVER
|
||||
{ gLinkAdultLeftIronBootDL, gLinkAdultRightIronBootDL }, // PLAYER_BOOTS_IRON
|
||||
{ gLinkAdultLeftHoverBootDL, gLinkAdultRightHoverBootDL }, // PLAYER_BOOTS_HOVER
|
||||
};
|
||||
|
||||
void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic,
|
||||
s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
|
||||
void* data) {
|
||||
void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic, s32 boots,
|
||||
s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* data) {
|
||||
Color_RGB8* color;
|
||||
s32 eyeIndex = (jointTable[22].x & 0xF) - 1;
|
||||
s32 mouthIndex = (jointTable[22].x >> 4) - 1;
|
||||
@@ -1129,7 +1087,8 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
|
||||
|
||||
SkelAnime_DrawFlexLod(play, skeleton, jointTable, dListCount, overrideLimbDraw, postLimbDraw, data, lod);
|
||||
|
||||
if (((CVarGetInteger(CVAR_ENHANCEMENT("FirstPersonGauntlets"), 0) && LINK_IS_ADULT) || (overrideLimbDraw != Player_OverrideLimbDrawGameplayFirstPerson)) &&
|
||||
if (((CVarGetInteger(CVAR_ENHANCEMENT("FirstPersonGauntlets"), 0) && LINK_IS_ADULT) ||
|
||||
(overrideLimbDraw != Player_OverrideLimbDrawGameplayFirstPerson)) &&
|
||||
(overrideLimbDraw != Player_OverrideLimbDrawGameplayCrawling) &&
|
||||
(gSaveContext.gameMode != GAMEMODE_END_CREDITS)) {
|
||||
if (LINK_IS_ADULT) {
|
||||
@@ -1139,21 +1098,27 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
color = &sGauntletColors[strengthUpgrade - 2];
|
||||
if (strengthUpgrade == PLAYER_STR_SILVER_G && CVarGetInteger(CVAR_COSMETIC("Gloves.SilverGauntlets.Changed"), 0)) {
|
||||
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.SilverGauntlets.Value"), sGauntletColors[PLAYER_STR_SILVER_G - 2]);
|
||||
if (strengthUpgrade == PLAYER_STR_SILVER_G &&
|
||||
CVarGetInteger(CVAR_COSMETIC("Gloves.SilverGauntlets.Changed"), 0)) {
|
||||
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.SilverGauntlets.Value"),
|
||||
sGauntletColors[PLAYER_STR_SILVER_G - 2]);
|
||||
color = &sTemp;
|
||||
} else if (strengthUpgrade == PLAYER_STR_GOLD_G && CVarGetInteger(CVAR_COSMETIC("Gloves.GoldenGauntlets.Changed"), 0)) {
|
||||
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.GoldenGauntlets.Value"), sGauntletColors[PLAYER_STR_GOLD_G - 2]);
|
||||
} else if (strengthUpgrade == PLAYER_STR_GOLD_G &&
|
||||
CVarGetInteger(CVAR_COSMETIC("Gloves.GoldenGauntlets.Changed"), 0)) {
|
||||
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.GoldenGauntlets.Value"),
|
||||
sGauntletColors[PLAYER_STR_GOLD_G - 2]);
|
||||
color = &sTemp;
|
||||
}
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultLeftGauntletPlate1DL);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultRightGauntletPlate1DL);
|
||||
gSPDisplayList(POLY_OPA_DISP++,
|
||||
(sLeftHandType == PLAYER_MODELTYPE_LH_OPEN) ? gLinkAdultLeftGauntletPlate2DL : gLinkAdultLeftGauntletPlate3DL);
|
||||
gSPDisplayList(POLY_OPA_DISP++,
|
||||
(sRightHandType == PLAYER_MODELTYPE_RH_OPEN) ? gLinkAdultRightGauntletPlate2DL : gLinkAdultRightGauntletPlate3DL);
|
||||
gSPDisplayList(POLY_OPA_DISP++, (sLeftHandType == PLAYER_MODELTYPE_LH_OPEN)
|
||||
? gLinkAdultLeftGauntletPlate2DL
|
||||
: gLinkAdultLeftGauntletPlate3DL);
|
||||
gSPDisplayList(POLY_OPA_DISP++, (sRightHandType == PLAYER_MODELTYPE_RH_OPEN)
|
||||
? gLinkAdultRightGauntletPlate2DL
|
||||
: gLinkAdultRightGauntletPlate3DL);
|
||||
}
|
||||
|
||||
if (boots != 0) {
|
||||
@@ -1186,8 +1151,8 @@ f32 D_80126068[] = { 5.0f, 3.0f };
|
||||
|
||||
Vec3f D_80126070 = { 0.0f, -300.0f, 0.0f };
|
||||
|
||||
void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot,
|
||||
s32 thighLimbIndex, s32 shinLimbIndex, s32 footLimbIndex) {
|
||||
void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, s32 thighLimbIndex,
|
||||
s32 shinLimbIndex, s32 footLimbIndex) {
|
||||
Vec3f spA4;
|
||||
Vec3f sp98;
|
||||
Vec3f footprintPos;
|
||||
@@ -1279,18 +1244,21 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
|
||||
}
|
||||
}
|
||||
|
||||
s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
void* thisx) {
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("ScaleAdultEquipmentAsChild"), 0) && LINK_IS_CHILD) {
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0) &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("ScaleAdultEquipmentAsChild"), 0) && LINK_IS_CHILD) {
|
||||
if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI && sLeftHandType == PLAYER_MODELTYPE_LH_SWORD) ||
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI &&
|
||||
sLeftHandType == PLAYER_MODELTYPE_LH_SWORD) ||
|
||||
(sLeftHandType == PLAYER_MODELTYPE_LH_BGS) || (sLeftHandType == PLAYER_MODELTYPE_LH_HAMMER)) {
|
||||
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
if (limbIndex == PLAYER_LIMB_R_HAND) {
|
||||
if ((this->currentShield == PLAYER_SHIELD_MIRROR && sRightHandType == PLAYER_MODELTYPE_RH_SHIELD) ||
|
||||
if ((this->currentShield == PLAYER_SHIELD_MIRROR && sRightHandType == PLAYER_MODELTYPE_RH_SHIELD) ||
|
||||
sRightHandType == PLAYER_MODELTYPE_RH_HOOKSHOT ||
|
||||
(sRightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT && Player_HoldsBow(this))) {
|
||||
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
|
||||
@@ -1307,10 +1275,8 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
|
||||
Matrix_Translate(218, -100, 62, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
|
||||
}
|
||||
if ((this->currentShield == PLAYER_SHIELD_DEKU &&
|
||||
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI &&
|
||||
(this->sheathType == PLAYER_MODELTYPE_SHEATH_16 ||
|
||||
this->sheathType == PLAYER_MODELTYPE_SHEATH_17))) {
|
||||
if ((this->currentShield == PLAYER_SHIELD_DEKU && gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI &&
|
||||
(this->sheathType == PLAYER_MODELTYPE_SHEATH_16 || this->sheathType == PLAYER_MODELTYPE_SHEATH_17))) {
|
||||
Matrix_Translate(218, -100, 62, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
|
||||
}
|
||||
@@ -1354,7 +1320,8 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
|
||||
if (scale > 1.2f) {
|
||||
Matrix_Translate(-((LINK_IS_ADULT ? 320.0f : 200.0f) * scale), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else if (scale < 1.0f) {
|
||||
Matrix_Translate((LINK_IS_ADULT ? 3600.0f : 2900.0f) * ABS(scale - 1.0f), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate((LINK_IS_ADULT ? 3600.0f : 2900.0f) * ABS(scale - 1.0f), 0.0f, 0.0f,
|
||||
MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
rot->x += this->headLimbRot.z;
|
||||
@@ -1395,20 +1362,22 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
void* thisx) {
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
if (!Player_OverrideLimbDrawGameplayCommon(play, limbIndex, dList, pos, rot, thisx))
|
||||
{
|
||||
if (!Player_OverrideLimbDrawGameplayCommon(play, limbIndex, dList, pos, rot, thisx)) {
|
||||
if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||
Gfx** dLists = this->leftHandDLists;
|
||||
|
||||
if ((sLeftHandType == PLAYER_MODELTYPE_LH_BGS) && (gSaveContext.swordHealth <= 0.0f)) {
|
||||
dLists += 4;
|
||||
} else if ((sLeftHandType == PLAYER_MODELTYPE_LH_BOOMERANG) && (this->stateFlags1 & PLAYER_STATE1_BOOMERANG_THROWN)) {
|
||||
} else if ((sLeftHandType == PLAYER_MODELTYPE_LH_BOOMERANG) &&
|
||||
(this->stateFlags1 & PLAYER_STATE1_BOOMERANG_THROWN)) {
|
||||
dLists = &gPlayerLeftHandOpenDLs[gSaveContext.linkAge];
|
||||
sLeftHandType = PLAYER_MODELTYPE_LH_OPEN;
|
||||
} else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
|
||||
} else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speedXZ > 2.0f) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
|
||||
dLists = &gPlayerLeftHandClosedDLs[gSaveContext.linkAge];
|
||||
sLeftHandType = PLAYER_MODELTYPE_LH_CLOSED;
|
||||
}
|
||||
@@ -1419,7 +1388,8 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
|
||||
|
||||
if (sRightHandType == PLAYER_MODELTYPE_RH_SHIELD) {
|
||||
dLists += this->currentShield * 4;
|
||||
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
|
||||
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_OPEN) && (this->actor.speedXZ > 2.0f) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
|
||||
dLists = &sPlayerRightHandClosedDLs[gSaveContext.linkAge];
|
||||
sRightHandType = PLAYER_MODELTYPE_RH_CLOSED;
|
||||
}
|
||||
@@ -1434,9 +1404,14 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
|
||||
dLists += PLAYER_SHIELD_MAX * 4;
|
||||
}
|
||||
} else if (!CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0) || (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0) &&
|
||||
((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_MASTER && gSaveContext.equips.buttonItems[0] != ITEM_SWORD_BGS) && this->currentShield == PLAYER_SHIELD_DEKU))) {
|
||||
if (!LINK_IS_ADULT && ((this->sheathType == PLAYER_MODELTYPE_SHEATH_16) || (this->sheathType == PLAYER_MODELTYPE_SHEATH_17)) &&
|
||||
} else if (!CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0) ||
|
||||
(CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0) &&
|
||||
((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_MASTER &&
|
||||
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_BGS) &&
|
||||
this->currentShield == PLAYER_SHIELD_DEKU))) {
|
||||
if (!LINK_IS_ADULT &&
|
||||
((this->sheathType == PLAYER_MODELTYPE_SHEATH_16) ||
|
||||
(this->sheathType == PLAYER_MODELTYPE_SHEATH_17)) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
|
||||
dLists = &sSheathWithSwordDLs[PLAYER_SHIELD_MAX * 4];
|
||||
}
|
||||
@@ -1448,9 +1423,8 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
|
||||
*dList = NULL;
|
||||
}
|
||||
|
||||
|
||||
} else if (limbIndex == PLAYER_LIMB_WAIST) {
|
||||
|
||||
|
||||
if (!Player_IsCustomLinkModel()) {
|
||||
*dList = ResourceMgr_LoadGfxByName(
|
||||
this->waistDLists[sDListsLodOffset]); // NOTE: This needs to be disabled when using custom
|
||||
@@ -1467,7 +1441,8 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
void* thisx) {
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
if (!Player_OverrideLimbDrawGameplayCommon(play, limbIndex, dList, pos, rot, thisx)) {
|
||||
@@ -1477,7 +1452,9 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
|
||||
*dList = sFirstPersonLeftForearmDLs[gSaveContext.linkAge];
|
||||
} else if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||
s32 handOutDlIndex = gSaveContext.linkAge;
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) &&
|
||||
LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
|
||||
handOutDlIndex = 1;
|
||||
}
|
||||
*dList = sFirstPersonLeftHandDLs[handOutDlIndex];
|
||||
@@ -1487,7 +1464,8 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
|
||||
*dList = sFirstPersonForearmDLs[gSaveContext.linkAge];
|
||||
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
|
||||
s32 firstPersonWeaponIndex = gSaveContext.linkAge;
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) {
|
||||
if (Player_HoldsBow(this)) {
|
||||
firstPersonWeaponIndex = 0;
|
||||
} else if (Player_HoldsSlingshot(this)) {
|
||||
@@ -1504,7 +1482,8 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
void* thisx) {
|
||||
if (!Player_OverrideLimbDrawGameplayCommon(play, limbIndex, dList, pos, rot, thisx)) {
|
||||
*dList = NULL;
|
||||
}
|
||||
@@ -1512,8 +1491,7 @@ s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx*
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 func_80090480(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponInfo, Vec3f* newTip,
|
||||
Vec3f* newBase) {
|
||||
u8 func_80090480(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponInfo, Vec3f* newTip, Vec3f* newBase) {
|
||||
if (weaponInfo->active == 0) {
|
||||
if (collider != NULL) {
|
||||
Collider_ResetQuadAT(play, &collider->base);
|
||||
@@ -1588,7 +1566,8 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) {
|
||||
&this->meleeWeaponInfo[0].base);
|
||||
}
|
||||
|
||||
if ((this->meleeWeaponState > 0) && ((this->meleeWeaponAnimation < 0x18) || (this->stateFlags2 & PLAYER_STATE2_SPIN_ATTACKING))) {
|
||||
if ((this->meleeWeaponState > 0) &&
|
||||
((this->meleeWeaponAnimation < 0x18) || (this->stateFlags2 & PLAYER_STATE2_SPIN_ATTACKING))) {
|
||||
func_80090480(play, &this->meleeWeaponQuads[0], &this->meleeWeaponInfo[1], &newTipPos[1], &newBasePos[1]);
|
||||
func_80090480(play, &this->meleeWeaponQuads[1], &this->meleeWeaponInfo[2], &newTipPos[2], &newBasePos[2]);
|
||||
}
|
||||
@@ -1670,7 +1649,8 @@ void Player_DrawGetItemImpl(PlayState* play, Player* this, Vec3f* refPos, s32 dr
|
||||
}
|
||||
|
||||
void Player_DrawGetItem(PlayState* play, Player* this) {
|
||||
//if (!this->giObjectLoading || !osRecvMesg(&this->giObjectLoadQueue, NULL, OS_MESG_NOBLOCK)) // OTRTODO: Do something about osRecvMesg here...
|
||||
// if (!this->giObjectLoading || !osRecvMesg(&this->giObjectLoadQueue, NULL, OS_MESG_NOBLOCK)) // OTRTODO: Do
|
||||
// something about osRecvMesg here...
|
||||
{
|
||||
this->giObjectLoading = false;
|
||||
Player_DrawGetItemImpl(play, this, &sGetItemRefPos, ABS(this->unk_862));
|
||||
@@ -1725,7 +1705,8 @@ void Player_DrawHookshotReticle(PlayState* play, Player* this, f32 hookshotRange
|
||||
gSPTexture(OVERLAY_DISP++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gLinkAdultHookshotReticleTex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
if (SurfaceType_IsHookshotSurface(&play->colCtx, colPoly, bgId) && CVarGetInteger(CVAR_ENHANCEMENT("HookshotableReticle"), false)) {
|
||||
if (SurfaceType_IsHookshotSurface(&play->colCtx, colPoly, bgId) &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("HookshotableReticle"), false)) {
|
||||
const Color_RGBA8 defaultColor = { .r = 0, .g = 255, .b = 0, .a = 255 };
|
||||
const Color_RGBA8 color = CVarGetColor(CVAR_COSMETIC("HookshotReticle.Target.Value"), defaultColor);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, color.r, color.g, color.b, color.a);
|
||||
@@ -1748,7 +1729,8 @@ f32 sMeleeWeaponLengths[] = {
|
||||
};
|
||||
|
||||
f32 sSwordTypes[] = {
|
||||
TRAIL_TYPE_REST, TRAIL_TYPE_MASTER_SWORD, TRAIL_TYPE_KOKIRI_SWORD, TRAIL_TYPE_BIGGORON_SWORD, TRAIL_TYPE_REST, TRAIL_TYPE_HAMMER,
|
||||
TRAIL_TYPE_REST, TRAIL_TYPE_MASTER_SWORD, TRAIL_TYPE_KOKIRI_SWORD,
|
||||
TRAIL_TYPE_BIGGORON_SWORD, TRAIL_TYPE_REST, TRAIL_TYPE_HAMMER,
|
||||
};
|
||||
|
||||
Gfx* sBottleDLists[] = { gLinkAdultBottleDL, gLinkChildBottleDL };
|
||||
@@ -1762,7 +1744,7 @@ Color_RGB8 sBottleColors[] = {
|
||||
Vec3f sLeftHandArrowVec3 = { 398.0f, 1419.0f, 244.0f };
|
||||
|
||||
BowStringData sBowStringData[] = {
|
||||
{ gLinkAdultBowStringDL, { 0.0f, -360.4f, 0.0f } }, // bow
|
||||
{ gLinkAdultBowStringDL, { 0.0f, -360.4f, 0.0f } }, // bow
|
||||
{ gLinkChildSlingshotStringDL, { 606.0f, 236.0f, 0.0f } }, // slingshot
|
||||
};
|
||||
|
||||
@@ -1832,8 +1814,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
Matrix_RotateZYX(-0x8000, 0, 0x4000, MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, this->unk_85C, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gLinkChildLinkDekuStickDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -1844,7 +1825,8 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
D_80126080.x = 1500.0f;
|
||||
} else {
|
||||
D_80126080.x = sMeleeWeaponLengths[Player_GetMeleeWeaponHeld(this)];
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), sSwordTypes[Player_GetMeleeWeaponHeld(this)]);
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex),
|
||||
sSwordTypes[Player_GetMeleeWeaponHeld(this)]);
|
||||
}
|
||||
|
||||
func_80090A28(this, spE4);
|
||||
@@ -1854,8 +1836,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, bottleColor->r, bottleColor->g, bottleColor->b, 0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sBottleDLists[(gSaveContext.linkAge)]);
|
||||
|
||||
@@ -1892,9 +1873,11 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
|
||||
if (this->rightHandType == PLAYER_MODELTYPE_RH_FF) {
|
||||
Matrix_Get(&this->shieldMf);
|
||||
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT) || (this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT_2)) {
|
||||
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT) ||
|
||||
(this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT_2)) {
|
||||
s32 stringModelToUse = gSaveContext.linkAge;
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) {
|
||||
stringModelToUse = Player_HoldsSlingshot(this);
|
||||
}
|
||||
BowStringData* stringData = &sBowStringData[stringModelToUse];
|
||||
@@ -1930,8 +1913,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
Matrix_RotateZ(this->unk_858 * -0.2f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, stringData->dList);
|
||||
|
||||
Matrix_Pop();
|
||||
@@ -1943,8 +1925,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
}
|
||||
|
||||
if (this->actor.scale.y >= 0.0f) {
|
||||
if ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ||
|
||||
(this->heldItemAction == PLAYER_IA_LONGSHOT)) {
|
||||
if ((this->heldItemAction == PLAYER_IA_HOOKSHOT) || (this->heldItemAction == PLAYER_IA_LONGSHOT)) {
|
||||
Matrix_MultVec3f(&D_80126184, &this->unk_3C8);
|
||||
|
||||
if (heldActor != NULL) {
|
||||
@@ -1960,16 +1941,16 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
if (func_8002DD78(this) != 0) {
|
||||
Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
|
||||
Player_DrawHookshotReticle(
|
||||
play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f));
|
||||
play, this,
|
||||
((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) *
|
||||
CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f));
|
||||
}
|
||||
}
|
||||
|
||||
// #region SOH [Enhancement]
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("BowReticle"), 0) && (
|
||||
(this->heldItemAction == PLAYER_IA_BOW_FIRE) ||
|
||||
(this->heldItemAction == PLAYER_IA_BOW_ICE) ||
|
||||
(this->heldItemAction == PLAYER_IA_BOW_LIGHT) ||
|
||||
(this->heldItemAction == PLAYER_IA_BOW) ||
|
||||
// #region SOH [Enhancement]
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("BowReticle"), 0) &&
|
||||
((this->heldItemAction == PLAYER_IA_BOW_FIRE) || (this->heldItemAction == PLAYER_IA_BOW_ICE) ||
|
||||
(this->heldItemAction == PLAYER_IA_BOW_LIGHT) || (this->heldItemAction == PLAYER_IA_BOW) ||
|
||||
(this->heldItemAction == PLAYER_IA_SLINGSHOT))) {
|
||||
if (heldActor != NULL) {
|
||||
MtxF sp44;
|
||||
@@ -1983,13 +1964,15 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
Player_DrawHookshotReticle(play, this, RETICLE_MAX);
|
||||
}
|
||||
}
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("BoomerangReticle"), 0) && (this->heldItemAction == PLAYER_IA_BOOMERANG)) {
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("BoomerangReticle"), 0) &&
|
||||
(this->heldItemAction == PLAYER_IA_BOOMERANG)) {
|
||||
if (Player_HoldsBoomerang(this)) {
|
||||
if (LINK_IS_ADULT) {
|
||||
Matrix_RotateZYX(BoomerangViewAdult.x, BoomerangViewAdult.y, BoomerangViewAdult.z,
|
||||
MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_RotateZYX(BoomerangViewChild.x, BoomerangViewChild.y, BoomerangViewChild.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(BoomerangViewChild.x, BoomerangViewChild.y, BoomerangViewChild.z,
|
||||
MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (Player_AimsBoomerang(this)) {
|
||||
@@ -1997,11 +1980,12 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
Player_DrawHookshotReticle(play, this, RETICLE_MAX);
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
// #endregion
|
||||
}
|
||||
|
||||
if ((this->unk_862 != 0) || ((func_8002DD6C(this) == 0) && (heldActor != NULL))) {
|
||||
if (!(this->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) && (this->unk_862 != 0) && (this->exchangeItemId != EXCH_ITEM_NONE)) {
|
||||
if (!(this->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) && (this->unk_862 != 0) &&
|
||||
(this->exchangeItemId != EXCH_ITEM_NONE)) {
|
||||
Math_Vec3f_Copy(&sGetItemRefPos, &this->leftHandPos);
|
||||
} else {
|
||||
sGetItemRefPos.x = (this->bodyPartsPos[15].x + this->leftHandPos.x) * 0.5f;
|
||||
@@ -2016,7 +2000,8 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
}
|
||||
} else if (this->actor.scale.y >= 0.0f) {
|
||||
if (limbIndex == PLAYER_LIMB_SHEATH) {
|
||||
if ((this->rightHandType != PLAYER_MODELTYPE_RH_SHIELD) && (this->rightHandType != PLAYER_MODELTYPE_RH_FF)) {
|
||||
if ((this->rightHandType != PLAYER_MODELTYPE_RH_SHIELD) &&
|
||||
(this->rightHandType != PLAYER_MODELTYPE_RH_FF)) {
|
||||
if (Player_IsChildWithHylianShield(this)) {
|
||||
Player_UpdateShieldCollider(play, this, &this->shieldQuad, sSheathLimbModelShieldQuadVertices);
|
||||
}
|
||||
@@ -2052,13 +2037,13 @@ u32 func_80091738(PlayState* play, u8* segment, SkelAnime* skelAnime) {
|
||||
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800);
|
||||
|
||||
SkelAnime_InitLink(play, skelAnime, gPlayerSkelHeaders[gSaveContext.linkAge], &gPlayerAnim_link_normal_wait, 9,
|
||||
ptr, ptr, PLAYER_LIMB_MAX);
|
||||
SkelAnime_InitLink(play, skelAnime, gPlayerSkelHeaders[gSaveContext.linkAge], &gPlayerAnim_link_normal_wait, 9, ptr,
|
||||
ptr, PLAYER_LIMB_MAX);
|
||||
|
||||
return size + 0x8800 + 0x90;
|
||||
}
|
||||
|
||||
u8 sPauseModelGroupBySword[] = {
|
||||
u8 sPauseModelGroupBySword[] = {
|
||||
PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_SWORD_KOKIRI
|
||||
PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_SWORD_MASTER
|
||||
PLAYER_MODELGROUP_BGS, // PLAYER_SWORD_BIGGORON
|
||||
@@ -2068,13 +2053,15 @@ s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
u8* playerSwordAndShield = arg;
|
||||
// SOH: Ensure positive value from playerSwordAndShield[] to avoid OOB array access.
|
||||
// This can occur in the case where playerSwordAndShield[0] is PLAYER_SWORD_NONE
|
||||
u8 modelGroup = sPauseModelGroupBySword[playerSwordAndShield[0] > 0 ? playerSwordAndShield[0] - PLAYER_SWORD_KOKIRI : 0];
|
||||
u8 modelGroup =
|
||||
sPauseModelGroupBySword[playerSwordAndShield[0] > 0 ? playerSwordAndShield[0] - PLAYER_SWORD_KOKIRI : 0];
|
||||
s32 type;
|
||||
s32 dListOffset = 0;
|
||||
Gfx** dLists;
|
||||
size_t ptrSize = sizeof(uint32_t);
|
||||
|
||||
if ((modelGroup == PLAYER_MODELGROUP_SWORD_AND_SHIELD) && !LINK_IS_ADULT && (playerSwordAndShield[1] == PLAYER_SHIELD_HYLIAN)) {
|
||||
if ((modelGroup == PLAYER_MODELGROUP_SWORD_AND_SHIELD) && !LINK_IS_ADULT &&
|
||||
(playerSwordAndShield[1] == PLAYER_SHIELD_HYLIAN)) {
|
||||
modelGroup = PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD;
|
||||
}
|
||||
|
||||
@@ -2082,7 +2069,7 @@ s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
type = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_LEFT_HAND];
|
||||
sLeftHandType = type;
|
||||
|
||||
// SOH: Handle unexpected swordless case. Previously OOB array access is avoided, but we want the
|
||||
// SOH: Handle unexpected swordless case. Previously OOB array access is avoided, but we want the
|
||||
// hand model-type to be set to open (otherwise it is set to holding sword model-type)
|
||||
if (playerSwordAndShield[0] == PLAYER_SWORD_NONE) {
|
||||
type = PLAYER_MODELTYPE_LH_OPEN;
|
||||
@@ -2104,7 +2091,7 @@ s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
}
|
||||
} else if (limbIndex == PLAYER_LIMB_WAIST) {
|
||||
type = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_WAIST];
|
||||
|
||||
|
||||
if (Player_IsCustomLinkModel()) {
|
||||
return 0;
|
||||
}
|
||||
@@ -2224,8 +2211,11 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
|
||||
playerSwordAndShield[0] = sword;
|
||||
playerSwordAndShield[1] = shield;
|
||||
|
||||
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger(CVAR_ENHANCEMENT("PauseMenuAnimatedLink"), 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
|
||||
pos->y - (CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0) ? 16 : 0), pos->z, rot);
|
||||
Matrix_SetTranslateRotateYXZ(
|
||||
pos->x - ((CVarGetInteger(CVAR_ENHANCEMENT("PauseMenuAnimatedLink"), 0) && LINK_AGE_IN_YEARS == YEARS_ADULT)
|
||||
? 25
|
||||
: 0),
|
||||
pos->y - (CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0) ? 16 : 0), pos->z, rot);
|
||||
Matrix_Scale(scale * (mirrorWorldActive ? -1 : 1), scale, scale, MTXMODE_APPLY);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x04, gameplayKeep);
|
||||
@@ -2246,7 +2236,7 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
|
||||
|
||||
if (CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0)) {
|
||||
Matrix_SetTranslateRotateYXZ(pos->x - (LINK_AGE_IN_YEARS == YEARS_ADULT ? 25 : 0),
|
||||
pos->y + 280 + (LINK_AGE_IN_YEARS == YEARS_ADULT ? 48 : 0), pos->z, rot);
|
||||
pos->y + 280 + (LINK_AGE_IN_YEARS == YEARS_ADULT ? 48 : 0), pos->z, rot);
|
||||
Matrix_Scale(scale * (mirrorWorldActive ? -1 : 1), scale * 1, scale * 1, MTXMODE_APPLY);
|
||||
|
||||
Pause_DrawTriforceSpot(play, 1);
|
||||
@@ -2266,8 +2256,8 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale,
|
||||
s32 sword, s32 tunic, s32 shield, s32 boots) {
|
||||
void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale, s32 sword,
|
||||
s32 tunic, s32 shield, s32 boots) {
|
||||
Input* p1Input = &play->state.input[0];
|
||||
Vec3f eye = { 0.0f, 0.0f, -400.0f };
|
||||
Vec3f at = { 0.0f, 0.0f, 0.0f };
|
||||
@@ -2279,12 +2269,14 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
|
||||
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800);
|
||||
|
||||
uintptr_t* PauseMenuAnimSet[4] = {
|
||||
// IDLE // Two Handed // No shield // Kid Hylian Shield
|
||||
gPlayerAnim_link_normal_wait, gPlayerAnim_link_fighter_wait_long, gPlayerAnim_link_normal_wait_free, gPlayerAnim_link_normal_wait_free
|
||||
uintptr_t* PauseMenuAnimSet[4] = { // IDLE // Two Handed // No shield //
|
||||
// Kid Hylian Shield
|
||||
gPlayerAnim_link_normal_wait, gPlayerAnim_link_fighter_wait_long,
|
||||
gPlayerAnim_link_normal_wait_free, gPlayerAnim_link_normal_wait_free
|
||||
};
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("PauseMenuAnimatedLink"), 0) || CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("PauseMenuAnimatedLink"), 0) ||
|
||||
CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0)) {
|
||||
uintptr_t anim = 0; // Initialise anim
|
||||
|
||||
s16 EquipedStance;
|
||||
|
||||
@@ -1520,7 +1520,8 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
|
||||
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL);
|
||||
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_ZDZ(G_MAXFBZ, 0) << 16) | GPACK_ZDZ(G_MAXFBZ, 0));
|
||||
gDPFillWideRectangle(POLY_OPA_DISP++, OTRGetRectDimensionFromLeftEdge(0), letterboxSize, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - letterboxSize - 1);
|
||||
gDPFillWideRectangle(POLY_OPA_DISP++, OTRGetRectDimensionFromLeftEdge(0), letterboxSize,
|
||||
OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - letterboxSize - 1);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
// Fill the whole screen with the base color
|
||||
@@ -1529,7 +1530,8 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
|
||||
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL);
|
||||
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1));
|
||||
gDPFillWideRectangle(POLY_OPA_DISP++, OTRGetRectDimensionFromLeftEdge(0), letterboxSize, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - letterboxSize - 1);
|
||||
gDPFillWideRectangle(POLY_OPA_DISP++, OTRGetRectDimensionFromLeftEdge(0), letterboxSize,
|
||||
OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - letterboxSize - 1);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
// Draw the letterbox if applicable (uses the same color as the screen base)
|
||||
@@ -1538,8 +1540,10 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
|
||||
gDPSetCycleType(OVERLAY_DISP++, G_CYC_FILL);
|
||||
gDPSetRenderMode(OVERLAY_DISP++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPSetFillColor(OVERLAY_DISP++, (GPACK_RGBA5551(r, g, b, 1) << 16) | GPACK_RGBA5551(r, g, b, 1));
|
||||
gDPFillWideRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), letterboxSize - 1);
|
||||
gDPFillWideRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromLeftEdge(0), gScreenHeight - letterboxSize, OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - 1);
|
||||
gDPFillWideRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromLeftEdge(0), 0,
|
||||
OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), letterboxSize - 1);
|
||||
gDPFillWideRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromLeftEdge(0), gScreenHeight - letterboxSize,
|
||||
OTRGetRectDimensionFromRightEdge(gScreenWidth - 1), gScreenHeight - 1);
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
}
|
||||
}
|
||||
|
||||
+26
-29
@@ -116,13 +116,13 @@ void func_80095D04(PlayState* play, Room* room, u32 flags) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
if (flags & 1) {
|
||||
func_800342EC(&D_801270A0, play);
|
||||
//gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
|
||||
// gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
|
||||
func_80093C80(play);
|
||||
gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
}
|
||||
if (flags & 2) {
|
||||
func_8003435C(&D_801270A0, play);
|
||||
//gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
|
||||
// gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
}
|
||||
@@ -139,8 +139,7 @@ void func_80095D04(PlayState* play, Room* room, u32 flags) {
|
||||
sp90.y = polygonDlist->pos.y;
|
||||
sp90.z = polygonDlist->pos.z;
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &sp90, &sp84, &sp80);
|
||||
if (-(f32)polygonDlist->unk_06 < sp84.z)
|
||||
{
|
||||
if (-(f32)polygonDlist->unk_06 < sp84.z) {
|
||||
temp_f2 = sp84.z - polygonDlist->unk_06;
|
||||
if (temp_f2 < play->lightCtx.fogFar) {
|
||||
phi_v0 = spB4;
|
||||
@@ -184,8 +183,7 @@ void func_80095D04(PlayState* play, Room* room, u32 flags) {
|
||||
Gfx* temp2;
|
||||
|
||||
polygonDlist = spB4->unk_00;
|
||||
if (iREG(86) != 0)
|
||||
{
|
||||
if (iREG(86) != 0) {
|
||||
temp = sp78;
|
||||
for (phi_v1 = 0; phi_v1 < polygon2->num; phi_v1++, temp++) {
|
||||
if (polygonDlist == temp) {
|
||||
@@ -193,8 +191,7 @@ void func_80095D04(PlayState* play, Room* room, u32 flags) {
|
||||
}
|
||||
}
|
||||
|
||||
if (((iREG(86) == 1) && (iREG(89) >= sp9C)) || ((iREG(86) == 2) && (iREG(89) == sp9C)))
|
||||
{
|
||||
if (((iREG(86) == 1) && (iREG(89) >= sp9C)) || ((iREG(86) == 2) && (iREG(89) == sp9C))) {
|
||||
if (flags & 1) {
|
||||
temp2 = polygonDlist->opa;
|
||||
if (temp2 != NULL) {
|
||||
@@ -238,7 +235,7 @@ s32 swapAndConvertJPEG(void* data) {
|
||||
if (BE32SWAP(*(u32*)data) == JPEG_MARKER) {
|
||||
size_t size = 320 * 240 * 2;
|
||||
|
||||
char *decodedJpeg = ResourceMgr_LoadJPEG(data, size);
|
||||
char* decodedJpeg = ResourceMgr_LoadJPEG(data, size);
|
||||
|
||||
osSyncPrintf("Expanding jpeg data\n");
|
||||
osSyncPrintf("Work buffer address (Z buffer) %08x\n", gZBuffer);
|
||||
@@ -257,7 +254,6 @@ s32 swapAndConvertJPEG(void* data) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tlutMode,
|
||||
u16 tlutCount, f32 offsetX, f32 offsetY) {
|
||||
Gfx* gfx = *gfxP;
|
||||
@@ -285,7 +281,7 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei
|
||||
ResourceMgr_UnloadOriginalWhenAltExists((char*)tex);
|
||||
|
||||
if (ResourceMgr_ResourceIsBackground((char*)tex)) {
|
||||
char* blob = (char*)ResourceGetDataByName((char *)tex);
|
||||
char* blob = (char*)ResourceGetDataByName((char*)tex);
|
||||
swapAndConvertJPEG(blob);
|
||||
bg->b.imagePtr = (uintptr_t)blob;
|
||||
}
|
||||
@@ -318,10 +314,9 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei
|
||||
gDPSetOtherMode(gfx++, tlutMode | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE,
|
||||
G_AC_THRESHOLD | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
|
||||
|
||||
gDPLoadMultiTile(gfx++, bg->b.imagePtr, 0,
|
||||
G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0, 0, 0, 0 + 31,
|
||||
0 + 31, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadMultiTile(gfx++, bg->b.imagePtr, 0, G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0, 0, 0, 0 + 31,
|
||||
0 + 31, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD);
|
||||
|
||||
gSPBgRectCopy(gfx++, bg);
|
||||
} else {
|
||||
@@ -384,9 +379,10 @@ void func_80096680(PlayState* play, Room* room, u32 flags) {
|
||||
spA8 = POLY_OPA_DISP;
|
||||
Camera_GetSkyboxOffset(&sp60, camera);
|
||||
Room_DrawBackground2D(&spA8, polygon1->single.source, polygon1->single.tlut, polygon1->single.width,
|
||||
polygon1->single.height, polygon1->single.fmt, polygon1->single.siz,
|
||||
polygon1->single.mode0, polygon1->single.tlutCount,
|
||||
(sp60.x + sp60.z) * 1.2f + sp60.y * 0.6f, sp60.y * 2.4f + (sp60.x + sp60.z) * 0.3f);
|
||||
polygon1->single.height, polygon1->single.fmt, polygon1->single.siz,
|
||||
polygon1->single.mode0, polygon1->single.tlutCount,
|
||||
(sp60.x + sp60.z) * 1.2f + sp60.y * 0.6f,
|
||||
sp60.y * 2.4f + (sp60.x + sp60.z) * 0.3f);
|
||||
POLY_OPA_DISP = spA8;
|
||||
}
|
||||
|
||||
@@ -414,9 +410,10 @@ BgImage* func_80096A74(PolygonType1* polygon1, PlayState* play) {
|
||||
|
||||
camera = GET_ACTIVE_CAM(play);
|
||||
camId = camera->camDataIdx;
|
||||
if (camId == -1 && (CVarGetInteger(CVAR_CHEAT("NoRestrictItems"), 0) || (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Enabled"), 0)))) {
|
||||
if (camId == -1 && (CVarGetInteger(CVAR_CHEAT("NoRestrictItems"), 0) ||
|
||||
(CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Enabled"), 0)))) {
|
||||
// This prevents a crash when using items that change the
|
||||
// camera (such as din's fire), voiding out or dying on
|
||||
// camera (such as din's fire), voiding out or dying on
|
||||
// scenes with prerendered backgrounds.
|
||||
return NULL;
|
||||
}
|
||||
@@ -484,9 +481,10 @@ void func_80096B6C(PlayState* play, Room* room, u32 flags) {
|
||||
Vec3f sp5C;
|
||||
spA8 = POLY_OPA_DISP;
|
||||
Camera_GetSkyboxOffset(&sp5C, camera);
|
||||
Room_DrawBackground2D(&spA8, bgImage->source, bgImage->tlut, bgImage->width, bgImage->height, bgImage->fmt,
|
||||
bgImage->siz, bgImage->mode0, bgImage->tlutCount,
|
||||
(sp5C.x + sp5C.z) * 1.2f + sp5C.y * 0.6f, sp5C.y * 2.4f + (sp5C.x + sp5C.z) * 0.3f);
|
||||
Room_DrawBackground2D(&spA8, bgImage->source, bgImage->tlut, bgImage->width, bgImage->height,
|
||||
bgImage->fmt, bgImage->siz, bgImage->mode0, bgImage->tlutCount,
|
||||
(sp5C.x + sp5C.z) * 1.2f + sp5C.y * 0.6f,
|
||||
sp5C.y * 2.4f + (sp5C.x + sp5C.z) * 0.3f);
|
||||
POLY_OPA_DISP = spA8;
|
||||
}
|
||||
|
||||
@@ -598,7 +596,8 @@ s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) {
|
||||
assert(roomNum < play->numRooms);
|
||||
|
||||
size = play->roomList[roomNum].vromEnd - play->roomList[roomNum].vromStart;
|
||||
roomCtx->unk_34 = (void*)ALIGN16((intptr_t)roomCtx->bufPtrs[roomCtx->unk_30] - ((size + 8) * roomCtx->unk_30 + 7));
|
||||
roomCtx->unk_34 =
|
||||
(void*)ALIGN16((intptr_t)roomCtx->bufPtrs[roomCtx->unk_30] - ((size + 8) * roomCtx->unk_30 + 7));
|
||||
|
||||
osCreateMesgQueue(&roomCtx->loadQueue, &roomCtx->loadMsg, 1);
|
||||
DmaMgr_SendRequest2(&roomCtx->dmaRequest, roomCtx->unk_34, play->roomList[roomNum].vromStart, size, 0,
|
||||
@@ -614,7 +613,6 @@ s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) {
|
||||
s32 func_800973FC(PlayState* play, RoomContext* roomCtx) {
|
||||
return OTRfunc_800973FC(play, roomCtx);
|
||||
|
||||
|
||||
if (roomCtx->status == 1) {
|
||||
if (!osRecvMesg(&roomCtx->loadQueue, NULL, OS_MESG_NOBLOCK)) {
|
||||
roomCtx->status = 0;
|
||||
@@ -635,8 +633,7 @@ s32 func_800973FC(PlayState* play, RoomContext* roomCtx) {
|
||||
}
|
||||
|
||||
void Room_Draw(PlayState* play, Room* room, u32 flags) {
|
||||
if (room->segment != NULL)
|
||||
{
|
||||
if (room->segment != NULL) {
|
||||
gSegments[3] = VIRTUAL_TO_PHYSICAL(room->segment);
|
||||
assert(room->meshHeader->base.type < ARRAY_COUNTU(sRoomDrawHandlers));
|
||||
sRoomDrawHandlers[room->meshHeader->base.type](play, room, flags);
|
||||
@@ -646,7 +643,7 @@ void Room_Draw(PlayState* play, Room* room, u32 flags) {
|
||||
void func_80097534(PlayState* play, RoomContext* roomCtx) {
|
||||
roomCtx->prevRoom.num = -1;
|
||||
roomCtx->prevRoom.segment = NULL;
|
||||
func_80031B14(play, &play->actorCtx); //kills all actors without room num set to -1
|
||||
func_80031B14(play, &play->actorCtx); // kills all actors without room num set to -1
|
||||
Actor_SpawnTransitionActors(play, &play->actorCtx);
|
||||
Map_InitRoomData(play, roomCtx->curRoom.num);
|
||||
if (!((play->sceneNum >= SCENE_HYRULE_FIELD) && (play->sceneNum <= SCENE_LON_LON_RANCH))) {
|
||||
@@ -657,7 +654,7 @@ void func_80097534(PlayState* play, RoomContext* roomCtx) {
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].scene = gSaveContext.ship.stats.sceneNum;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].room = gSaveContext.ship.stats.roomNum;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].roomTime = gSaveContext.ship.stats.roomTimer / 2;
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].isRoom =
|
||||
gSaveContext.ship.stats.sceneTimestamps[idx].isRoom =
|
||||
gPlayState->sceneNum == gSaveContext.ship.stats.sceneTimestamps[idx].scene &&
|
||||
gPlayState->roomCtx.curRoom.num != gSaveContext.ship.stats.sceneTimestamps[idx].room;
|
||||
gSaveContext.ship.stats.tsIdx++;
|
||||
|
||||
+10
-13
@@ -19,8 +19,8 @@ s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId) {
|
||||
assert(((objectCtx->num < OBJECT_EXCHANGE_BANK_MAX) &&
|
||||
(((uintptr_t)objectCtx->status[objectCtx->num].segment + size) < (uintptr_t)objectCtx->spaceEnd)));
|
||||
|
||||
DmaMgr_SendRequest1(objectCtx->status[objectCtx->num].segment, gObjectTable[objectId].vromStart, size,
|
||||
__FILE__, __LINE__);
|
||||
DmaMgr_SendRequest1(objectCtx->status[objectCtx->num].segment, gObjectTable[objectId].vromStart, size, __FILE__,
|
||||
__LINE__);
|
||||
|
||||
if (objectCtx->num < OBJECT_EXCHANGE_BANK_MAX - 1) {
|
||||
objectCtx->status[objectCtx->num + 1].segment =
|
||||
@@ -33,7 +33,6 @@ s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId) {
|
||||
return objectCtx->num - 1;
|
||||
}
|
||||
|
||||
|
||||
// SOH [Port] Track when objects are first loaded for a scene
|
||||
static u8 sObjectFirstUpdateSkippedForScene = false;
|
||||
|
||||
@@ -73,8 +72,7 @@ void Object_InitBank(PlayState* play, ObjectContext* objectCtx) {
|
||||
osSyncPrintf("オブジェクト入れ替えバンク情報 %8.3fKB\n", spaceSize / 1024.0f);
|
||||
osSyncPrintf(VT_RST);
|
||||
|
||||
objectCtx->spaceStart = objectCtx->status[0].segment =
|
||||
GAMESTATE_ALLOC_MC(&play->state, spaceSize);
|
||||
objectCtx->spaceStart = objectCtx->status[0].segment = GAMESTATE_ALLOC_MC(&play->state, spaceSize);
|
||||
objectCtx->spaceEnd = (void*)((uintptr_t)objectCtx->spaceStart + spaceSize);
|
||||
|
||||
objectCtx->mainKeepIndex = Object_Spawn(objectCtx, OBJECT_GAMEPLAY_KEEP);
|
||||
@@ -110,17 +108,16 @@ void Object_UpdateBank(ObjectContext* objectCtx) {
|
||||
status->id = -status->id;
|
||||
}
|
||||
*/
|
||||
status->id = -status->id;
|
||||
status->id = -status->id;
|
||||
}
|
||||
status++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
s32 Object_GetIndex(ObjectContext* objectCtx, s16 objectId) {
|
||||
s32 i;
|
||||
|
||||
//return 0;
|
||||
// return 0;
|
||||
|
||||
for (i = 0; i < objectCtx->num; i++) {
|
||||
if (ABS(objectCtx->status[i].id) == objectId) {
|
||||
@@ -202,8 +199,8 @@ s32 Scene_ExecuteCommands(PlayState* play, SceneCmd* sceneCmd) {
|
||||
}
|
||||
|
||||
void Scene_CommandSpawnList(PlayState* play, SceneCmd* cmd) {
|
||||
ActorEntry* linkEntry = play->linkActorEntry = (ActorEntry*)SEGMENTED_TO_VIRTUAL(cmd->spawnList.segment) +
|
||||
play->setupEntranceList[play->curSpawn].spawn;
|
||||
ActorEntry* linkEntry = play->linkActorEntry =
|
||||
(ActorEntry*)SEGMENTED_TO_VIRTUAL(cmd->spawnList.segment) + play->setupEntranceList[play->curSpawn].spawn;
|
||||
s16 linkObjectId;
|
||||
|
||||
play->linkAgeOnLoad = ((void)0, gSaveContext.linkAge);
|
||||
@@ -511,8 +508,8 @@ void (*gSceneCmdHandlers[SCENE_CMD_ID_MAX])(PlayState*, SceneCmd*) = {
|
||||
};
|
||||
|
||||
RomFile sNaviMsgFiles[] = {
|
||||
ROM_FILE(text/elf_message_field/elf_message_field),
|
||||
ROM_FILE(text/elf_message_ydan/elf_message_ydan),
|
||||
ROM_FILE(text / elf_message_field / elf_message_field),
|
||||
ROM_FILE(text / elf_message_ydan / elf_message_ydan),
|
||||
ROM_FILE_UNSET,
|
||||
};
|
||||
|
||||
@@ -522,7 +519,7 @@ u32 gObjectTableSize = ARRAY_COUNT(gObjectTable);
|
||||
|
||||
// Object linker symbol declarations (used in the table below)
|
||||
#define DEFINE_OBJECT(name, _1) DECLARE_ROM_SEGMENT(name)
|
||||
#define DEFINE_OBJECT_NULL(_0, _1)
|
||||
#define DEFINE_OBJECT_NULL(_0, _1)
|
||||
#define DEFINE_OBJECT_UNSET(_0)
|
||||
|
||||
//#include "tables/object_table.h"
|
||||
|
||||
+143
-149
@@ -59,13 +59,13 @@ EntranceInfo gEntranceTable[] = {
|
||||
// { { 0, 0, #name }, (u32)0, 0, 0, unk_10, config, unk_12, 0 }
|
||||
|
||||
#define DEFINE_SCENE(name, title, _2, config, unk_10, unk_12) \
|
||||
{ { 0, 0, #name }, {0, 0, #title}, unk_10, config, unk_12, 0 },
|
||||
{ { 0, 0, #name }, { 0, 0, #title }, unk_10, config, unk_12, 0 },
|
||||
|
||||
// Handle `none` as a special case for scenes without a title card
|
||||
#define none ""
|
||||
|
||||
SceneTableEntry gSceneTable[] = {
|
||||
#include "tables/scene_table.h"
|
||||
#include "tables/scene_table.h"
|
||||
};
|
||||
|
||||
#undef none
|
||||
@@ -128,8 +128,8 @@ void func_800995DC(PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128,
|
||||
32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
||||
@@ -182,7 +182,8 @@ void func_80099878(PlayState* play) {
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
if (ResourceMgr_IsGameMasterQuest()) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gDCEntranceTextures_MQ[gSaveContext.nightFlag]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sDCLavaFloorTextures_MQ[(s32)(gameplayFrames & 14) >> 1]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
SEGMENTED_TO_VIRTUAL(sDCLavaFloorTextures_MQ[(s32)(gameplayFrames & 14) >> 1]));
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gDCEntranceTextures[gSaveContext.nightFlag]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sDCLavaFloorTextures[(s32)(gameplayFrames & 14) >> 1]));
|
||||
@@ -286,11 +287,10 @@ void func_8009A45C(PlayState* play) {
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128,
|
||||
32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(
|
||||
POLY_OPA_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0B, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0C,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 50) % 2048, 8, 512, 1, 0,
|
||||
@@ -320,11 +320,11 @@ void func_8009A798(PlayState* play) {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128,
|
||||
(gameplayFrames * 1) % 256, 32, 64, 1, 0, 0, 32, 128));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 256, 32,
|
||||
64, 1, 0, 0, 32, 128));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -343,11 +343,11 @@ void func_8009A9DC(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 256, 32,
|
||||
64, 1, gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -384,8 +384,8 @@ void func_8009ACA8(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, gameplayFrames % 64, 256, 16));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
@@ -470,54 +470,54 @@ void func_8009B0FC(PlayState* play) {
|
||||
|
||||
if (spB0 == 1) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, spAC));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0,
|
||||
0, spAC));
|
||||
} else if (spB0 < 1) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, 255));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0,
|
||||
0, 255));
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, 160));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0,
|
||||
0, 160));
|
||||
}
|
||||
|
||||
if (spB0 == 2) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, spAC));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0,
|
||||
0, spAC));
|
||||
} else if (spB0 < 2) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, 255));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0,
|
||||
0, 255));
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, 160));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0,
|
||||
0, 160));
|
||||
}
|
||||
|
||||
if (spB0 != 0) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, 160));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0,
|
||||
0, 160));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, 180));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0,
|
||||
0, 180));
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0,
|
||||
32, 32, 0, 0, 0, 160 + (s32)((spAC / 200.0f) * 95.0f)));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32,
|
||||
32, 0, 0, 0, 160 + (s32)((spAC / 200.0f) * 95.0f)));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, 185 + (s32)((spAC / 200.0f) * 70.0f)));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0,
|
||||
0, 185 + (s32)((spAC / 200.0f) * 70.0f)));
|
||||
}
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0C,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1,
|
||||
0, 127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 128));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, 0,
|
||||
127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 128));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0D,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 4, 0, 32, 32, 1,
|
||||
gameplayFrames * 4, 0, 32, 32, 0, 0, 0, 128));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 4, 0, 32, 32, 1, gameplayFrames * 4, 0,
|
||||
32, 32, 0, 0, 0, 128));
|
||||
|
||||
{ s32 pad[2]; }
|
||||
|
||||
@@ -566,12 +566,11 @@ void func_8009BAA4(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
|
||||
if (play->sceneNum == SCENE_CASTLE_COURTYARD_GUARDS_DAY) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 10) % 256, 32, 64));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 10) % 256, 32, 64));
|
||||
}
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
@@ -595,17 +594,15 @@ void func_8009BC44(PlayState* play) {
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
|
||||
if (play->sceneNum == SCENE_OUTSIDE_GANONS_CASTLE) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 64, 64));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 64, 64));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 1) % 256, 64, 64, 1, 0,
|
||||
(gameplayFrames * 1) % 256, 64, 64));
|
||||
}
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 255 - (gameplayFrames * 1) % 128,
|
||||
(gameplayFrames * 1) % 128, 32, 32, 1, (gameplayFrames * 1) % 128,
|
||||
(gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 255 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -673,7 +670,8 @@ void func_8009C0AC(PlayState* play) {
|
||||
|
||||
if (Flags_GetSwitch(play, 0x37)) {
|
||||
if ((play->sceneNum == SCENE_GANON_BOSS) || (play->sceneNum == SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR) ||
|
||||
(play->sceneNum == SCENE_GANONS_TOWER_COLLAPSE_INTERIOR) || (play->sceneNum == SCENE_INSIDE_GANONS_CASTLE_COLLAPSE)) {
|
||||
(play->sceneNum == SCENE_GANONS_TOWER_COLLAPSE_INTERIOR) ||
|
||||
(play->sceneNum == SCENE_INSIDE_GANONS_CASTLE_COLLAPSE)) {
|
||||
func_8009BEEC(play);
|
||||
}
|
||||
}
|
||||
@@ -697,11 +695,11 @@ void func_8009C3EC(PlayState* play) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sIceCavernEntranceTextures[gSaveContext.nightFlag]));
|
||||
}
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
|
||||
{ s32 pad[2]; }
|
||||
|
||||
@@ -751,10 +749,9 @@ void func_8009C8B8(PlayState* play) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TexScroll(play->state.gfxCtx, 0, 255 - (gameplayFrames * 10) % 256, 32, 64));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, 255 - (gameplayFrames * 10) % 256, 32, 64));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -773,8 +770,8 @@ void func_8009CAC0(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -803,11 +800,11 @@ void func_8009CC00(PlayState* play) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGTGEntranceTextures[gSaveContext.nightFlag]));
|
||||
}
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
|
||||
{ s32 pad[2]; }
|
||||
|
||||
@@ -847,10 +844,9 @@ void func_8009CF84(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScrollPrimColor(play->state.gfxCtx, 0, 127 - gameplayFrames % 128,
|
||||
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128,
|
||||
(gameplayFrames * 1) % 128, 32, 32, 255, 255, 255,
|
||||
play->roomCtx.unk_74[0] + 127));
|
||||
Gfx_TwoTexScrollPrimColor(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
||||
32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 255, 255,
|
||||
255, play->roomCtx.unk_74[0] + 127));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -868,14 +864,11 @@ void func_8009D0E8(PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TexScroll(play->state.gfxCtx, 127 - (gameplayFrames * 4) % 128, 0, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 127 - (gameplayFrames * 4) % 128, 0, 32, 32));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 5) % 64, 16, 16));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
||||
Gfx_TexScroll(play->state.gfxCtx, 0, 63 - (gameplayFrames * 2) % 64, 16, 16));
|
||||
gSPSegment(
|
||||
POLY_XLU_DISP++, 0x0B,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0, 0, 32, 32));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TexScroll(play->state.gfxCtx, 0, 63 - (gameplayFrames * 2) % 64, 16, 16));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0B,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0, 0, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -975,16 +968,17 @@ void func_8009D758(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
if (ResourceMgr_IsGameMasterQuest()) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sForestTempleEntranceTextures_MQ[gSaveContext.nightFlag]));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
SEGMENTED_TO_VIRTUAL(sForestTempleEntranceTextures_MQ[gSaveContext.nightFlag]));
|
||||
} else {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sForestTempleEntranceTextures[gSaveContext.nightFlag]));
|
||||
}
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
|
||||
{ s32 pad[2]; }
|
||||
|
||||
@@ -1009,7 +1003,8 @@ void func_8009D974(PlayState* play) {
|
||||
{ s32 pad[2]; }
|
||||
|
||||
if (ResourceMgr_IsGameMasterQuest()) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sSpiritTempleEntranceTextures_MQ[gSaveContext.nightFlag]));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
SEGMENTED_TO_VIRTUAL(sSpiritTempleEntranceTextures_MQ[gSaveContext.nightFlag]));
|
||||
} else {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sSpiritTempleEntranceTextures[gSaveContext.nightFlag]));
|
||||
}
|
||||
@@ -1028,11 +1023,11 @@ void func_8009DA30(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -1093,14 +1088,14 @@ void func_8009DE78(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 6) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -1126,11 +1121,11 @@ void func_8009E0B8(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -1142,7 +1137,8 @@ void func_8009E0B8(PlayState* play) {
|
||||
spA3 = 255 - (u8)play->roomCtx.unk_74[0];
|
||||
} else if (gSaveContext.sceneSetupIndex == 6) {
|
||||
spA0 = play->roomCtx.unk_74[0] + 500;
|
||||
} else if (((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) && (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD))) {
|
||||
} else if (((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) &&
|
||||
(Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD))) {
|
||||
spA0 = 2150;
|
||||
}
|
||||
|
||||
@@ -1158,8 +1154,8 @@ void func_8009E0B8(PlayState* play) {
|
||||
gSPEndDisplayList(displayListHead);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16, 1,
|
||||
0, (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16, 1, 0,
|
||||
(s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16));
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
@@ -1170,17 +1166,18 @@ void func_8009E54C(PlayState* play) {
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if ((gSaveContext.sceneSetupIndex > 3) || (LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER))) {
|
||||
if ((gSaveContext.sceneSetupIndex > 3) ||
|
||||
(LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER))) {
|
||||
play->roomCtx.unk_74[0] = 87;
|
||||
}
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32,
|
||||
32, 0, 0, 0, play->roomCtx.unk_74[0] + 168));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32, 32,
|
||||
0, 0, 0, play->roomCtx.unk_74[0] + 168));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0,
|
||||
16, 64, 0, 0, 0, play->roomCtx.unk_74[0] + 168));
|
||||
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0, 16,
|
||||
64, 0, 0, 0, play->roomCtx.unk_74[0] + 168));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128);
|
||||
@@ -1258,9 +1255,8 @@ void func_8009EAD8(PlayState* play) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 2) % 128, 32, 32, 1, 0,
|
||||
(gameplayFrames * 2) % 128, 32, 32));
|
||||
gSPSegment(
|
||||
POLY_OPA_DISP++, 0x0B,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 3) % 128, 32, 32));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 3) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0C,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0,
|
||||
(gameplayFrames * 1) % 128, 32, 32));
|
||||
@@ -1284,9 +1280,9 @@ void func_8009EE44(PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames % 128, 0, 32, 16, 1, gameplayFrames % 128, 0,
|
||||
32, 16));
|
||||
gSPSegment(
|
||||
POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames % 128, 0, 32, 16, 1, gameplayFrames % 128, 0, 32, 16));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, gameplayFrames % 128, 32, 32, 1,
|
||||
gameplayFrames % 128, gameplayFrames % 128, 32, 32));
|
||||
@@ -1297,7 +1293,7 @@ void func_8009EE44(PlayState* play) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
|
||||
bool playerHasCojiro = INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO;
|
||||
bool playerHasCojiro = INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO;
|
||||
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
|
||||
playerHasCojiro = Flags_GetRandomizerInf(RAND_INF_ADULT_TRADES_HAS_COJIRO);
|
||||
}
|
||||
@@ -1355,12 +1351,12 @@ void func_8009F270(PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128,
|
||||
32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128,
|
||||
32, 32));
|
||||
gSPSegment(
|
||||
POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32));
|
||||
gSPSegment(
|
||||
POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -1379,11 +1375,11 @@ void func_8009F40C(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -1441,9 +1437,9 @@ void func_8009F7D4(PlayState* play) {
|
||||
sp6F = (sp6F >> 1) + 192;
|
||||
sp6E = (sp6E >> 1) + 192;
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128,
|
||||
32, 32));
|
||||
gSPSegment(
|
||||
POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, sp6F, sp6E, 255, 128);
|
||||
@@ -1467,8 +1463,8 @@ void func_8009F9D0(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1,
|
||||
gameplayFrames % 128, 0, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, gameplayFrames % 128,
|
||||
0, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -1516,9 +1512,8 @@ void func_8009FC90(PlayState* play) {
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1,
|
||||
127 - gameplayFrames % 128, 0, 32, 32));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128,
|
||||
127 - (gameplayFrames * 6) % 128, 32, 32, 1, (gameplayFrames * 6) % 128,
|
||||
127 - (gameplayFrames * 3) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 127 - (gameplayFrames * 6) % 128, 32,
|
||||
32, 1, (gameplayFrames * 6) % 128, 127 - (gameplayFrames * 3) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 64);
|
||||
@@ -1542,15 +1537,15 @@ void func_8009FE58(PlayState* play) {
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
if (play->sceneNum == SCENE_JABU_JABU) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames % 128, (gameplayFrames * 2) % 128, 32,
|
||||
32, 1, 127 - gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32, 1,
|
||||
127 - gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 4) % 256, 32, 64, 1, 0,
|
||||
255 - (gameplayFrames * 4) % 256, 32, 64));
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TexScroll(play->state.gfxCtx, (127 - (gameplayFrames * 1)) % 128,
|
||||
(gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(
|
||||
POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TexScroll(play->state.gfxCtx, (127 - (gameplayFrames * 1)) % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
}
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
@@ -1568,9 +1563,9 @@ void func_8009FE58(PlayState* play) {
|
||||
|
||||
if (play->pauseCtx.state == 0) {
|
||||
View_SetDistortionOrientation(&play->view,
|
||||
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_CosS(D_8012A39C),
|
||||
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A39C),
|
||||
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A3A0));
|
||||
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_CosS(D_8012A39C),
|
||||
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A39C),
|
||||
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A3A0));
|
||||
View_SetDistortionScale(&play->view, 1.f + (0.79999995f * temp * Math_SinS(D_8012A3A0)),
|
||||
1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)),
|
||||
1.f + (1 * temp * Math_CosS(D_8012A39C)));
|
||||
@@ -1596,7 +1591,7 @@ void func_8009FE58(PlayState* play) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (play->pauseCtx.state == 0) {
|
||||
D_8012A398 += 0.15f + (play->roomCtx.unk_74[1] * 0.001f);
|
||||
}
|
||||
@@ -1621,14 +1616,14 @@ void func_800A0334(PlayState* play) {
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 512, 32,
|
||||
128, 1, gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32,
|
||||
32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32,
|
||||
1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
||||
@@ -1656,8 +1651,7 @@ void func_800A059C(PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gameplayFrames = play->gameplayFrames;
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TexScroll(play->state.gfxCtx, 127 - (gameplayFrames * 2) % 128, 0, 32, 64));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 127 - (gameplayFrames * 2) % 128, 0, 32, 64));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 512, 128, 128));
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
+55
-72
@@ -72,8 +72,8 @@ void SkelAnime_DrawLimbLod(PlayState* play, s32 limbIndex, void** skeleton, Vec3
|
||||
* Draw all limbs of type `LodLimb` in a given skeleton
|
||||
* Near or far display list is specified via `lod`
|
||||
*/
|
||||
void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg, s32 lod) {
|
||||
void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw,
|
||||
PostLimbDrawOpa postLimbDraw, void* arg, s32 lod) {
|
||||
LodLimb* rootLimb;
|
||||
s32 pad;
|
||||
Gfx* dList;
|
||||
@@ -115,8 +115,7 @@ void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable,
|
||||
}
|
||||
|
||||
if (rootLimb->child != LIMB_DONE) {
|
||||
SkelAnime_DrawLimbLod(play, rootLimb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
lod);
|
||||
SkelAnime_DrawLimbLod(play, rootLimb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg, lod);
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
@@ -172,15 +171,15 @@ void SkelAnime_DrawFlexLimbLod(PlayState* play, s32 limbIndex, void** skeleton,
|
||||
postLimbDraw(play, limbIndex, &limbDList, &rot, arg);
|
||||
}
|
||||
if (limb->child != LIMB_DONE) {
|
||||
SkelAnime_DrawFlexLimbLod(play, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
lod, mtx);
|
||||
SkelAnime_DrawFlexLimbLod(play, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg, lod,
|
||||
mtx);
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
|
||||
if (limb->sibling != LIMB_DONE) {
|
||||
SkelAnime_DrawFlexLimbLod(play, limb->sibling, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
lod, mtx);
|
||||
SkelAnime_DrawFlexLimbLod(play, limb->sibling, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg, lod,
|
||||
mtx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,8 +243,8 @@ void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable,
|
||||
postLimbDraw(play, 1, &limbDList, &rot, arg);
|
||||
}
|
||||
if (rootLimb->child != LIMB_DONE) {
|
||||
SkelAnime_DrawFlexLimbLod(play, rootLimb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
lod, &mtx);
|
||||
SkelAnime_DrawFlexLimbLod(play, rootLimb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg, lod,
|
||||
&mtx);
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
@@ -298,14 +297,13 @@ void SkelAnime_DrawLimbOpa(PlayState* play, s32 limbIndex, void** skeleton, Vec3
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
// Checks the skeleton header to draw the appropriate skeleton type instead of harcoding the type in the actor's draw function...
|
||||
// Checks the skeleton header to draw the appropriate skeleton type instead of harcoding the type in the actor's draw
|
||||
// function...
|
||||
void SkelAnime_DrawSkeletonOpa(PlayState* play, SkelAnime* skelAnime, OverrideLimbDrawOpa overrideLimbDraw,
|
||||
PostLimbDrawOpa postLimbDraw, void* arg) {
|
||||
PostLimbDrawOpa postLimbDraw, void* arg) {
|
||||
if (skelAnime->skeletonHeader->skeletonType == SKELANIME_TYPE_NORMAL) {
|
||||
SkelAnime_DrawOpa(play, skelAnime->skeleton, skelAnime->jointTable, overrideLimbDraw, postLimbDraw, arg);
|
||||
}
|
||||
else if (skelAnime->skeletonHeader->skeletonType == SKELANIME_TYPE_FLEX)
|
||||
{
|
||||
} else if (skelAnime->skeletonHeader->skeletonType == SKELANIME_TYPE_FLEX) {
|
||||
FlexSkeletonHeader* flexHeader = (FlexSkeletonHeader*)skelAnime->skeletonHeader;
|
||||
SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, flexHeader->dListCount,
|
||||
overrideLimbDraw, postLimbDraw, arg);
|
||||
@@ -313,14 +311,14 @@ void SkelAnime_DrawSkeletonOpa(PlayState* play, SkelAnime* skelAnime, OverrideLi
|
||||
}
|
||||
|
||||
Gfx* SkelAnime_DrawSkeleton2(PlayState* play, SkelAnime* skelAnime, OverrideLimbDrawOpa overrideLimbDraw,
|
||||
PostLimbDrawOpa postLimbDraw, void* arg, Gfx* gfx)
|
||||
{
|
||||
PostLimbDrawOpa postLimbDraw, void* arg, Gfx* gfx) {
|
||||
if (skelAnime->skeletonHeader->skeletonType == SKELANIME_TYPE_NORMAL) {
|
||||
return SkelAnime_Draw(play, skelAnime->skeleton, skelAnime->jointTable, overrideLimbDraw, postLimbDraw, arg, gfx);
|
||||
return SkelAnime_Draw(play, skelAnime->skeleton, skelAnime->jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
gfx);
|
||||
} else if (skelAnime->skeletonHeader->skeletonType == SKELANIME_TYPE_FLEX) {
|
||||
FlexSkeletonHeader* flexHeader = (FlexSkeletonHeader*)skelAnime->skeletonHeader;
|
||||
return SkelAnime_DrawFlex(play, skelAnime->skeleton, skelAnime->jointTable, flexHeader->dListCount,
|
||||
overrideLimbDraw, postLimbDraw, arg, gfx);
|
||||
overrideLimbDraw, postLimbDraw, arg, gfx);
|
||||
}
|
||||
|
||||
return gfx;
|
||||
@@ -329,8 +327,8 @@ Gfx* SkelAnime_DrawSkeleton2(PlayState* play, SkelAnime* skelAnime, OverrideLimb
|
||||
/**
|
||||
* Draw all limbs of type `StandardLimb` in a given skeleton to the polyOpa buffer
|
||||
*/
|
||||
void SkelAnime_DrawOpa(PlayState* play, void** skeleton, Vec3s* jointTable,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg) {
|
||||
void SkelAnime_DrawOpa(PlayState* play, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw,
|
||||
PostLimbDrawOpa postLimbDraw, void* arg) {
|
||||
StandardLimb* rootLimb;
|
||||
s32 pad;
|
||||
Gfx* dList;
|
||||
@@ -587,15 +585,13 @@ Gfx* SkelAnime_DrawLimb(PlayState* play, s32 limbIndex, void** skeleton, Vec3s*
|
||||
}
|
||||
|
||||
if (limb->child != LIMB_DONE) {
|
||||
gfx =
|
||||
SkelAnime_DrawLimb(play, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg, gfx);
|
||||
gfx = SkelAnime_DrawLimb(play, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg, gfx);
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
|
||||
if (limb->sibling != LIMB_DONE) {
|
||||
gfx = SkelAnime_DrawLimb(play, limb->sibling, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
gfx);
|
||||
gfx = SkelAnime_DrawLimb(play, limb->sibling, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg, gfx);
|
||||
}
|
||||
|
||||
return gfx;
|
||||
@@ -645,8 +641,7 @@ Gfx* SkelAnime_Draw(PlayState* play, void** skeleton, Vec3s* jointTable, Overrid
|
||||
}
|
||||
|
||||
if (rootLimb->child != LIMB_DONE) {
|
||||
gfx = SkelAnime_DrawLimb(play, rootLimb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
gfx);
|
||||
gfx = SkelAnime_DrawLimb(play, rootLimb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg, gfx);
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
@@ -693,15 +688,15 @@ Gfx* SkelAnime_DrawFlexLimb(PlayState* play, s32 limbIndex, void** skeleton, Vec
|
||||
postLimbDraw(play, limbIndex, &limbDList, &rot, arg, &gfx);
|
||||
}
|
||||
if (limb->child != LIMB_DONE) {
|
||||
gfx = SkelAnime_DrawFlexLimb(play, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
mtx, gfx);
|
||||
gfx = SkelAnime_DrawFlexLimb(play, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg, mtx,
|
||||
gfx);
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
|
||||
if (limb->sibling != LIMB_DONE) {
|
||||
gfx = SkelAnime_DrawFlexLimb(play, limb->sibling, skeleton, jointTable, overrideLimbDraw, postLimbDraw,
|
||||
arg, mtx, gfx);
|
||||
gfx = SkelAnime_DrawFlexLimb(play, limb->sibling, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
mtx, gfx);
|
||||
}
|
||||
|
||||
return gfx;
|
||||
@@ -758,8 +753,8 @@ Gfx* SkelAnime_DrawFlex(PlayState* play, void** skeleton, Vec3s* jointTable, s32
|
||||
postLimbDraw(play, 1, &limbDList, &rot, arg, &gfx);
|
||||
}
|
||||
if (rootLimb->child != LIMB_DONE) {
|
||||
gfx = SkelAnime_DrawFlexLimb(play, rootLimb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw,
|
||||
arg, &mtx, gfx);
|
||||
gfx = SkelAnime_DrawFlexLimb(play, rootLimb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
&mtx, gfx);
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
@@ -900,8 +895,7 @@ void AnimationContext_SetLoadFrame(PlayState* play, LinkAnimationHeader* animati
|
||||
|
||||
AnimationEntry* entry = AnimationContext_AddEntry(&play->animationCtx, ANIMENTRY_LOADFRAME);
|
||||
|
||||
if (entry != NULL)
|
||||
{
|
||||
if (entry != NULL) {
|
||||
if (ResourceMgr_OTRSigCheck(animation) != 0)
|
||||
animation = ResourceMgr_LoadAnimByName(animation);
|
||||
|
||||
@@ -912,9 +906,10 @@ void AnimationContext_SetLoadFrame(PlayState* play, LinkAnimationHeader* animati
|
||||
|
||||
char animPath[2048];
|
||||
|
||||
snprintf(animPath, sizeof(animPath), "misc/link_animetion/gPlayerAnimData_%06X", (((uintptr_t)linkAnimHeader->segment - 0x07000000)));
|
||||
snprintf(animPath, sizeof(animPath), "misc/link_animetion/gPlayerAnimData_%06X",
|
||||
(((uintptr_t)linkAnimHeader->segment - 0x07000000)));
|
||||
|
||||
//printf("Streaming %s, seg = %08X\n", animPath, linkAnimHeader->segment);
|
||||
// printf("Streaming %s, seg = %08X\n", animPath, linkAnimHeader->segment);
|
||||
|
||||
s16* animData = ResourceMgr_LoadPlayerAnimByName(animPath);
|
||||
|
||||
@@ -927,11 +922,10 @@ void AnimationContext_SetLoadFrame(PlayState* play, LinkAnimationHeader* animati
|
||||
ramPtr[i] = i * 7;
|
||||
}*/
|
||||
|
||||
|
||||
//DmaMgr_SendRequest2(&entry->data.load.req, ram,
|
||||
//LINK_ANIMATION_OFFSET(linkAnimHeader->segment, ((sizeof(Vec3s) * limbCount + 2) * frame)),
|
||||
//sizeof(Vec3s) * limbCount + 2, 0, &entry->data.load.msgQueue, NULL, __FILE__,
|
||||
//__LINE__);
|
||||
// DmaMgr_SendRequest2(&entry->data.load.req, ram,
|
||||
// LINK_ANIMATION_OFFSET(linkAnimHeader->segment, ((sizeof(Vec3s) * limbCount + 2) * frame)),
|
||||
// sizeof(Vec3s) * limbCount + 2, 0, &entry->data.load.msgQueue, NULL, __FILE__,
|
||||
//__LINE__);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1308,8 +1302,7 @@ void LinkAnimation_Change(PlayState* play, SkelAnime* skelAnime, LinkAnimationHe
|
||||
skelAnime->morphRate = 1.0f / morphFrames;
|
||||
} else {
|
||||
LinkAnimation_SetUpdateFunction(skelAnime);
|
||||
AnimationContext_SetLoadFrame(play, animation, (s32)startFrame, skelAnime->limbCount,
|
||||
skelAnime->jointTable);
|
||||
AnimationContext_SetLoadFrame(play, animation, (s32)startFrame, skelAnime->limbCount, skelAnime->jointTable);
|
||||
skelAnime->morphWeight = 0.0f;
|
||||
}
|
||||
|
||||
@@ -1335,8 +1328,8 @@ void LinkAnimation_PlayOnce(PlayState* play, SkelAnime* skelAnime, LinkAnimation
|
||||
*/
|
||||
void LinkAnimation_PlayOnceSetSpeed(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation,
|
||||
f32 playSpeed) {
|
||||
LinkAnimation_Change(play, skelAnime, animation, playSpeed, 0.0f, Animation_GetLastFrame(animation),
|
||||
ANIMMODE_ONCE, 0.0f);
|
||||
LinkAnimation_Change(play, skelAnime, animation, playSpeed, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1352,8 +1345,8 @@ void LinkAnimation_PlayLoop(PlayState* play, SkelAnime* skelAnime, LinkAnimation
|
||||
*/
|
||||
void LinkAnimation_PlayLoopSetSpeed(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation,
|
||||
f32 playSpeed) {
|
||||
LinkAnimation_Change(play, skelAnime, animation, playSpeed, 0.0f, Animation_GetLastFrame(animation),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
LinkAnimation_Change(play, skelAnime, animation, playSpeed, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1374,16 +1367,14 @@ void LinkAnimation_CopyMorphToJoint(PlayState* play, SkelAnime* skelAnime) {
|
||||
/**
|
||||
* Requests loading frame data from the Link animation into morphTable
|
||||
*/
|
||||
void LinkAnimation_LoadToMorph(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation,
|
||||
f32 frame) {
|
||||
void LinkAnimation_LoadToMorph(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation, f32 frame) {
|
||||
AnimationContext_SetLoadFrame(play, animation, (s32)frame, skelAnime->limbCount, skelAnime->morphTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests loading frame data from the Link animation into jointTable
|
||||
*/
|
||||
void LinkAnimation_LoadToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation,
|
||||
f32 frame) {
|
||||
void LinkAnimation_LoadToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation, f32 frame) {
|
||||
AnimationContext_SetLoadFrame(play, animation, (s32)frame, skelAnime->limbCount, skelAnime->jointTable);
|
||||
}
|
||||
|
||||
@@ -1397,9 +1388,8 @@ void LinkAnimation_InterpJointMorph(PlayState* play, SkelAnime* skelAnime, f32 w
|
||||
/**
|
||||
* Requests loading frame data from the Link animations and blending them, placing the result in jointTable
|
||||
*/
|
||||
void LinkAnimation_BlendToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1,
|
||||
f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight,
|
||||
Vec3s* blendTable) {
|
||||
void LinkAnimation_BlendToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1,
|
||||
LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, Vec3s* blendTable) {
|
||||
Vec3s* alignedBlendTable;
|
||||
|
||||
AnimationContext_SetLoadFrame(play, animation1, (s32)frame1, skelAnime->limbCount, skelAnime->jointTable);
|
||||
@@ -1413,9 +1403,8 @@ void LinkAnimation_BlendToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnima
|
||||
/**
|
||||
* Requests loading frame data from the Link animations and blending them, placing the result in morphTable
|
||||
*/
|
||||
void LinkAnimation_BlendToMorph(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1,
|
||||
f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight,
|
||||
Vec3s* blendTable) {
|
||||
void LinkAnimation_BlendToMorph(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1,
|
||||
LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, Vec3s* blendTable) {
|
||||
Vec3s* alignedBlendTable;
|
||||
|
||||
AnimationContext_SetLoadFrame(play, animation1, (s32)frame1, skelAnime->limbCount, skelAnime->morphTable);
|
||||
@@ -1473,8 +1462,8 @@ s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame) {
|
||||
/**
|
||||
* Initializes a normal skeleton to a looping animation, dynamically allocating the frame tables if not provided.
|
||||
*/
|
||||
s32 SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
|
||||
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
|
||||
s32 SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animation,
|
||||
Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
|
||||
if (ResourceMgr_OTRSigCheck(skeletonHeaderSeg))
|
||||
skeletonHeaderSeg = ResourceMgr_LoadSkeletonByName(skeletonHeaderSeg, skelAnime);
|
||||
|
||||
@@ -1484,10 +1473,8 @@ s32 SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skelet
|
||||
skelAnime->limbCount = skeletonHeader->limbCount + 1;
|
||||
skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->segment);
|
||||
if (jointTable == NULL) {
|
||||
skelAnime->jointTable =
|
||||
ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->jointTable));
|
||||
skelAnime->morphTable =
|
||||
ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->morphTable));
|
||||
skelAnime->jointTable = ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->jointTable));
|
||||
skelAnime->morphTable = ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->morphTable));
|
||||
} else {
|
||||
assert(limbCount == skelAnime->limbCount);
|
||||
skelAnime->jointTable = jointTable;
|
||||
@@ -1520,11 +1507,9 @@ s32 SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader
|
||||
skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->sh.segment);
|
||||
|
||||
if (jointTable == NULL) {
|
||||
skelAnime->jointTable =
|
||||
ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->jointTable));
|
||||
skelAnime->jointTable = ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->jointTable));
|
||||
|
||||
skelAnime->morphTable =
|
||||
ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->morphTable));
|
||||
skelAnime->morphTable = ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->morphTable));
|
||||
} else {
|
||||
assert(limbCount == skelAnime->limbCount);
|
||||
skelAnime->jointTable = jointTable;
|
||||
@@ -1555,10 +1540,8 @@ s32 SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* sk
|
||||
skelAnime->skeletonHeader = skeletonHeader;
|
||||
skelAnime->limbCount = skeletonHeader->limbCount + 1;
|
||||
skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->segment);
|
||||
skelAnime->jointTable =
|
||||
ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->jointTable));
|
||||
skelAnime->morphTable =
|
||||
ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->morphTable));
|
||||
skelAnime->jointTable = ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->jointTable));
|
||||
skelAnime->morphTable = ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->morphTable));
|
||||
if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) {
|
||||
osSyncPrintf(VT_FGCOL(RED));
|
||||
// "Memory allocation error"
|
||||
|
||||
@@ -71,12 +71,10 @@ void Skin_Init(PlayState* play, Skin* skin, SkeletonHeader* skeletonHeader, Anim
|
||||
|
||||
vtxEntry->index = 0;
|
||||
|
||||
vtxEntry->buf[0] =
|
||||
ZELDA_ARENA_MALLOC_DEBUG(animatedLimbData->totalVtxCount * sizeof(Vtx));
|
||||
vtxEntry->buf[0] = ZELDA_ARENA_MALLOC_DEBUG(animatedLimbData->totalVtxCount * sizeof(Vtx));
|
||||
assert(vtxEntry->buf[0] != NULL);
|
||||
|
||||
vtxEntry->buf[1] =
|
||||
ZELDA_ARENA_MALLOC_DEBUG(animatedLimbData->totalVtxCount * sizeof(Vtx));
|
||||
vtxEntry->buf[1] = ZELDA_ARENA_MALLOC_DEBUG(animatedLimbData->totalVtxCount * sizeof(Vtx));
|
||||
assert(vtxEntry->buf[1] != NULL);
|
||||
|
||||
Skin_InitAnimatedLimb(play, skin, i);
|
||||
|
||||
@@ -58,5 +58,6 @@ void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 du
|
||||
source->countdown = duration;
|
||||
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
|
||||
Audio_PlaySoundGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
+19
-15
@@ -44,19 +44,19 @@ void Sram_InitBossRushSave(void) {
|
||||
|
||||
static s16 sDungeonEntrances[] = {
|
||||
ENTR_DEKU_TREE_ENTRANCE, // SCENE_DEKU_TREE
|
||||
ENTR_DODONGOS_CAVERN_ENTRANCE, // SCENE_DODONGOS_CAVERN
|
||||
ENTR_JABU_JABU_ENTRANCE, // SCENE_JABU_JABU
|
||||
ENTR_DODONGOS_CAVERN_ENTRANCE, // SCENE_DODONGOS_CAVERN
|
||||
ENTR_JABU_JABU_ENTRANCE, // SCENE_JABU_JABU
|
||||
ENTR_FOREST_TEMPLE_ENTRANCE, // SCENE_FOREST_TEMPLE
|
||||
ENTR_FIRE_TEMPLE_ENTRANCE, // SCENE_FIRE_TEMPLE
|
||||
ENTR_WATER_TEMPLE_ENTRANCE, // SCENE_WATER_TEMPLE
|
||||
ENTR_SPIRIT_TEMPLE_ENTRANCE, // SCENE_SPIRIT_TEMPLE
|
||||
ENTR_SHADOW_TEMPLE_ENTRANCE, // SCENE_SHADOW_TEMPLE
|
||||
ENTR_FIRE_TEMPLE_ENTRANCE, // SCENE_FIRE_TEMPLE
|
||||
ENTR_WATER_TEMPLE_ENTRANCE, // SCENE_WATER_TEMPLE
|
||||
ENTR_SPIRIT_TEMPLE_ENTRANCE, // SCENE_SPIRIT_TEMPLE
|
||||
ENTR_SHADOW_TEMPLE_ENTRANCE, // SCENE_SHADOW_TEMPLE
|
||||
ENTR_BOTTOM_OF_THE_WELL_ENTRANCE, // SCENE_BOTTOM_OF_THE_WELL
|
||||
ENTR_ICE_CAVERN_ENTRANCE, // SCENE_ICE_CAVERN
|
||||
ENTR_ICE_CAVERN_ENTRANCE, // SCENE_ICE_CAVERN
|
||||
ENTR_GANONS_TOWER_0, // SCENE_GANONS_TOWER
|
||||
ENTR_GERUDO_TRAINING_GROUND_ENTRANCE, // SCENE_GERUDO_TRAINING_GROUND
|
||||
ENTR_GERUDO_TRAINING_GROUND_ENTRANCE, // SCENE_GERUDO_TRAINING_GROUND
|
||||
ENTR_THIEVES_HIDEOUT_0, // SCENE_THIEVES_HIDEOUT
|
||||
ENTR_INSIDE_GANONS_CASTLE_ENTRANCE, // SCENE_INSIDE_GANONS_CASTLE
|
||||
ENTR_INSIDE_GANONS_CASTLE_ENTRANCE, // SCENE_INSIDE_GANONS_CASTLE
|
||||
ENTR_GANONS_TOWER_COLLAPSE_INTERIOR_0, // SCENE_GANONS_TOWER_COLLAPSE_INTERIOR
|
||||
ENTR_INSIDE_GANONS_CASTLE_COLLAPSE_0, // SCENE_INSIDE_GANONS_CASTLE_COLLAPSE
|
||||
};
|
||||
@@ -129,13 +129,14 @@ void Sram_OpenSave() {
|
||||
|
||||
default:
|
||||
// Use the saved entrance value with remember save location, except when in grottos/fairy fountains
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RememberSaveLocation"), 0) && gSaveContext.savedSceneNum != SCENE_FAIRYS_FOUNTAIN &&
|
||||
gSaveContext.savedSceneNum != SCENE_GROTTOS) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RememberSaveLocation"), 0) &&
|
||||
gSaveContext.savedSceneNum != SCENE_FAIRYS_FOUNTAIN && gSaveContext.savedSceneNum != SCENE_GROTTOS) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (gSaveContext.savedSceneNum != SCENE_LINKS_HOUSE) {
|
||||
gSaveContext.entranceIndex = (LINK_AGE_IN_YEARS == YEARS_CHILD) ? ENTR_LINKS_HOUSE_CHILD_SPAWN : ENTR_TEMPLE_OF_TIME_WARP_PAD;
|
||||
gSaveContext.entranceIndex =
|
||||
(LINK_AGE_IN_YEARS == YEARS_CHILD) ? ENTR_LINKS_HOUSE_CHILD_SPAWN : ENTR_TEMPLE_OF_TIME_WARP_PAD;
|
||||
} else {
|
||||
gSaveContext.entranceIndex = ENTR_LINKS_HOUSE_CHILD_SPAWN;
|
||||
}
|
||||
@@ -150,7 +151,8 @@ void Sram_OpenSave() {
|
||||
osSyncPrintf(VT_RST);
|
||||
|
||||
if (gSaveContext.health < 0x30) {
|
||||
gSaveContext.health = CVarGetInteger(CVAR_ENHANCEMENT("FullHealthSpawn"), 0) ? gSaveContext.healthCapacity : 0x30;
|
||||
gSaveContext.health =
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("FullHealthSpawn"), 0) ? gSaveContext.healthCapacity : 0x30;
|
||||
}
|
||||
|
||||
if (gSaveContext.scarecrowLongSongSet) {
|
||||
@@ -184,7 +186,8 @@ void Sram_OpenSave() {
|
||||
}
|
||||
|
||||
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !IS_RANDO) {
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) &&
|
||||
!IS_RANDO) {
|
||||
i = gSaveContext.eventChkInf[4] & ~1;
|
||||
gSaveContext.eventChkInf[4] = i;
|
||||
|
||||
@@ -242,7 +245,8 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
if (ResourceMgr_GetGameRegion(0) == GAME_REGION_PAL && gSaveContext.language != LANGUAGE_JPN) {
|
||||
gSaveContext.ship.filenameLanguage = NAME_LANGUAGE_PAL;
|
||||
} else { // GAME_REGION_NTSC
|
||||
gSaveContext.ship.filenameLanguage = (gSaveContext.language == LANGUAGE_JPN) ? NAME_LANGUAGE_NTSC_JPN : NAME_LANGUAGE_NTSC_ENG;
|
||||
gSaveContext.ship.filenameLanguage =
|
||||
(gSaveContext.language == LANGUAGE_JPN) ? NAME_LANGUAGE_NTSC_JPN : NAME_LANGUAGE_NTSC_ENG;
|
||||
}
|
||||
|
||||
if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))) {
|
||||
|
||||
@@ -59,8 +59,8 @@ void SsSram_Dma(void* dramAddr, size_t size, s32 direction) {
|
||||
|
||||
void SsSram_ReadWrite(uintptr_t addr, void* dramAddr, size_t size, s32 direction) {
|
||||
osSyncPrintf("ssSRAMReadWrite:%08x %08x %08x %d\n", addr, (uintptr_t)dramAddr, size, direction);
|
||||
|
||||
switch (direction) {
|
||||
|
||||
switch (direction) {
|
||||
case OS_WRITE: {
|
||||
Ctx_WriteSaveFile(addr, dramAddr, size);
|
||||
} break;
|
||||
@@ -68,6 +68,6 @@ void SsSram_ReadWrite(uintptr_t addr, void* dramAddr, size_t size, s32 direction
|
||||
Ctx_ReadSaveFile(addr, dramAddr, size);
|
||||
} break;
|
||||
}
|
||||
//SsSram_Init(addr, DEVICE_TYPE_SRAM, PI_DOMAIN2, 5, 0xD, 2, 0xC, 0);
|
||||
//SsSram_Dma(dramAddr, size, direction);
|
||||
// SsSram_Init(addr, DEVICE_TYPE_SRAM, PI_DOMAIN2, 5, 0xD, 2, 0xC, 0);
|
||||
// SsSram_Dma(dramAddr, size, direction);
|
||||
}
|
||||
|
||||
+14
-12
@@ -76,10 +76,9 @@ void View_GetParams(View* view, Vec3f* eye, Vec3f* lookAt, Vec3f* up) {
|
||||
*eye = view->eye;
|
||||
*lookAt = view->lookAt;
|
||||
*up = view->up;
|
||||
//view->flags |= 1;
|
||||
// view->flags |= 1;
|
||||
}
|
||||
|
||||
|
||||
void func_800AA358(View* view, Vec3f* eye, Vec3f* lookAt, Vec3f* up) {
|
||||
if (eye->x == lookAt->x && eye->z == lookAt->z) {
|
||||
eye->x += 0.1f;
|
||||
@@ -109,7 +108,7 @@ void View_GetScale(View* view, f32* scale) {
|
||||
void func_800AA460(View* view, f32 fovy, f32 near, f32 far) {
|
||||
view->fovy = fovy;
|
||||
view->zNear = near;
|
||||
//view->zNear = -30;
|
||||
// view->zNear = -30;
|
||||
view->zFar = far;
|
||||
view->flags |= 4;
|
||||
}
|
||||
@@ -123,7 +122,7 @@ void func_800AA48C(View* view, f32* fovy, f32* near, f32* far) {
|
||||
void func_800AA4A8(View* view, f32 fovy, f32 near, f32 far) {
|
||||
view->fovy = fovy;
|
||||
view->zNear = near;
|
||||
//view->zNear = -30;
|
||||
// view->zNear = -30;
|
||||
view->zFar = far;
|
||||
view->flags |= 8;
|
||||
view->scale = 1.0f;
|
||||
@@ -334,8 +333,8 @@ s32 func_800AAA9C(View* view) {
|
||||
|
||||
func_800ABE74(view->eye.x, view->eye.y, view->eye.z);
|
||||
MtxF viewingF;
|
||||
guLookAtF(viewingF.mf, view->eye.x, view->eye.y, view->eye.z, view->lookAt.x, view->lookAt.y, view->lookAt.z, view->up.x,
|
||||
view->up.y, view->up.z);
|
||||
guLookAtF(viewingF.mf, view->eye.x, view->eye.y, view->eye.z, view->lookAt.x, view->lookAt.y, view->lookAt.z,
|
||||
view->up.x, view->up.y, view->up.z);
|
||||
|
||||
// Some heuristics to identify instant camera movements and skip interpolation in that case
|
||||
|
||||
@@ -357,9 +356,12 @@ s32 func_800AAA9C(View* view) {
|
||||
odiry /= odir_dist;
|
||||
odirz /= odir_dist;
|
||||
|
||||
float eye_dist = sqrtf(sqr(view->eye.x - old_view.eye.x) + sqr(view->eye.y - old_view.eye.y) + sqr(view->eye.z - old_view.eye.z));
|
||||
float look_dist = sqrtf(sqr(view->lookAt.x - old_view.lookAt.x) + sqr(view->lookAt.y - old_view.lookAt.y) + sqr(view->lookAt.z - old_view.lookAt.z));
|
||||
float up_dist = sqrtf(sqr(view->up.x - old_view.up.x) + sqr(view->up.y - old_view.up.y) + sqr(view->up.z - old_view.up.z));
|
||||
float eye_dist = sqrtf(sqr(view->eye.x - old_view.eye.x) + sqr(view->eye.y - old_view.eye.y) +
|
||||
sqr(view->eye.z - old_view.eye.z));
|
||||
float look_dist = sqrtf(sqr(view->lookAt.x - old_view.lookAt.x) + sqr(view->lookAt.y - old_view.lookAt.y) +
|
||||
sqr(view->lookAt.z - old_view.lookAt.z));
|
||||
float up_dist =
|
||||
sqrtf(sqr(view->up.x - old_view.up.x) + sqr(view->up.y - old_view.up.y) + sqr(view->up.z - old_view.up.z));
|
||||
float d_dist = sqrtf(sqr(dirx - odirx) + sqr(diry - odiry) + sqr(dirz - odirz));
|
||||
|
||||
bool dont_interpolate = false;
|
||||
@@ -453,10 +455,10 @@ s32 func_800AAA9C(View* view) {
|
||||
|
||||
view->viewing = *viewing;
|
||||
|
||||
|
||||
/*if (eye_dist > 1 || look_dist > 1 || abs(up_dist) > 0.1 || abs(d_dist) > 0.1)
|
||||
printf("%d %f %f %f, %f %f %f, %f %f %f, %f %f %f %f %d\n", (int)view->fovy, view->eye.x, view->eye.y, view->eye.z, view->lookAt.x, view->lookAt.y, view->lookAt.z,
|
||||
view->up.x, view->up.y, view->up.z, eye_dist, look_dist, up_dist, d_dist, dont_interpolate);*/
|
||||
printf("%d %f %f %f, %f %f %f, %f %f %f, %f %f %f %f %d\n", (int)view->fovy, view->eye.x, view->eye.y,
|
||||
view->eye.z, view->lookAt.x, view->lookAt.y, view->lookAt.z, view->up.x, view->up.y, view->up.z, eye_dist,
|
||||
look_dist, up_dist, d_dist, dont_interpolate);*/
|
||||
|
||||
old_view = *view;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
// Upstream TODO: Replace these ones they are served from other headers
|
||||
#define ASSERT(cond, msg, file, line) assert(cond)
|
||||
#define GPACK_IA16(i, a) (((i) << 8) | (a))
|
||||
#define GPACK_IA16(i, a) (((i) << 8) | (a))
|
||||
|
||||
// Height of the fragments the color frame buffer (CFB) is split into.
|
||||
// It is the maximum amount of lines such that all rgba16 SCREEN_WIDTH-long lines fit into
|
||||
|
||||
+335
-404
@@ -71,7 +71,6 @@
|
||||
#include "assets/textures/skyboxes/vr_holy1_static.h"
|
||||
#include "assets/textures/skyboxes/vr_holy1_pal_static.h"
|
||||
|
||||
|
||||
u32 D_8012AC90[4] = {
|
||||
0x00000000,
|
||||
0x00010000,
|
||||
@@ -246,13 +245,11 @@ s32 func_800ADBB0(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 arg2, s32 arg3, s3
|
||||
arg2 += i;
|
||||
gSPCullDisplayList(skyboxCtx->unk_138++, 0, 15);
|
||||
|
||||
|
||||
for (phi_t2_4 = 0, phi_ra = 0; phi_ra < 4; phi_ra++, phi_a2_4 += 0x1F) {
|
||||
for (phi_a0_4 = 0, phi_t1 = 0; phi_t1 < 4; phi_t1++, phi_a0_4 += 0x3F, phi_t2_4 += 4) {
|
||||
gDPLoadTextureTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8],
|
||||
G_IM_FMT_CI, G_IM_SIZ_8b, 256, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x3F,
|
||||
phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadTextureTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], G_IM_FMT_CI, G_IM_SIZ_8b, 256, 0,
|
||||
phi_a0_4, phi_a2_4, phi_a0_4 + 0x3F, phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
|
||||
gSP1Quadrangle(skyboxCtx->unk_138++, D_8012AD40[phi_t2_4 + 1], D_8012AD40[phi_t2_4 + 2],
|
||||
D_8012AD40[phi_t2_4 + 3], D_8012AD40[phi_t2_4 + 0], 3);
|
||||
@@ -361,13 +358,13 @@ s32 func_800AE2C0(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 arg2, s32 arg3, s3
|
||||
phi_a2_4 = 0;
|
||||
for (phi_t2_4 = 0, phi_ra = 0; phi_ra < 4; phi_ra++, phi_a2_4 += 0x1F) {
|
||||
for (phi_a0_4 = 0, phi_t1 = 0; phi_t1 < 4; phi_t1++, phi_a0_4 += 0x1F, phi_t2_4 += 4) {
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], 0,
|
||||
G_TX_RENDERTILE, G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F,
|
||||
phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[1][arg8], 0x80, 1,
|
||||
G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F,
|
||||
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], 0, G_TX_RENDERTILE, G_IM_FMT_CI,
|
||||
G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[1][arg8], 0x80, 1, G_IM_FMT_CI, G_IM_SIZ_8b,
|
||||
128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD);
|
||||
|
||||
gDPNoOpString(skyboxCtx->unk_138++, "TEST2", 0);
|
||||
@@ -380,13 +377,13 @@ s32 func_800AE2C0(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 arg2, s32 arg3, s3
|
||||
phi_a2_4 = 0;
|
||||
for (phi_t2_4 = 0, phi_ra = 0; phi_ra < 2; phi_ra++, phi_a2_4 += 0x1F) {
|
||||
for (phi_a0_4 = 0, phi_t1 = 0; phi_t1 < 4; phi_t1++, phi_a0_4 += 0x1F, phi_t2_4 += 4) {
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], 0,
|
||||
G_TX_RENDERTILE, G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F,
|
||||
phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[1][arg8], 0x80, 1,
|
||||
G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F,
|
||||
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], 0, G_TX_RENDERTILE, G_IM_FMT_CI,
|
||||
G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[1][arg8], 0x80, 1, G_IM_FMT_CI, G_IM_SIZ_8b,
|
||||
128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD);
|
||||
gSP1Quadrangle(skyboxCtx->unk_138++, D_8012AE3C[phi_t2_4 + 1], D_8012AE3C[phi_t2_4 + 2],
|
||||
D_8012AE3C[phi_t2_4 + 3], D_8012AE3C[phi_t2_4 + 0], 3);
|
||||
@@ -395,13 +392,13 @@ s32 func_800AE2C0(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 arg2, s32 arg3, s3
|
||||
phi_a2_4 -= 0x1F;
|
||||
for (phi_ra = 0; phi_ra < 2; phi_ra++, phi_a2_4 -= 0x1F) {
|
||||
for (phi_a0_4 = 0, phi_t1 = 0; phi_t1 < 4; phi_t1++, phi_a0_4 += 0x1F, phi_t2_4 += 4) {
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], 0,
|
||||
G_TX_RENDERTILE, G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F,
|
||||
phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[1][arg8], 0x80, 1,
|
||||
G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F,
|
||||
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], 0, G_TX_RENDERTILE, G_IM_FMT_CI,
|
||||
G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[1][arg8], 0x80, 1, G_IM_FMT_CI, G_IM_SIZ_8b,
|
||||
128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOLOD);
|
||||
gSP1Quadrangle(skyboxCtx->unk_138++, D_8012AE3C[phi_t2_4 + 1], D_8012AE3C[phi_t2_4 + 2],
|
||||
D_8012AE3C[phi_t2_4 + 3], D_8012AE3C[phi_t2_4 + 0], 3);
|
||||
@@ -450,143 +447,84 @@ void func_800AF178(SkyboxContext* skyboxCtx, s32 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void LoadSkyboxTex(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height, int offsetW, int offsetH)
|
||||
{
|
||||
void LoadSkyboxTex(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height,
|
||||
int offsetW, int offsetH) {
|
||||
skyboxCtx->textures[segmentIndex][imageIndex] = tex;
|
||||
}
|
||||
|
||||
void LoadSkyboxTexAtOffset(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height, int offset)
|
||||
{
|
||||
void LoadSkyboxTexAtOffset(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height,
|
||||
int offset) {
|
||||
skyboxCtx->textures[segmentIndex][imageIndex] = tex;
|
||||
}
|
||||
|
||||
void LoadSkyboxPalette(SkyboxContext* skyboxCtx, int paletteIndex, char* palTex, int width,
|
||||
int height) {
|
||||
void LoadSkyboxPalette(SkyboxContext* skyboxCtx, int paletteIndex, char* palTex, int width, int height) {
|
||||
skyboxCtx->palettes[paletteIndex] = palTex;
|
||||
skyboxCtx->palette_size = width * height;
|
||||
}
|
||||
|
||||
static const char* sSBVRFine0Tex[] =
|
||||
{
|
||||
gSunriseSkybox1Tex, gSunriseSkybox2Tex, gSunriseSkybox3Tex, gSunriseSkybox4Tex, gSunriseSkybox5Tex
|
||||
};
|
||||
static const char* sSBVRFine0Tex[] = { gSunriseSkybox1Tex, gSunriseSkybox2Tex, gSunriseSkybox3Tex, gSunriseSkybox4Tex,
|
||||
gSunriseSkybox5Tex };
|
||||
|
||||
static const char* sSBVRFine0Pal[] =
|
||||
{
|
||||
gSunriseSkyboxTLUT
|
||||
};
|
||||
static const char* sSBVRFine0Pal[] = { gSunriseSkyboxTLUT };
|
||||
|
||||
static const char* sSBVRFine1Tex[] =
|
||||
{
|
||||
gDaySkybox1Tex, gDaySkybox2Tex, gDaySkybox3Tex, gDaySkybox4Tex, gDaySkybox5Tex
|
||||
};
|
||||
static const char* sSBVRFine1Tex[] = { gDaySkybox1Tex, gDaySkybox2Tex, gDaySkybox3Tex, gDaySkybox4Tex, gDaySkybox5Tex };
|
||||
|
||||
static const char* sSBVRFine1Pal[] =
|
||||
{
|
||||
gDaySkyboxTLUT
|
||||
};
|
||||
static const char* sSBVRFine1Pal[] = { gDaySkyboxTLUT };
|
||||
|
||||
static const char* sSBVRFine2Tex[] =
|
||||
{
|
||||
gSunsetSkybox1Tex, gSunsetSkybox2Tex, gSunsetSkybox3Tex, gSunsetSkybox4Tex, gSunsetSkybox5Tex
|
||||
};
|
||||
static const char* sSBVRFine2Tex[] = { gSunsetSkybox1Tex, gSunsetSkybox2Tex, gSunsetSkybox3Tex, gSunsetSkybox4Tex,
|
||||
gSunsetSkybox5Tex };
|
||||
|
||||
static const char* sSBVRFine2Pal[] =
|
||||
{
|
||||
gSunsetSkyboxTLUT
|
||||
};
|
||||
static const char* sSBVRFine2Pal[] = { gSunsetSkyboxTLUT };
|
||||
|
||||
static const char* sSBVRFine3Tex[] =
|
||||
{
|
||||
gNightSkybox1Tex, gNightSkybox2Tex, gNightSkybox3Tex, gNightSkybox4Tex, gNightSkybox5Tex
|
||||
};
|
||||
static const char* sSBVRFine3Tex[] = { gNightSkybox1Tex, gNightSkybox2Tex, gNightSkybox3Tex, gNightSkybox4Tex,
|
||||
gNightSkybox5Tex };
|
||||
|
||||
static const char* sSBVRFine3Pal[] =
|
||||
{
|
||||
gNightSkyboxTLUT
|
||||
};
|
||||
static const char* sSBVRFine3Pal[] = { gNightSkyboxTLUT };
|
||||
|
||||
static const char* sSBVRCloud0Tex[] =
|
||||
{
|
||||
gSunriseOvercastSkybox1Tex, gSunriseOvercastSkybox2Tex, gSunriseOvercastSkybox3Tex, gSunriseOvercastSkybox4Tex, gSunriseOvercastSkybox5Tex
|
||||
};
|
||||
static const char* sSBVRCloud0Tex[] = { gSunriseOvercastSkybox1Tex, gSunriseOvercastSkybox2Tex,
|
||||
gSunriseOvercastSkybox3Tex, gSunriseOvercastSkybox4Tex,
|
||||
gSunriseOvercastSkybox5Tex };
|
||||
|
||||
static const char* sSBVRCloud0Pal[] =
|
||||
{
|
||||
gSunriseOvercastSkyboxTLUT
|
||||
};
|
||||
static const char* sSBVRCloud0Pal[] = { gSunriseOvercastSkyboxTLUT };
|
||||
|
||||
static const char* sSBVRCloud1Tex[] =
|
||||
{
|
||||
gDayOvercastSkybox1Tex, gDayOvercastSkybox2Tex, gDayOvercastSkybox3Tex, gDayOvercastSkybox4Tex, gDayOvercastSkybox5Tex
|
||||
};
|
||||
static const char* sSBVRCloud1Tex[] = { gDayOvercastSkybox1Tex, gDayOvercastSkybox2Tex, gDayOvercastSkybox3Tex,
|
||||
gDayOvercastSkybox4Tex, gDayOvercastSkybox5Tex };
|
||||
|
||||
static const char* sSBVRCloud1Pal[] =
|
||||
{
|
||||
gDayOvercastSkyboxTLUT
|
||||
};
|
||||
static const char* sSBVRCloud1Pal[] = { gDayOvercastSkyboxTLUT };
|
||||
|
||||
static const char* sSBVRCloud2Tex[] =
|
||||
{
|
||||
gSunsetOvercastSkybox1Tex, gSunsetOvercastSkybox2Tex, gSunsetOvercastSkybox3Tex, gSunsetOvercastSkybox4Tex, gSunsetOvercastSkybox5Tex
|
||||
};
|
||||
static const char* sSBVRCloud2Tex[] = { gSunsetOvercastSkybox1Tex, gSunsetOvercastSkybox2Tex, gSunsetOvercastSkybox3Tex,
|
||||
gSunsetOvercastSkybox4Tex, gSunsetOvercastSkybox5Tex };
|
||||
|
||||
static const char* sSBVRCloud2Pal[] =
|
||||
{
|
||||
gSunsetOvercastSkyboxTLUT
|
||||
};
|
||||
static const char* sSBVRCloud2Pal[] = { gSunsetOvercastSkyboxTLUT };
|
||||
|
||||
static const char* sSBVRCloud3Tex[] =
|
||||
{
|
||||
gNightOvercastSkybox1Tex, gNightOvercastSkybox2Tex, gNightOvercastSkybox3Tex, gNightOvercastSkybox4Tex, gNightOvercastSkybox5Tex
|
||||
};
|
||||
static const char* sSBVRCloud3Tex[] = { gNightOvercastSkybox1Tex, gNightOvercastSkybox2Tex, gNightOvercastSkybox3Tex,
|
||||
gNightOvercastSkybox4Tex, gNightOvercastSkybox5Tex };
|
||||
|
||||
static const char* sSBVRCloud3Pal[] =
|
||||
{
|
||||
gNightOvercastSkyboxTLUT
|
||||
};
|
||||
static const char* sSBVRCloud3Pal[] = { gNightOvercastSkyboxTLUT };
|
||||
|
||||
static const char* sSBVRHoly0Tex[] =
|
||||
{
|
||||
gHoly0Skybox1Tex, gHoly0Skybox2Tex, gHoly0Skybox3Tex, gHoly0Skybox4Tex, gHoly0Skybox5Tex
|
||||
};
|
||||
static const char* sSBVRHoly0Tex[] = { gHoly0Skybox1Tex, gHoly0Skybox2Tex, gHoly0Skybox3Tex, gHoly0Skybox4Tex,
|
||||
gHoly0Skybox5Tex };
|
||||
|
||||
static const char* sSBVRHoly0Pal[] =
|
||||
{
|
||||
gHoly0SkyboxTLUT
|
||||
};
|
||||
static const char* sSBVRHoly0Pal[] = { gHoly0SkyboxTLUT };
|
||||
|
||||
SkyboxTableEntry sSkyboxTable[] = {
|
||||
{ sSBVRFine0Tex, sSBVRFine0Pal
|
||||
|
||||
SkyboxTableEntry sSkyboxTable[] =
|
||||
{
|
||||
{
|
||||
sSBVRFine0Tex,
|
||||
sSBVRFine0Pal
|
||||
|
||||
},
|
||||
{
|
||||
sSBVRFine1Tex,
|
||||
sSBVRFine1Pal
|
||||
},
|
||||
{
|
||||
sSBVRFine2Tex,
|
||||
sSBVRFine2Pal
|
||||
},
|
||||
{
|
||||
sSBVRFine3Tex,
|
||||
sSBVRFine3Pal
|
||||
},
|
||||
{ sSBVRFine1Tex, sSBVRFine1Pal },
|
||||
{ sSBVRFine2Tex, sSBVRFine2Pal },
|
||||
{ sSBVRFine3Tex, sSBVRFine3Pal },
|
||||
{
|
||||
sSBVRCloud0Tex,
|
||||
sSBVRCloud0Pal,
|
||||
},
|
||||
{
|
||||
sSBVRCloud1Tex,
|
||||
sSBVRCloud1Pal,
|
||||
sSBVRCloud1Tex,
|
||||
sSBVRCloud1Pal,
|
||||
},
|
||||
{
|
||||
sSBVRCloud2Tex,
|
||||
sSBVRCloud2Pal,
|
||||
sSBVRCloud2Pal,
|
||||
},
|
||||
{
|
||||
sSBVRCloud3Tex,
|
||||
@@ -606,346 +544,339 @@ void Skybox_Setup(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId) {
|
||||
uintptr_t start;
|
||||
s32 phi_v1;
|
||||
|
||||
switch (skyboxId)
|
||||
{
|
||||
case SKYBOX_NORMAL_SKY:
|
||||
phi_v1 = 0;
|
||||
if (gSaveContext.retainWeatherMode != 0 && gSaveContext.sceneSetupIndex < 4 && gWeatherMode > 0 &&
|
||||
gWeatherMode < 6) {
|
||||
phi_v1 = 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
if (gSaveContext.skyboxTime >= D_8011FC1C[phi_v1][i].startTime &&
|
||||
(gSaveContext.skyboxTime < D_8011FC1C[phi_v1][i].endTime ||
|
||||
D_8011FC1C[phi_v1][i].endTime == 0xFFFF)) {
|
||||
play->envCtx.skybox1Index = sp41 = D_8011FC1C[phi_v1][i].skybox1Index;
|
||||
play->envCtx.skybox2Index = sp40 = D_8011FC1C[phi_v1][i].skybox2Index;
|
||||
if (D_8011FC1C[phi_v1][i].blend != 0) {
|
||||
play->envCtx.skyboxBlend =
|
||||
Environment_LerpWeight(D_8011FC1C[phi_v1][i].endTime, D_8011FC1C[phi_v1][i].startTime,
|
||||
((void)0, gSaveContext.skyboxTime)) *
|
||||
255.0f;
|
||||
}
|
||||
else {
|
||||
play->envCtx.skyboxBlend = 0;
|
||||
}
|
||||
break;
|
||||
switch (skyboxId) {
|
||||
case SKYBOX_NORMAL_SKY:
|
||||
phi_v1 = 0;
|
||||
if (gSaveContext.retainWeatherMode != 0 && gSaveContext.sceneSetupIndex < 4 && gWeatherMode > 0 &&
|
||||
gWeatherMode < 6) {
|
||||
phi_v1 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
if (gSaveContext.skyboxTime >= D_8011FC1C[phi_v1][i].startTime &&
|
||||
(gSaveContext.skyboxTime < D_8011FC1C[phi_v1][i].endTime ||
|
||||
D_8011FC1C[phi_v1][i].endTime == 0xFFFF)) {
|
||||
play->envCtx.skybox1Index = sp41 = D_8011FC1C[phi_v1][i].skybox1Index;
|
||||
play->envCtx.skybox2Index = sp40 = D_8011FC1C[phi_v1][i].skybox2Index;
|
||||
if (D_8011FC1C[phi_v1][i].blend != 0) {
|
||||
play->envCtx.skyboxBlend =
|
||||
Environment_LerpWeight(D_8011FC1C[phi_v1][i].endTime, D_8011FC1C[phi_v1][i].startTime,
|
||||
((void)0, gSaveContext.skyboxTime)) *
|
||||
255.0f;
|
||||
} else {
|
||||
play->envCtx.skyboxBlend = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SkyboxTableEntry entryA = sSkyboxTable[sp41];
|
||||
SkyboxTableEntry entryA = sSkyboxTable[sp41];
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
LoadSkyboxTex(skyboxCtx, 0, i, entryA.textures[i], 128, i == 4 ? 128 : 64, 128, 64);
|
||||
for (int i = 0; i < 5; i++)
|
||||
LoadSkyboxTex(skyboxCtx, 0, i, entryA.textures[i], 128, i == 4 ? 128 : 64, 128, 64);
|
||||
|
||||
SkyboxTableEntry entryB = sSkyboxTable[sp40];
|
||||
SkyboxTableEntry entryB = sSkyboxTable[sp40];
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
LoadSkyboxTex(skyboxCtx, 1, i, entryB.textures[i], 128, i == 4 ? 128 : 64, 128, 64);
|
||||
|
||||
if ((sp41 & 1) ^ ((sp41 & 4) >> 2))
|
||||
{
|
||||
LoadSkyboxPalette(skyboxCtx, 0, entryA.palettes[0], 16, 8);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, entryB.palettes[0], 16, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadSkyboxPalette(skyboxCtx, 0, entryB.palettes[0], 16, 8);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, entryA.palettes[0], 16, 8);
|
||||
}
|
||||
break;
|
||||
case SKYBOX_BAZAAR:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
for (int i = 0; i < 5; i++)
|
||||
LoadSkyboxTex(skyboxCtx, 1, i, entryB.textures[i], 128, i == 4 ? 128 : 64, 128, 64);
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gBazaarBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gBazaar2BgTex, 256, 256, 256, 256);
|
||||
if ((sp41 & 1) ^ ((sp41 & 4) >> 2)) {
|
||||
LoadSkyboxPalette(skyboxCtx, 0, entryA.palettes[0], 16, 8);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, entryB.palettes[0], 16, 8);
|
||||
} else {
|
||||
LoadSkyboxPalette(skyboxCtx, 0, entryB.palettes[0], 16, 8);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, entryA.palettes[0], 16, 8);
|
||||
}
|
||||
break;
|
||||
case SKYBOX_BAZAAR:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gBazaarBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gBazaarBg2TLUT, 16, 16);
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_HOUSE_LINK:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gBazaarBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gBazaar2BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gLinksHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gLinksHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gLinksHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gLinksHouse4BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gBazaarBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gBazaarBg2TLUT, 16, 16);
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_HOUSE_LINK:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gLinksHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gLinksHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gLinksHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gLinksHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_OVERCAST_SUNSET:
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 0, gSunsetOvercastSkybox1Tex, 128, 64, 0x0);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 1, gSunsetOvercastSkybox2Tex, 128, 64, 0x2000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 2, gSunsetOvercastSkybox3Tex, 128, 64, 0x4000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 3, gSunsetOvercastSkybox4Tex, 128, 64, 0x6000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 4, gSunsetOvercastSkybox5Tex, 128, 128, 0x8000);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gLinksHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gLinksHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gLinksHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gLinksHouse4BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gSunsetOvercastSkyboxTLUT, 16, 8);
|
||||
break;
|
||||
case SKYBOX_MARKET_ADULT:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gLinksHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gLinksHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gLinksHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gLinksHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_OVERCAST_SUNSET:
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 0, gSunsetOvercastSkybox1Tex, 128, 64, 0x0);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 1, gSunsetOvercastSkybox2Tex, 128, 64, 0x2000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 2, gSunsetOvercastSkybox3Tex, 128, 64, 0x4000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 3, gSunsetOvercastSkybox4Tex, 128, 64, 0x6000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 4, gSunsetOvercastSkybox5Tex, 128, 128, 0x8000);
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMarketRuinsBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMarketRuins2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gMarketRuins3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gMarketRuins4BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gSunsetOvercastSkyboxTLUT, 16, 8);
|
||||
break;
|
||||
case SKYBOX_MARKET_ADULT:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMarketRuinsBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMarketRuinsBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gMarketRuinsBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gMarketRuinsBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_CUTSCENE_MAP:
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 0, gHoly0Skybox1Tex, 128, 64, 0x0);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 1, gHoly0Skybox2Tex, 128, 64, 0x2000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 2, gHoly0Skybox3Tex, 128, 64, 0x4000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 3, gHoly0Skybox4Tex, 128, 64, 0x6000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 4, gHoly0Skybox5Tex, 128, 128, 0x8000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 5, gHoly0Skybox6Tex, 128, 128, 0xC000);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMarketRuinsBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMarketRuins2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gMarketRuins3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gMarketRuins4BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gHoly0SkyboxTLUT, 16, 8);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMarketRuinsBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMarketRuinsBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gMarketRuinsBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gMarketRuinsBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_CUTSCENE_MAP:
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 0, gHoly0Skybox1Tex, 128, 64, 0x0);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 1, gHoly0Skybox2Tex, 128, 64, 0x2000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 2, gHoly0Skybox3Tex, 128, 64, 0x4000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 3, gHoly0Skybox4Tex, 128, 64, 0x6000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 4, gHoly0Skybox5Tex, 128, 128, 0x8000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 0, 5, gHoly0Skybox6Tex, 128, 128, 0xC000);
|
||||
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 0, gHoly1Skybox1Tex, 128, 64, 0x0);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 1, gHoly1Skybox2Tex, 128, 64, 0x2000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 2, gHoly1Skybox3Tex, 128, 64, 0x4000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 3, gHoly1Skybox4Tex, 128, 64, 0x6000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 4, gHoly1Skybox5Tex, 128, 128, 0x8000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 5, gHoly1Skybox6Tex, 128, 128, 0xC000);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gHoly0SkyboxTLUT, 16, 8);
|
||||
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 0, gHoly1Skybox1Tex, 128, 64, 0x0);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 1, gHoly1Skybox2Tex, 128, 64, 0x2000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 2, gHoly1Skybox3Tex, 128, 64, 0x4000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 3, gHoly1Skybox4Tex, 128, 64, 0x6000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 4, gHoly1Skybox5Tex, 128, 128, 0x8000);
|
||||
LoadSkyboxTexAtOffset(skyboxCtx, 1, 5, gHoly1Skybox6Tex, 128, 128, 0xC000);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gHoly1SkyboxTLUT, 16, 8);
|
||||
break;
|
||||
case SKYBOX_MARKET_CHILD_DAY:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gHoly1SkyboxTLUT, 16, 8);
|
||||
break;
|
||||
case SKYBOX_MARKET_CHILD_DAY:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMarketDayBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMarketDay2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gMarketDay3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gMarketDay4BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMarketDayBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMarketDay2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gMarketDay3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gMarketDay4BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMarketDayBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMarketDayBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gMarketDayBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gMarketDayBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_MARKET_CHILD_NIGHT:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMarketDayBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMarketDayBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gMarketDayBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gMarketDayBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_MARKET_CHILD_NIGHT:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMarketNightBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMarketNight2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gMarketNight3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gMarketNight4BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMarketNightBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMarketNight2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gMarketNight3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gMarketNight4BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMarketNightBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMarketNightBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gMarketNightBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gMarketNightBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HAPPY_MASK_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMarketNightBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMarketNightBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gMarketNightBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gMarketNightBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HAPPY_MASK_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMaskShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMaskShop2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMaskShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMaskShop2BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMaskShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMaskShopBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMaskShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMaskShopBg2TLUT, 16, 16);
|
||||
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_HOUSE_KNOW_IT_ALL_BROTHERS:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_HOUSE_KNOW_IT_ALL_BROTHERS:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gKnowItAllBrosHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gKnowItAllBrosHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gKnowItAllBrosHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gKnowItAllBrosHouse4BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gKnowItAllBrosHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gKnowItAllBrosHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gKnowItAllBrosHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gKnowItAllBrosHouse4BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gKnowItAllBrosHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gKnowItAllBrosHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gKnowItAllBrosHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gKnowItAllBrosHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_OF_TWINS:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gKnowItAllBrosHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gKnowItAllBrosHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gKnowItAllBrosHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gKnowItAllBrosHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_OF_TWINS:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gHouseOfTwinsBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gHouseOfTwins2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gHouseOfTwins3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gHouseOfTwinsBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gHouseOfTwins2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gHouseOfTwins3BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gHouseOfTwinsBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gHouseOfTwinsBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gHouseOfTwinsBg3TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_STABLES:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gHouseOfTwinsBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gHouseOfTwinsBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gHouseOfTwinsBg3TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_STABLES:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gStableBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gStable2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gStable3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gStable4BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gStableBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gStable2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gStable3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gStable4BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gStableBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gStableBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gStableBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gStableBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_KAKARIKO:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gStableBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gStableBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gStableBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gStableBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_KAKARIKO:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gCarpentersHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gCarpentersHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gCarpentersHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gCarpentersHouse4BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gCarpentersHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gCarpentersHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gCarpentersHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gCarpentersHouse4BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gCarpentersHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gCarpentersHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gCarpentersHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gCarpentersHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_KOKIRI_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gCarpentersHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gCarpentersHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gCarpentersHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gCarpentersHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_KOKIRI_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gKokiriShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gKokiriShop2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gKokiriShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gKokiriShop2BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gKokiriShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gKokiriShopBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gKokiriShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gKokiriShopBg2TLUT, 16, 16);
|
||||
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_GORON_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_GORON_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gGoronShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gGoronShop2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gGoronShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gGoronShop2BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gGoronShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gGoronShopBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gGoronShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gGoronShopBg2TLUT, 16, 16);
|
||||
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_ZORA_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_ZORA_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gZoraShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gZoraShop2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gZoraShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gZoraShop2BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gZoraShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gZoraShopBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gZoraShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gZoraShopBg2TLUT, 16, 16);
|
||||
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_POTION_SHOP_KAKARIKO:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_POTION_SHOP_KAKARIKO:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gKakPotionShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gKakPotionShop2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gKakPotionShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gKakPotionShop2BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gKakPotionShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gKakPotionShopBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gKakPotionShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gKakPotionShopBg2TLUT, 16, 16);
|
||||
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_POTION_SHOP_MARKET:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_POTION_SHOP_MARKET:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMarketPotionShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMarketPotionShop2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMarketPotionShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMarketPotionShop2BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMarketPotionShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMarketPotionShopBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMarketPotionShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMarketPotionShopBg2TLUT, 16, 16);
|
||||
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_BOMBCHU_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_BOMBCHU_SHOP:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gBombchuShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gBombchuShop2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gBombchuShopBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gBombchuShop2BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gBombchuShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gBombchuShopBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gBombchuShopBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gBombchuShopBg2TLUT, 16, 16);
|
||||
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_HOUSE_RICHARD:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
skyboxCtx->rot.y = 0.8f;
|
||||
break;
|
||||
case SKYBOX_HOUSE_RICHARD:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gRichardsHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gRichardsHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gRichardsHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gRichardsHouse4BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gRichardsHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gRichardsHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gRichardsHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gRichardsHouse4BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gRichardsHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gRichardsHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gRichardsHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gRichardsHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_IMPA:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gRichardsHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gRichardsHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gRichardsHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gRichardsHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_IMPA:
|
||||
skyboxCtx->unk_140 = 1;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gCowHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gCowHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gCowHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gCowHouse4BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gCowHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gCowHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gCowHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 3, gCowHouse4BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gCowHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gCowHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gCowHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gCowHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_TENT:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gCowHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gCowHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gCowHouseBg3TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 3, gCowHouseBg4TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_TENT:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gCarpentersTentBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gCarpentersTent2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gCarpentersTent3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gCarpentersTentBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gCarpentersTent2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gCarpentersTent3BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gCarpentersTentBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gCarpentersTentBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gCarpentersTentBg3TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_MIDO:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gCarpentersTentBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gCarpentersTentBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gCarpentersTentBg3TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_MIDO:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMidosHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMidosHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gMidosHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gMidosHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gMidosHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gMidosHouse3BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMidosHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMidosHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gMidosHouseBg3TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_SARIA:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gMidosHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gMidosHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gMidosHouseBg3TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_SARIA:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gSariasHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gSariasHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gSariasHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gSariasHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gSariasHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gSariasHouse3BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gSariasHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gSariasHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gSariasHouseBg3TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_ALLEY:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gSariasHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gSariasHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gSariasHouseBg3TLUT, 16, 16);
|
||||
break;
|
||||
case SKYBOX_HOUSE_ALLEY:
|
||||
skyboxCtx->unk_140 = 2;
|
||||
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gBackAlleyHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gBackAlleyHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gBackAlleyHouse3BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 0, gBackAlleyHouseBgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 1, gBackAlleyHouse2BgTex, 256, 256, 256, 256);
|
||||
LoadSkyboxTex(skyboxCtx, 0, 2, gBackAlleyHouse3BgTex, 256, 256, 256, 256);
|
||||
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gBackAlleyHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gBackAlleyHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gBackAlleyHouseBg3TLUT, 16, 16);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
LoadSkyboxPalette(skyboxCtx, 0, gBackAlleyHouseBgTLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 1, gBackAlleyHouseBg2TLUT, 16, 16);
|
||||
LoadSkyboxPalette(skyboxCtx, 2, gBackAlleyHouseBg3TLUT, 16, 16);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb
|
||||
|
||||
Gfx_SetupDL_40Opa(gfxCtx);
|
||||
|
||||
//gsSPShaderTest(POLY_OPA_DISP++);
|
||||
// gsSPShaderTest(POLY_OPA_DISP++);
|
||||
|
||||
/*gSPSegment(POLY_OPA_DISP++, 0x7, skyboxCtx->staticSegments[0]);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x8, skyboxCtx->staticSegments[1]);
|
||||
@@ -92,7 +92,7 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb
|
||||
}
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
//gsSPShaderTest2(POLY_OPA_DISP++);
|
||||
// gsSPShaderTest2(POLY_OPA_DISP++);
|
||||
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
|
||||
@@ -16,7 +16,7 @@ void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32
|
||||
zLook = zAt - zEye;
|
||||
length = -1.0 / sqrtf(SQ(xLook) + SQ(yLook) + SQ(zLook));
|
||||
xLook *= length;
|
||||
//xLook = 2.0f;
|
||||
// xLook = 2.0f;
|
||||
yLook *= length;
|
||||
zLook *= length;
|
||||
|
||||
@@ -62,6 +62,6 @@ void guLookAt(Mtx* m, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f
|
||||
|
||||
guLookAtF(mf, xEye, yEye, zEye, xAt, yAt, zAt, xUp, yUp, zUp);
|
||||
|
||||
//guMtxF2L((MtxF*)mf, m);
|
||||
// guMtxF2L((MtxF*)mf, m);
|
||||
Matrix_MtxFToMtx((MtxF*)mf, m);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,6 @@ void guPerspective(Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 f
|
||||
f32 mf[4][4];
|
||||
|
||||
guPerspectiveF(mf, perspNorm, fovy, aspect, near, far, scale);
|
||||
//guMtxF2L((MtxF*)mf, m);
|
||||
// guMtxF2L((MtxF*)mf, m);
|
||||
Matrix_MtxFToMtx((MtxF*)mf, m);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ void guOrtho(Mtx* mtx, f32 left, f32 right, f32 bottom, f32 top, f32 near, f32 f
|
||||
|
||||
guOrthoF(mf, left, right, bottom, top, near, far, scale);
|
||||
|
||||
//guMtxF2L((MtxF*)mf, mtx);
|
||||
// guMtxF2L((MtxF*)mf, mtx);
|
||||
FrameInterpolation_RecordOpenChild("ortho", 0);
|
||||
Matrix_MtxFToMtx((MtxF*)mf, mtx);
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//#include "global.h"
|
||||
//
|
||||
//void* proutSprintf(void* dst, const char* fmt, u32 size) {
|
||||
// void* proutSprintf(void* dst, const char* fmt, u32 size) {
|
||||
// return (void*)((u32)memcpy(dst, fmt, size) + size);
|
||||
//}
|
||||
//
|
||||
//s32 vsprintf(char* dst, const char* fmt, va_list args) {
|
||||
// s32 vsprintf(char* dst, const char* fmt, va_list args) {
|
||||
// s32 ret = _Printf(proutSprintf, dst, fmt, args);
|
||||
// if (ret > -1) {
|
||||
// dst[ret] = 0;
|
||||
@@ -12,7 +12,7 @@
|
||||
// return ret;
|
||||
//}
|
||||
//
|
||||
//s32 sprintf(char* dst, const char* fmt, ...) {
|
||||
// s32 sprintf(char* dst, const char* fmt, ...) {
|
||||
// s32 ret;
|
||||
// va_list args;
|
||||
// va_start(args, fmt);
|
||||
|
||||
@@ -85,7 +85,8 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) {
|
||||
if (this->actor.parent == NULL) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
// get correct timer length for hookshot or longshot
|
||||
s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f);
|
||||
s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) *
|
||||
CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f);
|
||||
|
||||
ArmsHook_SetupAction(this, ArmsHook_Shoot);
|
||||
Actor_SetProjectileSpeed(&this->actor, 20.0f);
|
||||
@@ -172,7 +173,8 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
||||
if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) &&
|
||||
(this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
|
||||
touchedActor = this->collider.base.at;
|
||||
if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER))) {
|
||||
if ((touchedActor->update != NULL) &&
|
||||
(touchedActor->flags & (ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER))) {
|
||||
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
|
||||
ArmsHook_AttachHookToActor(this, touchedActor);
|
||||
if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)) {
|
||||
@@ -181,8 +183,8 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
this->timer = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (DECR(this->timer) == 0) {
|
||||
grabbed = this->grabbed;
|
||||
if (grabbed != NULL) {
|
||||
@@ -278,12 +280,12 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
func_80865044(this);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
CollisionCheck_SpawnShieldParticlesMetal(play, &this->actor.world.pos);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (CHECK_BTN_ANY(play->state.input[0].press.button, (buttonsToCheck))) {
|
||||
this->timer = 0;
|
||||
@@ -328,8 +330,7 @@ void ArmsHook_Draw(Actor* thisx, PlayState* play) {
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("ScaleAdultEquipmentAsChild"), 0) && LINK_IS_CHILD) {
|
||||
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
|
||||
}
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultHookshotTipDL);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Math_Vec3f_Diff(&player->unk_3C8, &this->actor.world.pos, &sp78);
|
||||
@@ -343,8 +344,7 @@ void ArmsHook_Draw(Actor* thisx, PlayState* play) {
|
||||
} else {
|
||||
Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY);
|
||||
}
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultHookshotChainDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user