Add an error for implicit functions (#3017)

* Add the flag and fix errors

* switch assert and skin matrix

* new LUS

* Use normal assert

* hopefully fix WiiU

Signed-off-by: Louis <louist103@pop-os.localdomain>

---------

Signed-off-by: Louis <louist103@pop-os.localdomain>
Co-authored-by: Louis <louist103@pop-os.localdomain>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
This commit is contained in:
louist103 2023-06-27 19:53:35 -04:00 committed by GitHub
parent 7c5efb2785
commit acfc04d0ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
84 changed files with 354 additions and 217 deletions

@ -1 +1 @@
Subproject commit 04ef63c74270dfe9df458bd8335aac7a7097468a
Subproject commit 7d60dd37120d3b37938a2ed7377007971171c8be

View File

@ -548,12 +548,16 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
-Wno-missing-field-initializers
-Wno-parentheses
-Wno-narrowing
-Wno-c++11-narrowing
-Wno-implicit-function-declaration
-Wno-missing-braces
$<$<COMPILE_LANGUAGE:C>:
-Werror-implicit-function-declaration
-Wno-incompatible-pointer-types
>
$<$<COMPILE_LANGUAGE:CXX>:-fpermissive>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-enum-enum-conversion>
$<$<COMPILE_LANGUAGE:CXX>:
-Wno-c++11-narrowing
-Wno-deprecated-enum-enum-conversion
>
-pthread
)
@ -570,12 +574,16 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
-Wno-missing-field-initializers
-Wno-parentheses
-Wno-narrowing
-Wno-c++11-narrowing
-Wno-implicit-function-declaration
-Wno-missing-braces
$<$<COMPILE_LANGUAGE:C>:
-Werror-implicit-function-declaration
-Wno-incompatible-pointer-types
>
$<$<COMPILE_LANGUAGE:CXX>:-fpermissive>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-enum-enum-conversion>
$<$<COMPILE_LANGUAGE:CXX>:
-Wno-c++11-narrowing
-Wno-deprecated-enum-enum-conversion
>
-pthread
)
@ -592,11 +600,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
-Wno-narrowing
-Wno-switch-outside-range
$<$<COMPILE_LANGUAGE:C>:
-Werror-implicit-function-declaration
-Wno-incompatible-pointer-types
-Wno-discarded-array-qualifiers
-Wno-discarded-qualifiers
-Wno-int-conversion
-Wno-implicit-function-declaration
-Wno-builtin-declaration-mismatch
-Wno-switch-unreachable
-Wno-stringop-overflow
@ -616,7 +624,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
-Wno-parentheses
-Wno-narrowing
-Wno-missing-braces
$<$<COMPILE_LANGUAGE:C>:
-Werror-implicit-function-declaration
-Wno-incompatible-pointer-types
>
$<$<COMPILE_LANGUAGE:CXX>:-fpermissive>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-enum-enum-conversion>
-pthread

View File

@ -27,6 +27,8 @@ void gSPDisplayList(Gfx* pkt, Gfx* dl);
void gSPDisplayListOffset(Gfx* pkt, Gfx* dl, int offset);
void gSPVertex(Gfx* pkt, uintptr_t v, int n, int v0);
void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr);
void gDPSetTextureImageFB(Gfx* pkt, u32 format, u32 size, u32 width, int fb);
void cleararena(void);
void bootproc(void);
@ -180,6 +182,7 @@ void __osSetWatchLo(u32);
EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params);
EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params);
void EnItem00_CustomItemsParticles(Actor* Parent, PlayState* play, GetItemEntry giEntry);
void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnPos, s16 params);
void EffectBlure_ChangeType(EffectBlure* this, int type);
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2);
@ -569,6 +572,9 @@ void Flags_UnsetRandomizerInf(RandomizerInf flag);
u16 func_80037C30(PlayState* play, s16 arg1);
s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3);
s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4);
GetItemEntry GetChestGameRandoGetItem(s8 room, s16 ogDrawId, PlayState* play);
s16 GetChestGameRandoGiDrawId(s8 room, s16 ogDrawId, PlayState* play);
// ? func_80038600(?);
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList*);
void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest);
@ -1207,10 +1213,12 @@ Gfx* Gfx_SetupDL_66(Gfx* gfx);
Gfx* func_800947AC(Gfx* gfx);
void Gfx_SetupDL_42Opa(GraphicsContext* gfxCtx);
void Gfx_SetupDL_42Overlay(GraphicsContext* gfxCtx);
void Gfx_SetupDL_42Kal(GraphicsContext* gfxCtx);
void Gfx_SetupDL_27Xlu(GraphicsContext* gfxCtx);
void Gfx_SetupDL_60NoCDXlu(GraphicsContext* gfxCtx);
void Gfx_SetupDL_61Xlu(GraphicsContext* gfxCtx);
void Gfx_SetupDL_56Ptr(Gfx** gfxp);
void Gfx_SetupDL_39Kal(GraphicsContext* gfxp);
Gfx* Gfx_BranchTexScroll(Gfx** gfxp, u32 x, u32 y, s32 width, s32 height);
Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y);
Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height);
@ -1345,6 +1353,7 @@ void SkinMatrix_Vec3fMtxFMultXYZW(MtxF* mf, Vec3f* src, Vec3f* xyzDest, f32* wDe
void SkinMatrix_Vec3fMtxFMultXYZ(MtxF* mf, Vec3f* src, Vec3f* dest);
void SkinMatrix_MtxFMtxFMult(MtxF* mfA, MtxF* mfB, MtxF* dest);
void SkinMatrix_GetClear(MtxF** mf);
void SkinMatrix_Clear(MtxF* mf);
void SkinMatrix_MtxFCopy(MtxF* src, MtxF* dest);
s32 SkinMatrix_Invert(MtxF* src, MtxF* dest);
void SkinMatrix_SetScale(MtxF* mf, f32 x, f32 y, f32 z);
@ -2101,6 +2110,7 @@ void PreviewSequence(u16 seqId);
void func_800F5B58(void);
void func_800F5BF0(u8 natureAmbienceId);
void Audio_PlayFanfare(u16);
void Audio_PlayFanfare_Rando(GetItemEntry getItem);
void func_800F5C2C(void);
void func_800F5E18(u8 playerIdx, u16 seqId, u8 fadeTimer, s8 arg3, s8 arg4);
void Audio_SetSequenceMode(u8 seqMode);

View File

@ -245,14 +245,6 @@ extern GraphicsContext* __gfxCtx;
#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
// #region SOH [WiiU]
#ifdef __WIIU__
#define ASSERT(expression) (void)((!!(expression)) || (_assert(#expression, __FILE__, (unsigned)(__LINE__)), 0))
#else
#define ASSERT(expression) (void)((!!(expression)) || (__assert(#expression, __FILE__, (unsigned)(__LINE__)), 0))
#endif
// #endregion
#define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \
do { \
gDPPipeSync(pkt); \

View File

@ -1,6 +1,8 @@
#pragma once
#include "stdint.h"
#ifdef __cplusplus
#include <libultraship/libultraship.h>
#include <ImGui/imgui.h>
@ -16,3 +18,13 @@ class AudioEditor : public LUS::GuiWindow {
void AudioEditor_RandomizeAll();
void AudioEditor_ResetAll();
extern "C" {
#endif
u16 AudioEditor_GetReplacementSeq(u16 seqId);
#ifdef __cplusplus
}
#endif

View File

@ -1,6 +1,7 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/speechsynthesizer/SpeechSynthesizer.h"
#include <cassert>
#include <File.h>
#include <libultraship/classes.h>
#include <nlohmann/json.hpp>
@ -43,7 +44,7 @@ std::string GetParameritizedText(std::string key, TextBank bank, const char* arg
size_t index = value.find(searchString);
if (index != std::string::npos) {
ASSERT(arg != nullptr);
assert(arg != nullptr);
value.replace(index, searchString.size(), std::string(arg));
return value;
} else {
@ -59,7 +60,7 @@ std::string GetParameritizedText(std::string key, TextBank bank, const char* arg
size_t index = value.find(searchString);
if (index != std::string::npos) {
ASSERT(arg != nullptr);
assert(arg != nullptr);
value.replace(index, searchString.size(), std::string(arg));
return value;
} else {
@ -75,7 +76,7 @@ std::string GetParameritizedText(std::string key, TextBank bank, const char* arg
size_t index = value.find(searchString);
if (index != std::string::npos) {
ASSERT(arg != nullptr);
assert(arg != nullptr);
value.replace(index, searchString.size(), std::string(arg));
return value;
} else {
@ -158,7 +159,7 @@ void RegisterOnInterfaceUpdateHook() {
auto translation = GetParameritizedText((seconds > 1) ? "seconds_plural" : "seconds_singular", TEXT_BANK_MISC, arg);
announceBuf += snprintf(announceBuf, sizeof(ttsAnnounceBuf), "%s", translation.c_str());
}
ASSERT(announceBuf < ttsAnnounceBuf + sizeof(ttsAnnounceBuf));
assert(announceBuf < ttsAnnounceBuf + sizeof(ttsAnnounceBuf));
SpeechSynthesizer::Instance->Speak(ttsAnnounceBuf, GetLanguageCode());
prevTimer = timer;
}

View File

@ -45,9 +45,11 @@ uint32_t IsGameMasterQuest();
void DeinitOTR(void);
void VanillaItemTable_Init();
void OTRAudio_Init();
void OTRMessage_Init();
void InitAudio();
void Graph_StartFrame();
void Graph_ProcessGfxCommands(Gfx* commands);
void Graph_ProcessFrame(void (*run_one_game_iter)(void));
void OTRLogString(const char* src);
void OTRGfxPrint(const char* str, void* printer, void (*printImpl)(void*, char));
void OTRGetPixelDepthPrepare(float x, float y);

View File

@ -50,7 +50,6 @@ extern "C" void OTRPlay_SpawnScene(PlayState* play, s32 sceneNum, s32 spawn) {
scene->unk_13 = 0;
//ASSERT(play->sceneSegment != NULL);
//gSegments[2] = VIRTUAL_TO_PHYSICAL(play->sceneSegment);
OTRPlay_InitScene(play, spawn);

View File

@ -11,6 +11,7 @@
#include "soh/resource/type/Text.h"
#include <Blob.h>
#include <memory>
#include <cassert>
#include "soh/resource/type/scenecommand/SetCameraSettings.h"
#include "soh/resource/type/scenecommand/SetCutscenes.h"
#include "soh/resource/type/scenecommand/SetStartPositionList.h"
@ -520,7 +521,7 @@ extern "C" s32 OTRfunc_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomN
roomCtx->curRoom.segment = NULL;
roomCtx->status = 1;
ASSERT(roomNum < play->numRooms);
assert(roomNum < play->numRooms);
if (roomNum >= play->numRooms)
return 0; // UH OH

View File

@ -1,15 +0,0 @@
#include "global.h"
#ifndef __SWITCH__
#ifdef __WIIU__
void _assert(const char* exp, const char* file, s32 line) {
#else
void __assert(const char* exp, const char* file, s32 line) {
#endif
char msg[256];
osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", exp, file, line, osGetThreadId(NULL));
sprintf(msg, "ASSERT: %s:%d(%d)", file, line, osGetThreadId(NULL));
Fault_AddHungupAndCrashImpl(msg, exp);
}
#endif

View File

@ -1,5 +1,7 @@
#include "global.h"
#include "vt.h"
#include <stdio.h>
#include <assert.h>
StackEntry sDmaMgrStackInfo;
OSMesgQueue sDmaMgrMsgQueue;
@ -123,9 +125,9 @@ end:
s32 DmaMgr_DmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
s32 ret;
ASSERT(pihandle == gCartHandle);
ASSERT(direction == OS_READ);
ASSERT(mb != NULL);
assert(pihandle == gCartHandle);
assert(direction == OS_READ);
assert(mb != NULL);
if (D_80009460 == 10) {
osSyncPrintf("%10lld サウンドDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), mb->dramAddr,
@ -183,14 +185,14 @@ void DmaMgr_Error(DmaRequest* req, const char* file, const char* errorName, cons
osSyncPrintf(VT_RST);
if (req->filename) {
sprintf(buff1, "DMA ERROR: %s %d", req->filename, req->line);
snprintf(buff1, sizeof(buff1), "DMA ERROR: %s %d", req->filename, req->line);
} else if (sDmaMgrCurFileName) {
sprintf(buff1, "DMA ERROR: %s %d", sDmaMgrCurFileName, sDmaMgrCurFileLine);
snprintf(buff1, sizeof(buff1), "DMA ERROR: %s %d", sDmaMgrCurFileName, sDmaMgrCurFileLine);
} else {
sprintf(buff1, "DMA ERROR: %s", errorName != NULL ? errorName : "???");
snprintf(buff1, sizeof(buff1), "DMA ERROR: %s", errorName != NULL ? errorName : "???");
}
sprintf(buff2, "%07X %08X %X %s", vrom, ram, size, file != NULL ? file : "???");
snprintf(buff2, sizeof(buff1), "%07X %08X %X %s", vrom, ram, size, file != NULL ? file : "???");
Fault_AddHungupAndCrashImpl(buff1, buff2);
}

View File

@ -3,6 +3,7 @@
#ifndef __APPLE__
#include <malloc.h>
#endif
#include <stdlib.h>
#ifndef _MSC_VER
#include <unistd.h>

View File

@ -2,6 +2,7 @@
#include "alloca.h"
#include <string.h>
#include <stdlib.h>
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg) {
this->widthSave = width;
@ -474,9 +475,9 @@ void func_800C2FE4(PreRender* this) {
s32 x;
s32 y;
s32 phi_v0;
u8* buffR = alloca(this->width);
u8* buffG = alloca(this->width);
u8* buffB = alloca(this->width);
u8* buffR = malloc(this->width);
u8* buffG = malloc(this->width);
u8* buffB = malloc(this->width);
s32 pad[3];
s32 pxR;
s32 pxG;
@ -538,6 +539,9 @@ void func_800C2FE4(PreRender* this) {
this->fbufSave[x + y * this->width] = pxOut.rgba;
}
}
free(buffR);
free(buffB);
free(buffG);
}
void PreRender_Calc(PreRender* this) {

View File

@ -6,6 +6,7 @@
#include "global.h"
#include "soh/OTRGlobals.h"
#include "soh/Enhancements/audio/AudioCollection.h"
#include "soh/Enhancements/audio/AudioEditor.h"
#define MK_ASYNC_MSG(retData, tableType, id, status) (((retData) << 24) | ((tableType) << 16) | ((id) << 8) | (status))
#define ASYNC_TBLTYPE(v) ((u8)(v >> 16))

View File

@ -3,6 +3,8 @@
#include <libultraship/libultra.h>
#include "global.h"
#include "soh/Enhancements/audio/AudioEditor.h"
extern char** sequenceMap;
#define PORTAMENTO_IS_SPECIAL(x) ((x).mode & 0x80)

View File

@ -1,5 +1,6 @@
#include <libultraship/libultra.h>
#include "global.h"
#include "soh/Enhancements/audio/AudioEditor.h"
// TODO: can these macros be shared between files? code_800F9280 seems to use
// versions without any casts...

View File

@ -2,6 +2,8 @@
#include "global.h"
#include "vt.h"
#include "soh/Enhancements/audio/AudioEditor.h"
typedef struct {
/* 0x00 */ u16 sfxId;
/* 0x04 */ Vec3f* pos;

View File

@ -2,6 +2,8 @@
#include "global.h"
#include "soh/mixer.h"
#include "soh/Enhancements/audio/AudioEditor.h"
typedef struct {
u8 unk_0;
u8 unk_1; // importance?

View File

@ -1,6 +1,6 @@
#include "global.h"
#include "vt.h"
#include "alloca.h"
#include <stdio.h>
// data
const char* sExceptionNames[] = {
@ -1124,6 +1124,6 @@ void Fault_AddHungupAndCrashImpl(const char* arg0, const char* arg1) {
void Fault_AddHungupAndCrash(const char* filename, u32 line) {
char msg[256];
sprintf(msg, "HungUp %s:%d", filename, line);
snprintf(msg, sizeof(msg), "HungUp %s:%d", filename, line);
Fault_AddHungupAndCrashImpl(msg, NULL);
}

View File

@ -3,6 +3,7 @@
#include "vt.h"
#include "libultraship/bridge.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
SpeedMeter D_801664D0;
struct_801664F0 D_801664F0;
@ -16,6 +17,7 @@ u16 sLastButtonPressed;
int gfx_create_framebuffer(uint32_t width, uint32_t height);
void gfx_texture_cache_clear();
void GameState_FaultPrint(void) {
static char sBtnChars[] = "ABZSuldr*+LRudlr";
s32 i;

View File

@ -3,9 +3,12 @@
#include "regs.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "soh/Enhancements/debugger/colViewer.h"
#include "soh/Enhancements/gameconsole.h"
#include "soh/OTRGlobals.h"
#define GFXPOOL_HEAD_MAGIC 0x1234
#define GFXPOOL_TAIL_MAGIC 0x5678
@ -16,6 +19,9 @@ FaultClient sGraphFaultClient;
CfbInfo sGraphCfbInfos[3];
FaultClient sGraphUcodeFaultClient;
void Skybox_Setup(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId);
void PadMgr_ThreadEntry(PadMgr* padMgr);
// clang-format off
UCodeInfo D_8012D230[3] = {
//{ UCODE_F3DZEX, D_80155F50 },
@ -461,7 +467,7 @@ static void RunFrame()
{
osSyncPrintf("確保失敗\n"); // "Failure to secure"
sprintf(faultMsg, "CLASS SIZE= %d bytes", size);
snprintf(faultMsg, sizeof(faultMsg), "CLASS SIZE= %d bytes", size);
Fault_AddHungupAndCrashImpl("GAME CLASS MALLOC FAILED", faultMsg);
}
GameState_Init(runFrameContext.gameState, runFrameContext.ovl->init, &runFrameContext.gfxCtx);
@ -478,15 +484,15 @@ static void RunFrame()
while (GameState_IsRunning(runFrameContext.gameState))
{
uint64_t ticksA, ticksB;
ticksA = GetPerfCounter();
//uint64_t ticksA, ticksB;
//ticksA = GetPerfCounter();
Graph_StartFrame();
PadMgr_ThreadEntry(&gPadMgr);
Graph_Update(&runFrameContext.gfxCtx, runFrameContext.gameState);
ticksB = GetPerfCounter();
//ticksB = GetPerfCounter();
Graph_ProcessGfxCommands(runFrameContext.gfxCtx.workBuffer);

View File

@ -1,16 +1,13 @@
#include "global.h"
#include "vt.h"
#include <string.h>
#include "soh/Enhancements/game-interactor/GameInteractor.h"
//#include <string.h>
#ifdef _MSC_VER
extern void* __cdecl memset(_Out_writes_bytes_all_(_Size) void* _Dst, _In_ int _Val, _In_ size_t _Size);
#endif
s32 D_8012D280 = 1;
void OTRControllerCallback(uint8_t rumble);
OSMesgQueue* PadMgr_LockSerialMesgQueue(PadMgr* padMgr) {
OSMesgQueue* ctrlrQ = NULL;

View File

@ -1,6 +1,7 @@
#include "global.h"
#include <string.h>
#include <assert.h>
#define RSP_DONE_MSG 667
#define RDP_DONE_MSG 668
@ -102,7 +103,7 @@ void Sched_HandleStart(SchedContext* sc) {
void Sched_QueueTask(SchedContext* sc, OSScTask* task) {
s32 type = task->list.t.type;
ASSERT((type == M_AUDTASK) || (type == M_GFXTASK) || (type == M_NJPEGTASK) || (type == M_NULTASK));
assert((type == M_AUDTASK) || (type == M_GFXTASK) || (type == M_NJPEGTASK) || (type == M_NULTASK));
if (type == M_AUDTASK) {
if (sLogScheduler) {
@ -134,7 +135,7 @@ void Sched_QueueTask(SchedContext* sc, OSScTask* task) {
void Sched_Yield(SchedContext* sc) {
if (!(sc->curRSPTask->state & OS_SC_YIELD)) {
ASSERT(sc->curRSPTask->list.t.type != M_AUDTASK);
assert(sc->curRSPTask->list.t.type != M_AUDTASK);
sc->curRSPTask->state |= OS_SC_YIELD;
@ -153,14 +154,14 @@ OSScTask* func_800C89D4(SchedContext* sc, OSScTask* task) {
if (sc->pendingSwapBuf1 != NULL) {
if (0) {
ASSERT(sc->pendingSwapBuf1 != NULL);
assert(sc->pendingSwapBuf1 != NULL);
}
return NULL;
}
if (sc->pendingSwapBuf2 != NULL) {
if (0) {
ASSERT(sc->pendingSwapBuf2 != NULL);
assert(sc->pendingSwapBuf2 != NULL);
}
return NULL;
}
@ -246,7 +247,7 @@ u32 Sched_IsComplete(SchedContext* sc, OSScTask* task) {
}
void Sched_RunTask(SchedContext* sc, OSScTask* spTask, OSScTask* dpTask) {
ASSERT(sc->curRSPTask == NULL);
assert(sc->curRSPTask == NULL);
if (spTask != NULL) {
if (spTask->list.t.type == M_NULTASK) {
if (spTask->flags & OS_SC_NEEDS_RSP) {
@ -356,7 +357,7 @@ void Sched_HandleRSPDone(SchedContext* sc) {
OSScTask* nextRDP = NULL;
s32 state;
ASSERT(sc->curRSPTask != NULL);
assert(sc->curRSPTask != NULL);
if (sc->curRSPTask->list.t.type == M_AUDTASK) {
gRSPAudioTotalTime += osGetTime() - sRSPAudioStartTime;
@ -405,8 +406,8 @@ void Sched_HandleRDPDone(SchedContext* sc) {
s32 state;
gRDPTotalTime = osGetTime() - sRDPStartTime;
ASSERT(sc->curRDPTask != NULL);
ASSERT(sc->curRDPTask->list.t.type == M_GFXTASK);
assert(sc->curRDPTask != NULL);
assert(sc->curRDPTask->list.t.type == M_GFXTASK);
curTask = sc->curRDPTask;
sc->curRDPTask = NULL;
curTask->state &= ~OS_SC_DP;

View File

@ -1,6 +1,7 @@
#include "global.h"
#include "soh/frame_interpolation.h"
#include <assert.h>
// clang-format off
Mtx gMtxClear = {
@ -35,7 +36,7 @@ void Matrix_Push(void) {
void Matrix_Pop(void) {
FrameInterpolation_RecordMatrixPop();
sCurrentMatrix--;
ASSERT(sCurrentMatrix >= sMatrixStack);
assert(sCurrentMatrix >= sMatrixStack);
}
void Matrix_Get(MtxF* dest) {

View File

@ -9,13 +9,13 @@
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/enemyrandomizer.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ActorDB.h"
#if defined(_MSC_VER) || defined(__GNUC__)
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#endif
#if defined(_MSC_VER) || defined(__GNUC__)
#include "textures/place_title_cards/g_pn_49.h"
@ -2570,7 +2570,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
actor->colorFilterTimer--;
}
actor->update(actor, play);
GameInteractor_ExecuteOnActorUpdate(actor, play);
GameInteractor_ExecuteOnActorUpdate(actor);
func_8003F8EC(play, &play->colCtx.dyna, actor);
}
@ -2900,7 +2900,7 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
if ((actor->flags & ACTOR_FLAG_LENS) &&
((play->roomCtx.curRoom.lensMode == LENS_MODE_HIDE_ACTORS) ||
play->actorCtx.lensActive || (actor->room != play->roomCtx.curRoom.num))) {
ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX);
assert(invisibleActorCounter < INVISIBLE_ACTOR_MAX);
invisibleActors[invisibleActorCounter] = actor;
invisibleActorCounter++;
} else {
@ -3127,7 +3127,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
ActorDBEntry* dbEntry = ActorDB_Retrieve(actorId);
ASSERT(dbEntry->valid);
assert(dbEntry->valid);
if (HREG(20) != 0) {
// "Actor class addition [%d:%s]"
@ -3165,7 +3165,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
return NULL;
}
ASSERT(dbEntry->numLoaded < 255);
assert(dbEntry->numLoaded < 255);
dbEntry->numLoaded++;

View File

@ -2,6 +2,7 @@
#include "vt.h"
#include <soh/OTRGlobals.h>
#include <assert.h>
#define SS_NULL 0xFFFF
@ -87,7 +88,7 @@ void SSNodeList_SetSSListHead(SSNodeList* nodeList, SSList* ssList, s16* polyId)
void DynaSSNodeList_SetSSListHead(DynaSSNodeList* nodeList, SSList* ssList, s16* polyId) {
u16 newNodeId = DynaSSNodeList_GetNextNodeIdx(nodeList);
ASSERT(newNodeId != SS_NULL);
assert(newNodeId != SS_NULL);
SSNode_SetValue(&nodeList->tbl[newNodeId], polyId, ssList->head);
ssList->head = newNodeId;
}
@ -106,7 +107,7 @@ void DynaSSNodeList_Initialize(PlayState* play, DynaSSNodeList* nodeList) {
void DynaSSNodeList_Alloc(PlayState* play, DynaSSNodeList* nodeList, s32 max) {
nodeList->tbl = THA_AllocEndAlign(&play->state.tha, max * sizeof(SSNode), -2);
ASSERT(nodeList->tbl != NULL);
assert(nodeList->tbl != NULL);
nodeList->max = max;
nodeList->count = 0;
@ -709,7 +710,7 @@ s32 BgCheck_SphVsStaticWall(StaticLookup* lookup, CollisionContext* colCtx, u16
}
}
ASSERT(!IS_ZERO(normalXZ));
assert(!IS_ZERO(normalXZ));
invNormalXZ = 1.0f / normalXZ;
temp_f16 = fabsf(nz) * invNormalXZ;
@ -790,7 +791,7 @@ s32 BgCheck_SphVsStaticWall(StaticLookup* lookup, CollisionContext* colCtx, u16
}
}
ASSERT(!IS_ZERO(normalXZ));
assert(!IS_ZERO(normalXZ));
invNormalXZ = 1.0f / normalXZ;
temp_f16 = fabsf(nx) * invNormalXZ;
@ -2446,11 +2447,11 @@ void SSNodeList_Alloc(PlayState* play, SSNodeList* this, s32 tblMax, s32 numPoly
this->count = 0;
this->tbl = THA_AllocEndAlign(&play->state.tha, tblMax * sizeof(SSNode), -2);
ASSERT(this->tbl != NULL);
assert(this->tbl != NULL);
this->polyCheckTbl = GAMESTATE_ALLOC_MC(&play->state, numPolys);
ASSERT(this->polyCheckTbl != NULL);
assert(this->polyCheckTbl != NULL);
}
/**
@ -2460,7 +2461,7 @@ SSNode* SSNodeList_GetNextNode(SSNodeList* this) {
SSNode* result = &this->tbl[this->count];
this->count++;
ASSERT(this->count < this->max);
assert(this->count < this->max);
if (!(this->count < this->max)) {
return NULL;
}
@ -2473,7 +2474,7 @@ SSNode* SSNodeList_GetNextNode(SSNodeList* this) {
u16 SSNodeList_GetNextNodeIdx(SSNodeList* this) {
u16 new_index = this->count++;
ASSERT(new_index < this->max);
assert(new_index < this->max);
return new_index;
}
@ -2579,7 +2580,7 @@ void DynaPoly_NullPolyList(CollisionPoly** polyList) {
*/
void DynaPoly_AllocPolyList(PlayState* play, CollisionPoly** polyList, s32 numPolys) {
*polyList = THA_AllocEndAlign(&play->state.tha, numPolys * sizeof(CollisionPoly), -2);
ASSERT(*polyList != NULL);
assert(*polyList != NULL);
}
/**
@ -2594,7 +2595,7 @@ void DynaPoly_NullVtxList(Vec3s** vtxList) {
*/
void DynaPoly_AllocVtxList(PlayState* play, Vec3s** vtxList, s32 numVtx) {
*vtxList = THA_AllocEndAlign(&play->state.tha, numVtx * sizeof(Vec3s), -2);
ASSERT(*vtxList != NULL);
assert(*vtxList != NULL);
}
/**
@ -2811,8 +2812,8 @@ void DynaPoly_ExpandSRT(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s
*vtxStartIndex + pbgdata->numVertices, dyna->vtxListMax);
}
ASSERT(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons);
ASSERT(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices);
assert(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons);
assert(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices);
if (!(dyna->bitFlag & DYNAPOLY_INVALIDATE_LOOKUP) &&
(BgActor_IsTransformUnchanged(&dyna->bgActors[bgId]) == true)) {
@ -3245,7 +3246,7 @@ s32 BgCheck_SphVsDynaWallInBgActor(CollisionContext* colCtx, u16 xpFlags, DynaCo
poly = &dyna->polyList[polyId];
CollisionPoly_GetNormalF(poly, &nx, &ny, &nz);
normalXZ = sqrtf(SQ(nx) + SQ(nz));
ASSERT(!IS_ZERO(normalXZ));
assert(!IS_ZERO(normalXZ));
planeDist = Math3D_DistPlaneToPos(nx, ny, nz, poly->dist, &resultPos);
if (radius < fabsf(planeDist) || COLPOLY_VIA_FLAG_TEST(poly->flags_vIA, xpFlags)) {
@ -3318,7 +3319,7 @@ s32 BgCheck_SphVsDynaWallInBgActor(CollisionContext* colCtx, u16 xpFlags, DynaCo
poly = &dyna->polyList[polyId];
CollisionPoly_GetNormalF(poly, &nx, &ny, &nz);
normalXZ = sqrtf(SQ(nx) + SQ(nz));
ASSERT(!IS_ZERO(normalXZ));
assert(!IS_ZERO(normalXZ));
planeDist = Math3D_DistPlaneToPos(nx, ny, nz, poly->dist, &resultPos);
if (radius < fabsf(planeDist) || COLPOLY_VIA_FLAG_TEST(poly->flags_vIA, xpFlags)) {

View File

@ -2,6 +2,7 @@
#include "vt.h"
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include <assert.h>
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
typedef void (*ColChkBloodFunc)(PlayState*, Collider*, Vec3f*);
@ -71,7 +72,7 @@ void Collider_DrawPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC,
gDPPipeSync(POLY_OPA_DISP++);
vtxTbl = Graph_Alloc(gfxCtx, 3 * sizeof(Vtx));
ASSERT(vtxTbl != NULL);
assert(vtxTbl != NULL);
vtxTbl[0].n.ob[0] = vA->x;
vtxTbl[0].n.ob[1] = vA->y;
@ -453,7 +454,7 @@ s32 Collider_SetJntSph(PlayState* play, ColliderJntSph* dest, Actor* actor, Coll
Collider_SetBase(play, &dest->base, actor, &src->base);
dest->count = src->count;
dest->elements = elements;
ASSERT(dest->elements != NULL);
assert(dest->elements != NULL);
for (destElem = dest->elements, srcElem = src->elements; destElem < dest->elements + dest->count;
destElem++, srcElem++) {
@ -790,7 +791,7 @@ s32 Collider_SetTris(PlayState* play, ColliderTris* dest, Actor* actor, Collider
Collider_SetBase(play, &dest->base, actor, &src->base);
dest->count = src->count;
dest->elements = elements;
ASSERT(dest->elements != NULL);
assert(dest->elements != NULL);
for (destElem = dest->elements, srcElem = src->elements; destElem < dest->elements + dest->count;
destElem++, srcElem++) {
@ -1185,7 +1186,7 @@ s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colChkCtx, Coll
if (FrameAdvance_IsEnabled(play) == true) {
return -1;
}
ASSERT(collider->shape <= COLSHAPE_QUAD);
assert(collider->shape <= COLSHAPE_QUAD);
sATResetFuncs[collider->shape](play, collider);
if (collider->actor != NULL && collider->actor->update == NULL) {
return -1;
@ -1210,7 +1211,7 @@ s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colChkCtx, Coll
*/
s32 CollisionCheck_SetAT_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider,
s32 index) {
ASSERT(collider->shape <= COLSHAPE_QUAD);
assert(collider->shape <= COLSHAPE_QUAD);
if (GameInteractor_SecondCollisionUpdate()) {
return -1;
@ -1264,7 +1265,7 @@ s32 CollisionCheck_SetAC(PlayState* play, CollisionCheckContext* colChkCtx, Coll
if (FrameAdvance_IsEnabled(play) == true) {
return -1;
}
ASSERT(collider->shape <= COLSHAPE_QUAD);
assert(collider->shape <= COLSHAPE_QUAD);
sACResetFuncs[collider->shape](play, collider);
if (collider->actor != NULL && collider->actor->update == NULL) {
return -1;
@ -1289,7 +1290,7 @@ s32 CollisionCheck_SetAC(PlayState* play, CollisionCheckContext* colChkCtx, Coll
*/
s32 CollisionCheck_SetAC_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider,
s32 index) {
ASSERT(collider->shape <= COLSHAPE_QUAD);
assert(collider->shape <= COLSHAPE_QUAD);
if (GameInteractor_SecondCollisionUpdate()) {
return -1;
@ -1344,7 +1345,7 @@ s32 CollisionCheck_SetOC(PlayState* play, CollisionCheckContext* colChkCtx, Coll
return -1;
}
ASSERT(collider->shape <= COLSHAPE_QUAD);
assert(collider->shape <= COLSHAPE_QUAD);
sOCResetFuncs[collider->shape](play, collider);
if (collider->actor != NULL && collider->actor->update == NULL) {
@ -1379,7 +1380,7 @@ s32 CollisionCheck_SetOC_SAC(PlayState* play, CollisionCheckContext* colChkCtx,
return -1;
}
ASSERT(collider->shape <= COLSHAPE_QUAD);
assert(collider->shape <= COLSHAPE_QUAD);
sOCResetFuncs[collider->shape](play, collider);
if (collider->actor != NULL && collider->actor->update == NULL) {
return -1;
@ -3022,7 +3023,7 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colChkCt
return;
}
ASSERT(info->acHitInfo != NULL);
assert(info->acHitInfo != NULL);
tbl = collider->actor->colChkInfo.damageTable;
if (tbl == NULL) {
damage = (f32)info->acHitInfo->toucher.damage - info->bumper.defense;

View File

@ -1,5 +1,6 @@
#include "global.h"
#include <textures/do_action_static/do_action_static.h>
#include <assert.h>
void func_80110990(PlayState* play) {
Map_Destroy(play);
@ -37,7 +38,7 @@ void func_801109B0(PlayState* play) {
osSyncPrintf("parameter->parameterSegment=%x\n", interfaceCtx->parameterSegment);
ASSERT(interfaceCtx->parameterSegment != NULL);
assert(interfaceCtx->parameterSegment != NULL);
DmaMgr_SendRequest1(interfaceCtx->parameterSegment, (uintptr_t)_parameter_staticSegmentRomStart, parameterSize,
__FILE__, 162);
@ -46,7 +47,7 @@ void func_801109B0(PlayState* play) {
osSyncPrintf("DOアクション テクスチャ初期=%x\n", 0x480); // "DO Action Texture Initialization"
osSyncPrintf("parameter->do_actionSegment=%x\n", interfaceCtx->doActionSegment);
ASSERT(interfaceCtx->doActionSegment != NULL);
assert(interfaceCtx->doActionSegment != NULL);
interfaceCtx->doActionSegment[0] = gAttackDoActionENGTex;
interfaceCtx->doActionSegment[1] = gCheckDoActionENGTex;
@ -59,7 +60,7 @@ void func_801109B0(PlayState* play) {
osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 0x4000);
osSyncPrintf("parameter->icon_itemSegment=%x\n", interfaceCtx->iconItemSegment);
ASSERT(interfaceCtx->iconItemSegment != NULL);
assert(interfaceCtx->iconItemSegment != NULL);
osSyncPrintf("Register_Item[%x, %x, %x, %x]\n", gSaveContext.equips.buttonItems[0],
gSaveContext.equips.buttonItems[1], gSaveContext.equips.buttonItems[2],
@ -154,7 +155,7 @@ void Message_Init(PlayState* play) {
osSyncPrintf("message->fukidashiSegment=%x\n", msgCtx->textboxSegment);
osSyncPrintf("吹き出しgame_alloc=%x\n", 0x2200); // "Textbox game_alloc=%x"
ASSERT(msgCtx->textboxSegment != NULL);
assert(msgCtx->textboxSegment != NULL);
Font_LoadOrderedFont(&play->msgCtx.font);

View File

@ -2,6 +2,7 @@
#include "objects/gameplay_keep/gameplay_keep.h"
#include "soh/frame_interpolation.h"
#include <assert.h>
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
EffectBlureElement* elem;
@ -618,7 +619,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
Vec3f sp118;
Vec3f sp10C;
ASSERT(index - 1 >= 0);
assert(index - 1 >= 0);
ratio = (f32)(elem - 1)->timer / (f32)this->elemDuration;
EffectBlure_GetComputedValues(this, index - 1, ratio, &sp1EC, &sp1E4, &sp1DC, &sp1D8);
@ -638,7 +639,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
Vec3f sp100;
Vec3f spF4;
ASSERT(index + 2 < this->numElements);
assert(index + 2 < this->numElements);
ratio = (f32)(elem + 2)->timer / (f32)this->elemDuration;
EffectBlure_GetComputedValues(this, index + 2, ratio, &sp1EC, &sp1E4, &sp1DC, &sp1D8);

View File

@ -2,6 +2,7 @@
#include "vt.h"
#include "soh/frame_interpolation.h"
#include <assert.h>
EffectSsInfo sEffectSsInfo = { 0 }; // "EffectSS2Info"
@ -18,7 +19,7 @@ void EffectSs_InitInfo(PlayState* play, s32 tableSize) {
sEffectSsInfo.table =
GAMESTATE_ALLOC_MC(&play->state, tableSize * sizeof(EffectSs));
ASSERT(sEffectSsInfo.table != NULL);
assert(sEffectSsInfo.table != NULL);
sEffectSsInfo.searchStartIndex = 0;
sEffectSsInfo.tableSize = tableSize;
@ -175,7 +176,7 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) {
overlayEntry = &gEffectSsOverlayTable[type];
ASSERT(type < EFFECT_SS_TYPE_MAX);
assert(type < EFFECT_SS_TYPE_MAX);
if (EffectSs_FindSlot(priority, &index) != 0) {
// Abort because we couldn't find a suitable slot to add this effect in

View File

@ -1,5 +1,6 @@
#include "global.h"
#include "z64elf_message.h"
#include <assert.h>
ElfMessage sChildSariaMsgs[] = {
ELF_MSG_STRENGTH_UPG(SKIP, 3, false, 0),
@ -59,7 +60,7 @@ u32 ElfMessage_CheckCondition(ElfMessage* msg) {
}
LOG_STRING("企画外 条件"); // "Unplanned conditions"
ASSERT(0);
assert(0);
return false;
}
@ -142,7 +143,7 @@ u16 ElfMessage_GetTextFromMsgs(ElfMessage* msg) {
return msg->byte2 | 0x100;
default:
LOG_STRING("企画外 条件"); // "Unplanned conditions"
ASSERT(0);
assert(0);
}
msg++;
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include <assert.h>
void SkelCurve_Clear(SkelAnimeCurve* skelCurve) {
skelCurve->limbCount = 0;
@ -24,7 +25,7 @@ s32 SkelCurve_Init(PlayState* play, SkelAnimeCurve* skelCurve, SkelCurveLimbList
skelCurve->limbList = SEGMENTED_TO_VIRTUAL(limbList->limbs);
skelCurve->transforms = ZELDA_ARENA_MALLOC_DEBUG(sizeof(*skelCurve->transforms) * skelCurve->limbCount);
ASSERT(skelCurve->transforms != NULL);
assert(skelCurve->transforms != NULL);
skelCurve->animCurFrame = 0.0f;
return 1;
}

View File

@ -1,5 +1,6 @@
#include "global.h"
#include "vt.h"
#include <assert.h>
s32 func_8006CFC0(s32 scene) {
s32 validScenes[] = { SCENE_SPOT00, SCENE_SPOT06, SCENE_SPOT09, SCENE_SPOT12, SCENE_SPOT20 };
@ -52,7 +53,7 @@ void func_8006D0EC(PlayState* play, Player* player) {
player->actor.world.pos.y, player->actor.world.pos.z, player->actor.shape.rot.x,
player->actor.shape.rot.y, player->actor.shape.rot.z, 9, true);
ASSERT(player->rideActor != NULL);
assert(player->rideActor != NULL);
Actor_MountHorse(play, player, player->rideActor);
func_8002DE74(play, player);
@ -70,7 +71,7 @@ void func_8006D0EC(PlayState* play, Player* player) {
} else if ((gSaveContext.entranceIndex == 1230) && (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);
assert(horseActor != NULL);
} else if ((play->sceneNum == gSaveContext.horseData.scene) &&
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!gSaveContext.n64ddFlag ||
(gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
@ -83,7 +84,7 @@ void func_8006D0EC(PlayState* play, Player* player) {
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);
assert(horseActor != NULL);
if (play->sceneNum == SCENE_SPOT12) {
horseActor->room = -1;
}
@ -97,7 +98,7 @@ void func_8006D0EC(PlayState* play, Player* player) {
} else if ((play->sceneNum == SCENE_SPOT20) && !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);
assert(horseActor != NULL);
} else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0)) {
for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
HorseSpawn* horseSpawn = &horseSpawns[i];
@ -105,7 +106,7 @@ void func_8006D0EC(PlayState* play, Player* player) {
Actor* horseActor =
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseSpawn->pos.x, horseSpawn->pos.y,
horseSpawn->pos.z, 0, horseSpawn->angle, 0, horseSpawn->type, true);
ASSERT(horseActor != NULL);
assert(horseActor != NULL);
if (play->sceneNum == SCENE_SPOT12) {
horseActor->room = -1;
}
@ -155,7 +156,7 @@ void func_8006D684(PlayState* play, Player* player) {
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);
assert(player->rideActor != NULL);
Actor_MountHorse(play, player, player->rideActor);
func_8002DE74(play, player);
@ -164,7 +165,7 @@ void func_8006D684(PlayState* play, Player* player) {
(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) == 0) && (DREG(1) == 0)) {
player->rideActor =
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5, true);
ASSERT(player->rideActor != NULL);
assert(player->rideActor != NULL);
Actor_MountHorse(play, player, player->rideActor);
func_8002DE74(play, player);
@ -194,7 +195,7 @@ void func_8006D684(PlayState* play, Player* player) {
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);
assert(player->rideActor != NULL);
Actor_MountHorse(play, player, player->rideActor);
func_8002DE74(play, player);
@ -209,7 +210,7 @@ void func_8006D684(PlayState* play, Player* player) {
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);
assert(player->rideActor != NULL);
player->actor.world.pos.x = D_8011F9B8[i].pos.x;
player->actor.world.pos.y = D_8011F9B8[i].pos.y;

View File

@ -1,5 +1,6 @@
#include "global.h"
#include "vt.h"
#include <assert.h>
#define MARKER_ESCAPE 0x00
#define MARKER_SOI 0xD8
@ -250,7 +251,7 @@ s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize) {
time = osGetTime();
// (?) I guess MB_SIZE=0x180, PROC_OF_MBS=5 which means data is not a part of JpegWork
ASSERT(workSize >= sizeof(JpegWork));
assert(workSize >= sizeof(JpegWork));
osCreateMesgQueue(&ctx.mq, &ctx.msg, 1);
MsgEvent_SendNullTask();

View File

@ -214,6 +214,11 @@ 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 Skybox_Update(SkyboxContext* skyboxCtx);
s32 func_8006F0A0(s32 a0) {
s32 ret = ((a0 >> 4 & 0x7FF) << D_8011FAF0[a0 >> 15 & 7].unk_00) + D_8011FAF0[a0 >> 15 & 7].unk_04;

View File

@ -4,6 +4,7 @@
#include "textures/parameter_static/parameter_static.h"
#include "textures/map_i_static/map_i_static.h"
#include "textures/map_grand_static/map_grand_static.h"
#include <assert.h>
MapData* gMapData;
@ -527,7 +528,7 @@ void Map_Init(PlayState* play) {
// " texture initialization scene_data_ID=%d mapSegment=%x"
osSyncPrintf("\n\n\n テクスチャ初期化 scene_data_ID=%d\nmapSegment=%x\n\n", play->sceneNum,
interfaceCtx->mapSegment, play);
ASSERT(interfaceCtx->mapSegment != NULL);
assert(interfaceCtx->mapSegment != NULL);
switch (play->sceneNum) {
case SCENE_SPOT00:

View File

@ -8,6 +8,8 @@
#include "textures/message_static/message_static.h"
#include "textures/message_texture_static/message_texture_static.h"
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/OTRGlobals.h"
s16 sTextFade = false; // original name: key_off_flag ?

View File

@ -6,6 +6,7 @@
#include "soh_assets.h"
#include "soh/Enhancements/randomizer/adult_trade_shuffle.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include "libultraship/bridge.h"
#include "soh/Enhancements/gameplaystats.h"
#include "soh/Enhancements/boss-rush/BossRushTypes.h"
@ -13,15 +14,13 @@
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
#include "soh/Enhancements/enhancementTypes.h"
#ifdef _MSC_VER
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#endif
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/Enhancements/randomizer/randomizer_grotto.h"
#define DO_ACTION_TEX_WIDTH() 48
#define DO_ACTION_TEX_HEIGHT() 16

View File

@ -10,10 +10,12 @@
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include <overlays/actors/ovl_En_Niw/z_en_niw.h>
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include <libultraship/libultraship.h>
#include <time.h>
#include <assert.h>
void* D_8012D1F0 = NULL;
//UNK_TYPE D_8012D1F4 = 0; // unused
@ -33,12 +35,17 @@ PlayState* gPlayState;
s16 gEnPartnerId;
void OTRPlay_SpawnScene(PlayState* play, s32 sceneNum, s32 spawn);
void enableBetaQuest();
void disableBetaQuest();
void func_800BC450(PlayState* play) {
Camera_ChangeDataIdx(GET_ACTIVE_CAM(play), play->unk_1242B - 1);
}
void func_800BC490(PlayState* play, s16 point) {
ASSERT(point == 1 || point == 2);
assert(point == 1 || point == 2);
play->unk_1242B = point;

View File

@ -8,6 +8,8 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include <stdlib.h>
typedef struct {
/* 0x00 */ u8 flag;
/* 0x02 */ u16 textId;
@ -1712,6 +1714,7 @@ s32 func_80091880(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
}
#include <overlays/actors/ovl_Demo_Effect/z_demo_effect.h>
void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play);
void Pause_DrawTriforceSpot(PlayState* play, s32 showLightColumn) {
static DemoEffect triforce;

View File

@ -1,4 +1,5 @@
#include "global.h"
#include <assert.h>
Gfx sSetupDL[SETUPDL_MAX][6] = {
{
@ -852,7 +853,7 @@ Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far) {
far++;
}
ASSERT(near != far);
assert(near != far);
gDPSetFogColor(gfx++, r, g, b, a);
@ -873,7 +874,7 @@ Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far)
if (far == near) {
far++;
}
ASSERT(near != far);
assert(near != far);
gDPPipeSync(gfx++);
gDPSetFogColor(gfx++, r, g, b, a);

View File

@ -5,6 +5,8 @@
#include "global.h"
#include "vt.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include <string.h>
#include <assert.h>
void func_80095AB4(PlayState* play, Room* room, u32 flags);
void func_80095D04(PlayState* play, Room* room, u32 flags);
@ -27,6 +29,9 @@ Gfx D_801270B0[] = {
gsSPEndDisplayList(),
};
s32 OTRfunc_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum);
s32 OTRfunc_800973FC(PlayState* play, RoomContext* roomCtx);
void (*sRoomDrawHandlers[])(PlayState* play, Room* room, u32 flags) = {
func_80095AB4,
func_80096F6C,
@ -122,7 +127,7 @@ void func_80095D04(PlayState* play, Room* room, u32 flags) {
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon2->start);
spA4 = spB8;
ASSERT(polygon2->num <= SHAPE_SORT_MAX);
assert(polygon2->num <= SHAPE_SORT_MAX);
sp78 = polygonDlist;
for (sp9C = 0; sp9C < polygon2->num; sp9C++, polygonDlist++) {
@ -586,7 +591,7 @@ s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) {
roomCtx->curRoom.segment = NULL;
roomCtx->status = 1;
ASSERT(roomNum < play->numRooms);
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));
@ -629,7 +634,7 @@ void Room_Draw(PlayState* play, Room* room, u32 flags) {
if (room->segment != NULL)
{
gSegments[3] = VIRTUAL_TO_PHYSICAL(room->segment);
ASSERT(room->meshHeader->base.type < ARRAY_COUNTU(sRoomDrawHandlers));
assert(room->meshHeader->base.type < ARRAY_COUNTU(sRoomDrawHandlers));
sRoomDrawHandlers[room->meshHeader->base.type](play, room, flags);
}
}

View File

@ -1,6 +1,7 @@
#include "global.h"
#include "vt.h"
#include "soh/ActorDB.h"
#include <assert.h>
RomFile sNaviMsgFiles[];
@ -15,7 +16,7 @@ s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId) {
osSyncPrintf("num=%d adrs=%x end=%x\n", objectCtx->num, (uintptr_t)objectCtx->status[objectCtx->num].segment + size,
objectCtx->spaceEnd);
ASSERT(((objectCtx->num < OBJECT_EXCHANGE_BANK_MAX) &&
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,
@ -153,7 +154,7 @@ void* func_800982FC(ObjectContext* objectCtx, s32 bankIndex, s16 objectId) {
nextPtr = (void*)ALIGN16((uintptr_t)status->segment + size);
ASSERT(nextPtr < objectCtx->spaceEnd);
assert(nextPtr < objectCtx->spaceEnd);
// "Object exchange free size=%08x"
osSyncPrintf("オブジェクト入れ替え空きサイズ=%08x\n", (uintptr_t)objectCtx->spaceEnd - (uintptr_t)nextPtr);
@ -284,7 +285,7 @@ void Scene_CommandObjectList(PlayState* play, SceneCmd* cmd) {
status++;
}
ASSERT(cmd->objectList.num <= OBJECT_EXCHANGE_BANK_MAX);
assert(cmd->objectList.num <= OBJECT_EXCHANGE_BANK_MAX);
while (k < cmd->objectList.num) {
nextPtr = func_800982FC(&play->objectCtx, i, *objectEntry);

View File

@ -1,5 +1,8 @@
#include "global.h"
#include "vt.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#define ANIM_INTERP 1
@ -865,7 +868,7 @@ void AnimationContext_SetLoadFrame(PlayState* play, LinkAnimationHeader* animati
char animPath[2048];
sprintf(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);
@ -1108,7 +1111,7 @@ void SkelAnime_InitLink(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeade
skelAnime->jointTable = ZELDA_ARENA_MALLOC_DEBUG(allocSize);
skelAnime->morphTable = ZELDA_ARENA_MALLOC_DEBUG(allocSize);
} else {
ASSERT(limbBufCount == limbCount);
assert(limbBufCount == limbCount);
skelAnime->jointTable = (Vec3s*)ALIGN16((uintptr_t)jointTable);
skelAnime->morphTable = (Vec3s*)ALIGN16((uintptr_t)morphTable);
@ -1441,7 +1444,7 @@ s32 SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skelet
skelAnime->morphTable =
ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->morphTable));
} else {
ASSERT(limbCount == skelAnime->limbCount);
assert(limbCount == skelAnime->limbCount);
skelAnime->jointTable = jointTable;
skelAnime->morphTable = morphTable;
}
@ -1477,7 +1480,7 @@ s32 SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader
skelAnime->morphTable =
ZELDA_ARENA_MALLOC_DEBUG(skelAnime->limbCount * sizeof(*skelAnime->morphTable));
} else {
ASSERT(limbCount == skelAnime->limbCount);
assert(limbCount == skelAnime->limbCount);
skelAnime->jointTable = jointTable;
skelAnime->morphTable = morphTable;
}

View File

@ -1,5 +1,6 @@
#include "global.h"
#include "overlays/actors/ovl_En_fHG/z_en_fhg.h"
#include <assert.h>
/**
* Initialises the Vtx buffers used for limb at index `limbIndex`
@ -53,7 +54,7 @@ void Skin_Init(PlayState* play, Skin* skin, SkeletonHeader* skeletonHeader, Anim
skin->vtxTable = ZELDA_ARENA_MALLOC_DEBUG(limbCount * sizeof(SkinLimbVtx));
ASSERT(skin->vtxTable != NULL);
assert(skin->vtxTable != NULL);
for (i = 0; i < limbCount; i++) {
SkinLimbVtx* vtxEntry = &skin->vtxTable[i];
@ -71,11 +72,11 @@ void Skin_Init(PlayState* play, Skin* skin, SkeletonHeader* skeletonHeader, Anim
vtxEntry->buf[0] =
ZELDA_ARENA_MALLOC_DEBUG(animatedLimbData->totalVtxCount * sizeof(Vtx));
ASSERT(vtxEntry->buf[0] != NULL);
assert(vtxEntry->buf[0] != NULL);
vtxEntry->buf[1] =
ZELDA_ARENA_MALLOC_DEBUG(animatedLimbData->totalVtxCount * sizeof(Vtx));
ASSERT(vtxEntry->buf[1] != NULL);
assert(vtxEntry->buf[1] != NULL);
Skin_InitAnimatedLimb(play, skin, i);
}

View File

@ -8,6 +8,8 @@
#define NUM_DUNGEONS 8
#define NUM_COWS 10
void Save_LoadFile(void);
/**
* Initialize new save.
* This save has an empty inventory with 3 hearts and single magic.

View File

@ -3,6 +3,7 @@
#include <string.h>
#include <math.h>
#include <assert.h>
#include "soh/frame_interpolation.h"
@ -176,10 +177,10 @@ void func_800AA550(View* view) {
lrx = view->viewport.rightX - varX;
lry = view->viewport.bottomY - varY;
ASSERT(ulx >= 0);
ASSERT(uly >= 0);
ASSERT(lrx <= SCREEN_WIDTH);
ASSERT(lry <= SCREEN_HEIGHT);
assert(ulx >= 0);
assert(uly >= 0);
assert(lrx <= SCREEN_WIDTH);
assert(lry <= SCREEN_HEIGHT);
OPEN_DISPS(gfxCtx);

View File

@ -1,5 +1,6 @@
#include "global.h"
#include <string.h>
#include <assert.h>
// (Note: 80 = SCREEN_HEIGHT/3, see VisMono_DrawTexture)
// This may not have been kept up-to-date with the code, 1+1+1+80*(7+2+2+3)+1+1 makes more sense
@ -101,7 +102,7 @@ void VisMono_Draw(VisMono* this, Gfx** gfxp) {
LOG_ADDRESS("mono_dl + (1+3+1+1+80*(7+2+2+3)+1)", monoDL + DLSIZE);
LOG_ADDRESS("(1+3+1+1+80*(7+2+2+3)+1)", DLSIZE);
}
ASSERT(glistpEnd <= monoDL + DLSIZE);
assert(glistpEnd <= monoDL + DLSIZE);
}
gDPPipeSync(gfx++);
@ -131,6 +132,6 @@ void VisMono_DrawOld(VisMono* this) {
if (!this->monoDl) {
this->monoDl = SYSTEM_ARENA_MALLOC_DEBUG(DLSIZE * sizeof(Gfx));
glistpEnd = VisMono_DrawTexture(this, this->monoDl);
ASSERT(glistpEnd <= this->monoDl + DLSIZE);
assert(glistpEnd <= this->monoDl + DLSIZE);
}
}

View File

@ -2,6 +2,7 @@
#include "vt.h"
#include <stdlib.h>
#include <assert.h>
#include "z64environment.h"
#include "assets/textures/backgrounds/vr_ALVR_static.h"
@ -961,24 +962,24 @@ void Skybox_Init(GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId) {
if (skyboxCtx->unk_140 != 0) {
skyboxCtx->dListBuf = GAMESTATE_ALLOC_MC(state, 8 * 150 * sizeof(Gfx));
ASSERT(skyboxCtx->dListBuf != NULL);
assert(skyboxCtx->dListBuf != NULL);
skyboxCtx->roomVtx = GAMESTATE_ALLOC_MC(state, 256 * sizeof(Vtx));
ASSERT(skyboxCtx->roomVtx != NULL);
assert(skyboxCtx->roomVtx != NULL);
func_800AEFC8(skyboxCtx, skyboxId);
} else {
skyboxCtx->dListBuf = GAMESTATE_ALLOC_MC(state, 12 * 150 * sizeof(Gfx));
ASSERT(skyboxCtx->dListBuf != NULL);
assert(skyboxCtx->dListBuf != NULL);
if (skyboxId == SKYBOX_CUTSCENE_MAP) {
skyboxCtx->roomVtx = GAMESTATE_ALLOC_MC(state, 192 * sizeof(Vtx));
ASSERT(skyboxCtx->roomVtx != NULL);
assert(skyboxCtx->roomVtx != NULL);
func_800AF178(skyboxCtx, 6);
} else {
skyboxCtx->roomVtx = GAMESTATE_ALLOC_MC(state, 160 * sizeof(Vtx));
ASSERT(skyboxCtx->roomVtx != NULL);
assert(skyboxCtx->roomVtx != NULL);
func_800AF178(skyboxCtx, 5);
}

View File

@ -6,6 +6,7 @@
#include "z_bg_gnd_iceblock.h"
#include "objects/object_demo_kekkai/object_demo_kekkai.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)
@ -64,7 +65,7 @@ void BgGndIceblock_Init(Actor* thisx, PlayState* play) {
sBlockPositions[1] = 14;
} else {
LOG_FLOAT("thisx->world.position.x", this->dyna.actor.world.pos.x);
ASSERT(0);
assert(0);
}
}

View File

@ -28,6 +28,8 @@ void BgMoriHineri_SpawnBossKeyChest(BgMoriHineri* this, PlayState* play);
void BgMoriHineri_DoNothing(BgMoriHineri* this, PlayState* play);
void func_808A3D58(BgMoriHineri* this, PlayState* play);
s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId);
s16 sBgMoriHineriNextCamIdx = SUBCAM_NONE;
const ActorInit Bg_Mori_Hineri_InitVars = {

View File

@ -48,6 +48,8 @@ void BgSpot06Objects_WaterPlaneCutsceneWait(BgSpot06Objects* this, PlayState* pl
void BgSpot06Objects_WaterPlaneCutsceneRise(BgSpot06Objects* this, PlayState* play);
void BgSpot06Objects_WaterPlaneCutsceneLower(BgSpot06Objects* this, PlayState* play);
s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId);
const ActorInit Bg_Spot06_Objects_InitVars = {
ACTOR_BG_SPOT06_OBJECTS,
ACTORCAT_PROP,

View File

@ -11,6 +11,7 @@
#include "objects/object_gnd_magic/object_gnd_magic.h"
#include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h"
#include "soh/frame_interpolation.h"
#include <assert.h>
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -87,7 +88,7 @@ void Demo6K_Init(Actor* thisx, PlayState* play) {
osSyncPrintf("bank_ID = %d\n", objBankIndex);
if (objBankIndex < 0) {
ASSERT(objBankIndex < 0);
assert(objBankIndex < 0);
} else {
this->objBankIndex = objBankIndex;
}
@ -174,7 +175,7 @@ void Demo6K_Init(Actor* thisx, PlayState* play) {
this->unk_293 = params - 14;
break;
default:
ASSERT(0);
assert(0);
break;
}

View File

@ -9,6 +9,7 @@
#include "objects/object_triforce_spot/object_triforce_spot.h"
#include "objects/object_efc_tw/object_efc_tw.h"
#include "objects/object_gi_jewel/object_gi_jewel.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)
@ -199,7 +200,7 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) {
osSyncPrintf(VT_FGCOL(CYAN) " bank_ID = %d\n" VT_RST, objectIndex);
if (objectIndex < 0) {
ASSERT(objectIndex < 0);
assert(objectIndex < 0);
} else {
this->initObjectBankIndex = objectIndex;
}
@ -509,7 +510,7 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) {
break;
default:
ASSERT(0);
assert(0);
break;
}
@ -688,7 +689,7 @@ void DemoEffect_InitTimeWarp(DemoEffect* this, PlayState* play) {
s32 effectType = (this->actor.params & 0x00FF);
if (!SkelCurve_Init(play, &this->skelCurve, &gTimeWarpSkel, &gTimeWarpAnim)) {
ASSERT(!SkelCurve_Init(play, &this->skelCurve, &gTimeWarpSkel, &gTimeWarpAnim));
assert(!SkelCurve_Init(play, &this->skelCurve, &gTimeWarpSkel, &gTimeWarpAnim));
}
if (effectType == DEMO_EFFECT_TIMEWARP_TIMEBLOCK_LARGE || effectType == DEMO_EFFECT_TIMEWARP_TIMEBLOCK_SMALL) {

View File

@ -4,6 +4,7 @@
#include "objects/object_efc_star_field/object_efc_star_field.h"
#include "objects/object_toki_objects/object_toki_objects.h"
#include "soh/frame_interpolation.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)
@ -187,7 +188,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) {
osSyncPrintf("bank_ID = %d\n", objBankIndex);
if (objBankIndex < 0) {
ASSERT(objBankIndex < 0);
assert(objBankIndex < 0);
} else {
this->objBankIndex = objBankIndex;
}

View File

@ -1,6 +1,7 @@
#include "z_demo_tre_lgt.h"
#include "overlays/actors/ovl_En_Box/z_en_box.h"
#include "objects/object_box/object_box.h"
#include <assert.h>
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -54,7 +55,7 @@ void DemoTreLgt_Init(Actor* thisx, PlayState* play) {
osSyncPrintf("Demo_Tre_Lgt_Actor_ct();コンストラクト失敗\n");
}
ASSERT(true);
assert(true);
this->unk_170 = 255;
this->unk_174 = 255;

View File

@ -7,6 +7,7 @@
#include "z_door_ana.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include "soh/Enhancements/randomizer/randomizer_grotto.h"
#define FLAGS ACTOR_FLAG_NO_FREEZE_OCARINA
@ -19,6 +20,9 @@ void DoorAna_WaitClosed(DoorAna* this, PlayState* play);
void DoorAna_WaitOpen(DoorAna* this, PlayState* play);
void DoorAna_GrabPlayer(DoorAna* this, PlayState* play);
s16 GetChestGameRandoGiDrawId(s8 room, s16 ogDrawId, PlayState* play);
void Grotto_OverrideActorEntrance(Actor* thisx);
const ActorInit Door_Ana_InitVars = {
ACTOR_DOOR_ANA,
ACTORCAT_ITEMACTION,

View File

@ -8,6 +8,7 @@
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include <stdlib.h>
#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)

View File

@ -2,6 +2,7 @@
#include "objects/object_box/object_box.h"
#include "soh_assets.h"
#include "soh/Enhancements/enhancementTypes.h"
#include <assert.h>
#define FLAGS 0
@ -872,7 +873,7 @@ Gfx* EnBox_EmptyDList(GraphicsContext* gfxCtx) {
Gfx* dList;
dList = Graph_Alloc(gfxCtx, sizeof(Gfx));
ASSERT(dList != NULL);
assert(dList != NULL);
dListHead = dList;
gSPEndDisplayList(dListHead++);
@ -886,7 +887,7 @@ Gfx* func_809CA4A0(GraphicsContext* gfxCtx) {
Gfx* dListHead;
dListHead = Graph_Alloc(gfxCtx, 2 * sizeof(Gfx));
ASSERT(dListHead != NULL);
assert(dListHead != NULL);
dList = dListHead;
gDPSetRenderMode(dListHead++,
@ -904,7 +905,7 @@ Gfx* func_809CA518(GraphicsContext* gfxCtx) {
Gfx* dListHead;
dListHead = Graph_Alloc(gfxCtx, 2 * sizeof(Gfx));
ASSERT(dListHead != NULL);
assert(dListHead != NULL);
dList = dListHead;
gDPSetRenderMode(dListHead++,

View File

@ -6,6 +6,7 @@
#include "z_en_elf.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA)
@ -404,7 +405,7 @@ void EnElf_Init(Actor* thisx, PlayState* play) {
}
break;
default:
ASSERT(0);
assert(0);
break;
}
@ -814,7 +815,7 @@ void func_80A03AB0(EnElf* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if (this->func_2C8 == NULL) {
ASSERT(this->func_2C8 == NULL);
assert(this->func_2C8 == NULL);
}
this->func_2C8(this, play);

View File

@ -2,6 +2,7 @@
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#include "vt.h"
#include "objects/object_fr/object_fr.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA)
@ -227,7 +228,7 @@ void EnFr_Init(Actor* thisx, PlayState* play) {
// "The argument is wrong!!"
osSyncPrintf("%s[%d] : 引数が間違っている!!(%d)\n", __FILE__, __LINE__, this->actor.params);
osSyncPrintf(VT_RST);
ASSERT((this->actor.params >= 6) || (this->actor.params < 0));
assert((this->actor.params >= 6) || (this->actor.params < 0));
}
this->objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GAMEPLAY_FIELD_KEEP);
@ -237,7 +238,7 @@ void EnFr_Init(Actor* thisx, PlayState* play) {
// "There is no bank!!"
osSyncPrintf("%s[%d] : バンクが無いよ!!\n", __FILE__, __LINE__);
osSyncPrintf(VT_RST);
ASSERT(this->objBankIndex < 0);
assert(this->objBankIndex < 0);
}
}
}

View File

@ -8,6 +8,7 @@
#include "vt.h"
#include "objects/object_gla/object_gla.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -157,7 +158,7 @@ void EnGe2_Init(Actor* thisx, PlayState* play) {
this->actor.targetMode = 6;
break;
default:
ASSERT(0);
assert(0);
}
this->stateFlags = 0;

View File

@ -7,6 +7,10 @@
#include "z_en_girla.h"
#include "vt.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/OTRGlobals.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
void EnGirlA_Init(Actor* thisx, PlayState* play);
@ -70,6 +74,8 @@ void EnGirlA_BuyEvent_GoronTunic(PlayState* play, EnGirlA* this);
void EnGirlA_BuyEvent_ZoraTunic(PlayState* play, EnGirlA* this);
void EnGirlA_BuyEvent_Randomizer(PlayState* play, EnGirlA* this);
s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId);
const ActorInit En_GirlA_InitVars = {
ACTOR_EN_GIRLA,
ACTORCAT_PROP,
@ -406,7 +412,7 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
osSyncPrintf(VT_COL(RED, WHITE));
osSyncPrintf("引数がおかしいよ(arg_data=%d)\n", this->actor.params);
osSyncPrintf(VT_RST);
ASSERT((params >= SI_MAX) && (params < 0));
assert((params >= SI_MAX) && (params < 0));
return;
}
@ -435,7 +441,7 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
osSyncPrintf(VT_COL(RED, WHITE));
osSyncPrintf("バンクが無いよ!!(%s)\n", sShopItemDescriptions[params]);
osSyncPrintf(VT_RST);
ASSERT(this->objBankIndex < 0);
assert(this->objBankIndex < 0);
return;
}

View File

@ -8,6 +8,7 @@
#include "objects/object_oF1d_map/object_oF1d_map.h"
#include "objects/object_gm/object_gm.h"
#include "vt.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -78,7 +79,7 @@ void EnGm_Init(Actor* thisx, PlayState* play) {
// "There is no model bank! !! (Medi Goron)"
osSyncPrintf("モデル バンクが無いよ!!(中ゴロン)\n");
osSyncPrintf(VT_RST);
ASSERT(this->objGmBankIndex < 0);
assert(this->objGmBankIndex < 0);
}
this->updateFunc = func_80A3D838;

View File

@ -8,6 +8,7 @@
#include "objects/object_os_anime/object_os_anime.h"
#include "objects/object_boj/object_boj.h"
#include "vt.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -62,7 +63,7 @@ void EnGuest_Init(Actor* thisx, PlayState* play) {
// "No such bank!!"
osSyncPrintf("%s[%d] : バンクが無いよ!!\n", __FILE__, __LINE__);
osSyncPrintf(VT_RST);
ASSERT(this->osAnimeBankIndex < 0);
assert(this->osAnimeBankIndex < 0);
}
}
}

View File

@ -9,6 +9,7 @@
#include "objects/object_horse/object_horse.h"
#include "objects/object_hni/object_hni.h"
#include "scenes/overworld/spot09/spot09_scene.h"
#include <assert.h>
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -869,8 +870,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_IN, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, 1, 1, true);
if (this->rider == NULL) {
//__assert("this->race.rider != NULL");
ASSERT(this->rider == NULL);
assert(this->rider == NULL);
}
if (!(gSaveContext.eventInf[0] & 0x40)) {
this->ingoHorseMaxSpeed = 12.07f;

View File

@ -15,6 +15,7 @@
#include "objects/object_masterkokirihead/object_masterkokirihead.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -599,7 +600,7 @@ void EnOssan_Init(Actor* thisx, PlayState* play) {
osSyncPrintf(VT_COL(RED, WHITE));
osSyncPrintf("引数がおかしいよ(arg_data=%d)\n", this->actor.params);
osSyncPrintf(VT_RST);
ASSERT(this->actor.params > OSSAN_TYPE_MASK && this->actor.params < OSSAN_TYPE_KOKIRI);
assert(this->actor.params > OSSAN_TYPE_MASK && this->actor.params < OSSAN_TYPE_KOKIRI);
return;
}
@ -631,7 +632,7 @@ void EnOssan_Init(Actor* thisx, PlayState* play) {
osSyncPrintf(VT_COL(RED, WHITE));
osSyncPrintf("バンクが無いよ!!(%s)\n", sShopkeeperPrintName[this->actor.params]);
osSyncPrintf(VT_RST);
ASSERT(this->objBankIndex1 < 0);
assert(this->objBankIndex1 < 0);
return;
}
@ -640,7 +641,7 @@ void EnOssan_Init(Actor* thisx, PlayState* play) {
osSyncPrintf(VT_COL(RED, WHITE));
osSyncPrintf("予備バンクが無いよ!!(%s)\n", sShopkeeperPrintName[this->actor.params]);
osSyncPrintf(VT_RST);
ASSERT(EnOssan_TryGetObjBankIndexes(this, play, objectIds) == 0);
assert(EnOssan_TryGetObjBankIndexes(this, play, objectIds) == 0);
return;
}

View File

@ -9,6 +9,7 @@
#include "scenes/overworld/spot06/spot06_scene.h"
#include "scenes/overworld/spot16/spot16_scene.h"
#include "vt.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -989,7 +990,7 @@ void func_80ACC00C(EnOwl* this, PlayState* play) {
this->actor.draw = NULL;
break;
default:
ASSERT(0);
assert(0);
break;
}

View File

@ -20,6 +20,10 @@ void EnPartner_Update(Actor* thisx, PlayState* play);
void EnPartner_Draw(Actor* thisx, PlayState* play);
void EnPartner_SpawnSparkles(EnPartner* this, PlayState* play, s32 sparkleLife);
void func_808328EC(Player* this, u16 sfxId);
void func_808429B4(PlayState* play, s32 speed, s32 y, s32 countdown);
s32 spawn_boomerang_ivan(EnPartner* this, PlayState* play);
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 8, ICHAIN_STOP),
};

View File

@ -7,6 +7,7 @@
#include "z_en_rr.h"
#include "objects/object_rr/object_rr.h"
#include "vt.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT)
@ -789,7 +790,7 @@ void EnRr_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->hasPlayer == 0x3F80) { // checks if 1.0f has been stored to hasPlayer's address
ASSERT(this->hasPlayer == 0x3F80);
assert(this->hasPlayer == 0x3F80);
}
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.1f);

View File

@ -8,6 +8,7 @@
#include "z_en_sth.h"
#include "objects/object_ahg/object_ahg.h"
#include "objects/object_boj/object_boj.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -128,7 +129,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) {
osSyncPrintf("bank_ID = %d\n", objectBankIdx);
if (objectBankIdx < 0) {
ASSERT(objectBankIdx < 0);
assert(objectBankIdx < 0);
}
this->objectBankIdx = objectBankIdx;
this->drawFunc = EnSth_Draw;

View File

@ -6,6 +6,7 @@
#include "z_en_tr.h"
#include "objects/object_tr/object_tr.h"
#include <assert.h>
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -114,7 +115,7 @@ void EnTr_Init(Actor* thisx, PlayState* play) {
break;
default:
ASSERT(0);
assert(0);
break;
}
}

View File

@ -6,6 +6,7 @@
#include "z_en_vali.h"
#include "objects/object_vali/object_vali.h"
#include <stdlib.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_IGNORE_QUAKE)

View File

@ -15,6 +15,7 @@
#include "objects/object_ganon/object_ganon.h"
#include "objects/object_opening_demo1/object_opening_demo1.h"
#include "soh/frame_interpolation.h"
#include <assert.h>
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -170,10 +171,10 @@ void EnViewer_InitImpl(EnViewer* this, PlayState* play) {
EnViewerInitData* initData = &sInitData[this->actor.params >> 8];
s32 skelObjBankIndex = Object_GetIndex(&play->objectCtx, initData->skeletonObject);
ASSERT(skelObjBankIndex >= 0);
assert(skelObjBankIndex >= 0);
this->animObjBankIndex = Object_GetIndex(&play->objectCtx, initData->animObject);
ASSERT(this->animObjBankIndex >= 0);
assert(this->animObjBankIndex >= 0);
if (!Object_IsLoaded(&play->objectCtx, skelObjBankIndex) ||
!Object_IsLoaded(&play->objectCtx, this->animObjBankIndex)) {

View File

@ -5,6 +5,7 @@
*/
#include "z_item_etcetera.h"
#include <assert.h>
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -21,7 +22,6 @@ void ItemEtcetera_SpawnSparkles(ItemEtcetera* this, PlayState* play);
void ItemEtcetera_MoveFireArrowDown(ItemEtcetera* this, PlayState* play);
void func_80B85B28(ItemEtcetera* this, PlayState* play);
void ItemEtcetera_UpdateFireArrow(ItemEtcetera* this, PlayState* play);
GetItemEntry GetChestGameRandoGetItem(s8 room, s16 ogDrawId, PlayState* play);
const ActorInit Item_Etcetera_InitVars = {
ACTOR_ITEM_ETCETERA,
@ -69,7 +69,7 @@ void ItemEtcetera_Init(Actor* thisx, PlayState* play) {
objBankIndex = Object_GetIndex(&play->objectCtx, sObjectIds[type]);
osSyncPrintf("bank_ID = %d\n", objBankIndex);
if (objBankIndex < 0) {
ASSERT(objBankIndex < 0);
assert(objBankIndex < 0);
} else {
this->objBankIndex = objBankIndex;
}

View File

@ -10,6 +10,7 @@
#include "objects/object_spot02_objects/object_spot02_objects.h"
#include "soh/frame_interpolation.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA)
@ -792,7 +793,7 @@ void ObjectKankyo_SunGraveSparkInit(ObjectKankyo* this, PlayState* play) {
s32 objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_SPOT02_OBJECTS);
if (objBankIndex < 0) {
ASSERT(objBankIndex < 0);
assert(objBankIndex < 0);
} else {
this->requiredObjBankIndex = objBankIndex;
}
@ -893,7 +894,7 @@ void ObjectKankyo_InitBeams(ObjectKankyo* this, PlayState* play) {
s32 objectIndex = Object_GetIndex(&play->objectCtx, OBJECT_DEMO_KEKKAI);
if (objectIndex < 0) {
ASSERT(objectIndex < 0);
assert(objectIndex < 0);
} else {
this->requiredObjBankIndex = objectIndex;
}

View File

@ -26,6 +26,13 @@
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include <overlays/actors/ovl_En_Partner/z_en_partner.h>
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/Enhancements/randomizer/randomizer_grotto.h"
#include "soh/frame_interpolation.h"
#include <string.h>
#include <stdlib.h>
#include <assert.h>
typedef enum {
/* 0x00 */ KNOB_ANIM_ADULT_L,
@ -1279,13 +1286,13 @@ static LinkAnimationHeader* D_808543D4[] = {
};
// return type can't be void due to regalloc in func_8084FCAC
s32 func_80832210(Player* this) {
void func_80832210(Player* this) {
this->actor.speedXZ = 0.0f;
this->linearVelocity = 0.0f;
}
// return type can't be void due to regalloc in func_8083F72C
s32 func_80832224(Player* this) {
void func_80832224(Player* this) {
func_80832210(this);
this->unk_6AD = 0;
}
@ -4986,7 +4993,7 @@ void func_8083AE40(Player* this, s16 objectId) {
size = gObjectTable[objectId].vromEnd - gObjectTable[objectId].vromStart;
LOG_HEX("size", size);
ASSERT(size <= 1024 * 8);
assert(size <= 1024 * 8);
DmaMgr_SendRequest2(&this->giObjectDmaRequest, (uintptr_t)this->giObjectSegment,
gObjectTable[objectId].vromStart, size, 0, &this->giObjectLoadQueue, OS_MESG_PTR(NULL),

View File

@ -14,9 +14,16 @@
#include "soh/Enhancements/boss-rush/BossRush.h"
#include "soh/Enhancements/custom-message/CustomMessageTypes.h"
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include <assert.h>
#define MIN_QUEST (ResourceMgr_GameHasOriginal() ? FS_QUEST_NORMAL : FS_QUEST_MASTER)
#define MAX_QUEST FS_QUEST_BOSSRUSH
void Sram_InitDebugSave(void);
void Sram_InitBossRushSave();
u8 hasRandomizerQuest() {
if (strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0) {
return 1;
@ -2870,12 +2877,12 @@ void FileChoose_Init(GameState* thisx) {
osSyncPrintf("SIZE=%x\n", size);
this->staticSegment = GAMESTATE_ALLOC_MC(&this->state, size);
ASSERT(this->staticSegment != NULL);
assert(this->staticSegment != NULL);
DmaMgr_SendRequest1(this->staticSegment, (u32)_title_staticSegmentRomStart, size, __FILE__, __LINE__);
size = (u32)_parameter_staticSegmentRomEnd - (u32)_parameter_staticSegmentRomStart;
this->parameterSegment = GAMESTATE_ALLOC_MC(&this->state, size);
ASSERT(this->parameterSegment != NULL);
assert(this->parameterSegment != NULL);
DmaMgr_SendRequest1(this->parameterSegment, (u32)_parameter_staticSegmentRomStart, size, __FILE__,
__LINE__);

View File

@ -1,4 +1,5 @@
#include "file_choose.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
// when choosing a file to copy or erase, the 6 main menu buttons are placed at these offsets
static s16 sChooseFileYOffsets[] = { -48, -48, -48, -24, -24, 0 };

View File

@ -1,6 +1,8 @@
#include "file_choose.h"
#include "textures/title_static/title_static.h"
#include "assets/overlays/ovl_File_Choose/ovl_file_choose.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
static s16 D_808124C0[] = {
0x0002, 0x0003, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0001, 0x0002, 0x0000, 0x0001,

View File

@ -6,6 +6,8 @@
#include "global.h"
void Sram_InitDebugSave(void);
void Opening_SetupTitleScreen(OpeningContext* this) {
gSaveContext.gameMode = 1;
this->state.running = false;

View File

@ -7,12 +7,13 @@
#include <libultraship/libultra.h>
#include "global.h"
#include "vt.h"
#include "alloca.h"
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include "soh/Enhancements/randomizer/randomizer_grotto.h"
void Select_SwitchBetterWarpMode(SelectContext* this, u8 isBetterWarpMode);
void Sram_InitDebugSave(void);
void Select_LoadTitle(SelectContext* this) {
this->state.running = false;
@ -1458,7 +1459,7 @@ void Better_Select_PrintMQSetting(SelectContext* this, GfxPrint* printer) {
void Select_DrawMenu(SelectContext* this) {
GraphicsContext* gfxCtx = this->state.gfxCtx;
GfxPrint* printer;
GfxPrint printer;
OPEN_DISPS(gfxCtx);
@ -1468,28 +1469,28 @@ void Select_DrawMenu(SelectContext* this) {
func_800AAA50(&this->view, 0xF);
Gfx_SetupDL_28Opa(gfxCtx);
printer = alloca(sizeof(GfxPrint));
GfxPrint_Init(printer);
GfxPrint_Open(printer, POLY_OPA_DISP);
//printer = alloca(sizeof(GfxPrint));
GfxPrint_Init(&printer);
GfxPrint_Open(&printer, POLY_OPA_DISP);
if (this->isBetterWarp) {
Better_Select_PrintTimeSetting(this, printer);
Better_Select_PrintAgeSetting(this, printer, ((void)0, gSaveContext.linkAge));
Better_Select_PrintMQSetting(this, printer);
Better_Select_PrintMenu(this, printer);
Better_Select_PrintTimeSetting(this, &printer);
Better_Select_PrintAgeSetting(this, &printer, ((void)0, gSaveContext.linkAge));
Better_Select_PrintMQSetting(this, &printer);
Better_Select_PrintMenu(this, &printer);
} else {
Select_PrintMenu(this, printer);
Select_PrintAgeSetting(this, printer, ((void)0, gSaveContext.linkAge));
Select_PrintCutsceneSetting(this, printer, ((void)0, gSaveContext.cutsceneIndex));
Select_PrintMenu(this, &printer);
Select_PrintAgeSetting(this, &printer, ((void)0, gSaveContext.linkAge));
Select_PrintCutsceneSetting(this, &printer, ((void)0, gSaveContext.cutsceneIndex));
}
POLY_OPA_DISP = GfxPrint_Close(printer);
GfxPrint_Destroy(printer);
POLY_OPA_DISP = GfxPrint_Close(&printer);
GfxPrint_Destroy(&printer);
CLOSE_DISPS(gfxCtx);
}
void Select_DrawLoadingScreen(SelectContext* this) {
GraphicsContext* gfxCtx = this->state.gfxCtx;
GfxPrint* printer;
GfxPrint printer;
OPEN_DISPS(gfxCtx);
@ -1499,12 +1500,12 @@ void Select_DrawLoadingScreen(SelectContext* this) {
func_800AAA50(&this->view, 0xF);
Gfx_SetupDL_28Opa(gfxCtx);
printer = alloca(sizeof(GfxPrint));
GfxPrint_Init(printer);
GfxPrint_Open(printer, POLY_OPA_DISP);
Select_PrintLoadingMessage(this, printer);
POLY_OPA_DISP = GfxPrint_Close(printer);
GfxPrint_Destroy(printer);
//printer = alloca(sizeof(GfxPrint));
GfxPrint_Init(&printer);
GfxPrint_Open(&printer, POLY_OPA_DISP);
Select_PrintLoadingMessage(this, &printer);
POLY_OPA_DISP = GfxPrint_Close(&printer);
GfxPrint_Destroy(&printer);
CLOSE_DISPS(gfxCtx);
}
@ -1589,7 +1590,6 @@ void Select_SwitchBetterWarpMode(SelectContext* this, u8 isBetterWarpMode) {
void Select_Init(GameState* thisx) {
SelectContext* this = (SelectContext*)thisx;
size_t size;
s32 pad;
this->state.main = Select_Main;
this->state.destroy = Select_Destroy;

View File

@ -273,7 +273,6 @@ void Title_Init(GameState* thisx) {
this->staticSegment = NULL;
//this->staticSegment = GAMESTATE_ALLOC_MC(&this->state, size);
osSyncPrintf("z_title.c\n");
//ASSERT(this->staticSegment != NULL);
//ResourceMgr_LoadDirectory("nintendo_rogo_static*");

View File

@ -1,5 +1,6 @@
#include "z_kaleido_scope.h"
#include <stdlib.h>
#include <string.h>
#include "textures/item_name_static/item_name_static.h"
#include "textures/icon_item_static/icon_item_static.h"
@ -16,7 +17,10 @@
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include "soh/Enhancements/randomizer/randomizer_grotto.h"
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
static void* sEquipmentFRATexs[] = {
gPauseEquipment00FRATex, gPauseEquipment01Tex, gPauseEquipment02Tex, gPauseEquipment03Tex, gPauseEquipment04Tex,