mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-30 23:10:14 -05:00
LogUtils as macro
This commit is contained in:
parent
0ef8463fce
commit
4606929b31
@ -111,6 +111,23 @@
|
|||||||
#define LOG_FLOAT(exp, value) ((void)0)
|
#define LOG_FLOAT(exp, value) ((void)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// LogUtils as macro
|
||||||
|
#ifndef NDEBUG
|
||||||
|
#define LOG_POINTER(val, max, ptr, name) LogUtils_LogPointer(val, max, ptr, name, __FILE__, __LINE__)
|
||||||
|
#define LOG_CHECK_BOUNDARY(name, value, unk) LogUtils_CheckBoundary(name, value, unk, __FILE__, __LINE__)
|
||||||
|
#define LOG_CHECK_NULL_POINTER(exp, ptr) LogUtils_CheckNullPointer(exp, ptr,__FILE__, __LINE__)
|
||||||
|
#define LOG_CHECK_VALID_POINTER(exp, ptr) LogUtils_CheckValidPointer(exp, ptr,__FILE__, __LINE__)
|
||||||
|
#define LOG_THREAD_ID() LogUtils_LogThreadId(__FILE__, __LINE__)
|
||||||
|
#define LOG_HUNGUP_THREAD() LogUtils_HungupThread(__FILE__, __LINE__)
|
||||||
|
#else
|
||||||
|
#define LOG_POINTER(val, max, ptr, name) ((void)0)
|
||||||
|
#define LOG_CHECKBOUNDARY(name, value, unk) ((void)0)
|
||||||
|
#define LOG_CHECK_NULL_POINTER(exp, ptr) ((void)0)
|
||||||
|
#define LOG_CHECK_VALID_POINTER(exp, ptr) ((void)0)
|
||||||
|
#define LOG_THREAD_ID() ((void)0)
|
||||||
|
#define LOG_HUNGUP_THREAD() ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
|
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
|
||||||
do { \
|
do { \
|
||||||
(curState)->init = newInit; \
|
(curState)->init = newInit; \
|
||||||
|
@ -21,7 +21,7 @@ void Locale_Init(void) {
|
|||||||
default:
|
default:
|
||||||
osSyncPrintf(VT_COL(RED, WHITE));
|
osSyncPrintf(VT_COL(RED, WHITE));
|
||||||
osSyncPrintf("z_locale_init: 日本用かアメリカ用か判別できません\n");
|
osSyncPrintf("z_locale_init: 日本用かアメリカ用か判別できません\n");
|
||||||
LogUtils_HungupThread("../z_locale.c", 118);
|
LOG_HUNGUP_THREAD();
|
||||||
osSyncPrintf(VT_RST);
|
osSyncPrintf(VT_RST);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,10 @@ void func_800C0F28(PreRender* this, Gfx** gfxp, void* buf, void* bufSave) {
|
|||||||
s32 x2;
|
s32 x2;
|
||||||
s32 dx;
|
s32 dx;
|
||||||
|
|
||||||
LogUtils_CheckNullPointer("this", this, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this", this);
|
||||||
LogUtils_CheckNullPointer("glistpp", gfxp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
|
||||||
gfx = *gfxp;
|
gfx = *gfxp;
|
||||||
LogUtils_CheckNullPointer("glistp", gfx, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistp", gfx);
|
||||||
|
|
||||||
gDPPipeSync(gfx++);
|
gDPPipeSync(gfx++);
|
||||||
gDPSetOtherMode(gfx++,
|
gDPSetOtherMode(gfx++,
|
||||||
@ -89,10 +89,10 @@ void func_800C1258(PreRender* this, Gfx** gfxp) {
|
|||||||
s32 y2;
|
s32 y2;
|
||||||
s32 dy;
|
s32 dy;
|
||||||
|
|
||||||
LogUtils_CheckNullPointer("this", this, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this", this);
|
||||||
LogUtils_CheckNullPointer("glistpp", gfxp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
|
||||||
gfx = *gfxp;
|
gfx = *gfxp;
|
||||||
LogUtils_CheckNullPointer("glistp", gfx, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistp", gfx);
|
||||||
|
|
||||||
gDPPipeSync(gfx++);
|
gDPPipeSync(gfx++);
|
||||||
gDPSetOtherMode(gfx++,
|
gDPSetOtherMode(gfx++,
|
||||||
@ -139,10 +139,10 @@ void func_800C170C(PreRender* this, Gfx** gfxp, void* fbuf, void* fbufSave, u32
|
|||||||
s32 x2;
|
s32 x2;
|
||||||
s32 dx;
|
s32 dx;
|
||||||
|
|
||||||
LogUtils_CheckNullPointer("this", this, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this", this);
|
||||||
LogUtils_CheckNullPointer("glistpp", gfxp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
|
||||||
gfx = *gfxp;
|
gfx = *gfxp;
|
||||||
LogUtils_CheckNullPointer("glistp", gfx, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistp", gfx);
|
||||||
|
|
||||||
gDPPipeSync(gfx++);
|
gDPPipeSync(gfx++);
|
||||||
gDPSetOtherMode(gfx++,
|
gDPSetOtherMode(gfx++,
|
||||||
@ -195,10 +195,10 @@ void func_800C1B24(PreRender* this, Gfx** gfxp, void* fbuf, void* cvgSave) {
|
|||||||
s32 x2;
|
s32 x2;
|
||||||
s32 dx;
|
s32 dx;
|
||||||
|
|
||||||
LogUtils_CheckNullPointer("this", this, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this", this);
|
||||||
LogUtils_CheckNullPointer("glistpp", gfxp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
|
||||||
gfx = *gfxp;
|
gfx = *gfxp;
|
||||||
LogUtils_CheckNullPointer("glistp", gfx, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistp", gfx);
|
||||||
|
|
||||||
gDPPipeSync(gfx++);
|
gDPPipeSync(gfx++);
|
||||||
gDPSetOtherMode(gfx++,
|
gDPSetOtherMode(gfx++,
|
||||||
@ -239,8 +239,8 @@ void func_800C1B24(PreRender* this, Gfx** gfxp, void* fbuf, void* cvgSave) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_800C1E9C(PreRender* this, Gfx** gfxp) {
|
void func_800C1E9C(PreRender* this, Gfx** gfxp) {
|
||||||
LogUtils_CheckNullPointer("this->zbuf_save", this->zbufSave, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this->zbuf_save", this->zbufSave);
|
||||||
LogUtils_CheckNullPointer("this->zbuf", this->zbuf, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this->zbuf", this->zbuf);
|
||||||
|
|
||||||
if ((this->zbufSave != NULL) && (this->zbuf != NULL)) {
|
if ((this->zbufSave != NULL) && (this->zbuf != NULL)) {
|
||||||
func_800C0F28(this, gfxp, this->zbuf, this->zbufSave);
|
func_800C0F28(this, gfxp, this->zbuf, this->zbufSave);
|
||||||
@ -248,8 +248,8 @@ void func_800C1E9C(PreRender* this, Gfx** gfxp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_800C1F20(PreRender* this, Gfx** gfxp) {
|
void func_800C1F20(PreRender* this, Gfx** gfxp) {
|
||||||
LogUtils_CheckNullPointer("this->fbuf_save", this->fbufSave, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this->fbuf_save", this->fbufSave);
|
||||||
LogUtils_CheckNullPointer("this->fbuf", this->fbuf, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this->fbuf", this->fbuf);
|
||||||
|
|
||||||
if ((this->fbufSave != NULL) && (this->fbuf != NULL)) {
|
if ((this->fbufSave != NULL) && (this->fbuf != NULL)) {
|
||||||
func_800C1AE8(this, gfxp, this->fbuf, this->fbufSave);
|
func_800C1AE8(this, gfxp, this->fbuf, this->fbufSave);
|
||||||
@ -275,7 +275,7 @@ void func_800C1FA4(PreRender* this, Gfx** gfxp) {
|
|||||||
|
|
||||||
void func_800C20B4(PreRender* this, Gfx** gfxp) {
|
void func_800C20B4(PreRender* this, Gfx** gfxp) {
|
||||||
func_800C1FA4(this, gfxp);
|
func_800C1FA4(this, gfxp);
|
||||||
LogUtils_CheckNullPointer("this->cvg_save", this->cvgSave, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this->cvg_save", this->cvgSave);
|
||||||
if (this->cvgSave != NULL) {
|
if (this->cvgSave != NULL) {
|
||||||
func_800C1B24(this, gfxp, this->fbuf, this->cvgSave);
|
func_800C1B24(this, gfxp, this->fbuf, this->cvgSave);
|
||||||
}
|
}
|
||||||
@ -293,10 +293,10 @@ void func_800C213C(PreRender* this, Gfx** gfxp) {
|
|||||||
s32 rtile = 1;
|
s32 rtile = 1;
|
||||||
|
|
||||||
if (this->cvgSave != NULL) {
|
if (this->cvgSave != NULL) {
|
||||||
LogUtils_CheckNullPointer("this", this, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this", this);
|
||||||
LogUtils_CheckNullPointer("glistpp", gfxp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
|
||||||
gfx = *gfxp;
|
gfx = *gfxp;
|
||||||
LogUtils_CheckNullPointer("glistp", gfx, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("glistp", gfx);
|
||||||
|
|
||||||
gDPPipeSync(gfx++);
|
gDPPipeSync(gfx++);
|
||||||
gDPSetEnvColor(gfx++, 255, 255, 255, 32);
|
gDPSetEnvColor(gfx++, 255, 255, 255, 32);
|
||||||
|
@ -512,7 +512,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
|
|||||||
osSyncPrintf("init 処理時間 %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
osSyncPrintf("init 処理時間 %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
||||||
|
|
||||||
startTime = endTime;
|
startTime = endTime;
|
||||||
LogUtils_CheckNullPointer("this->cleanup", gameState->destroy, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this->cleanup", gameState->destroy);
|
||||||
func_800ACE70(&D_801664F0);
|
func_800ACE70(&D_801664F0);
|
||||||
func_800AD920(&D_80166500);
|
func_800AD920(&D_80166500);
|
||||||
VisMono_Init(&sMonoColors);
|
VisMono_Init(&sMonoColors);
|
||||||
@ -537,7 +537,7 @@ void GameState_Destroy(GameState* gameState) {
|
|||||||
func_800C3C20();
|
func_800C3C20();
|
||||||
func_800F3054();
|
func_800F3054();
|
||||||
osRecvMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
osRecvMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
||||||
LogUtils_CheckNullPointer("this->cleanup", gameState->destroy, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this->cleanup", gameState->destroy);
|
||||||
if (gameState->destroy != NULL) {
|
if (gameState->destroy != NULL) {
|
||||||
gameState->destroy(gameState);
|
gameState->destroy(gameState);
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,8 @@ void GameAlloc_Free(GameAlloc* this, void* data) {
|
|||||||
|
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
ptr = &((GameAllocEntry*)data)[-1];
|
ptr = &((GameAllocEntry*)data)[-1];
|
||||||
LogUtils_CheckNullPointer("ptr->prev", ptr->prev, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("ptr->prev", ptr->prev);
|
||||||
LogUtils_CheckNullPointer("ptr->next", ptr->next, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("ptr->next", ptr->next);
|
||||||
ptr->prev->next = ptr->next;
|
ptr->prev->next = ptr->next;
|
||||||
ptr->next->prev = ptr->prev;
|
ptr->next->prev = ptr->prev;
|
||||||
this->head = this->base.prev;
|
this->head = this->base.prev;
|
||||||
|
@ -19,9 +19,9 @@ u32 sIrqMgrRetraceCount = 0;
|
|||||||
void IrqMgr_AddClient(IrqMgr* this, IrqMgrClient* c, OSMesgQueue* msgQ) {
|
void IrqMgr_AddClient(IrqMgr* this, IrqMgrClient* c, OSMesgQueue* msgQ) {
|
||||||
OSIntMask prevInt;
|
OSIntMask prevInt;
|
||||||
|
|
||||||
LogUtils_CheckNullPointer("this", this, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this", this);
|
||||||
LogUtils_CheckNullPointer("c", c, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("c", c);
|
||||||
LogUtils_CheckNullPointer("msgQ", msgQ, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("msgQ", msgQ);
|
||||||
|
|
||||||
prevInt = osSetIntMask(1);
|
prevInt = osSetIntMask(1);
|
||||||
|
|
||||||
@ -45,8 +45,8 @@ void IrqMgr_RemoveClient(IrqMgr* this, IrqMgrClient* c) {
|
|||||||
IrqMgrClient* lastIter = NULL;
|
IrqMgrClient* lastIter = NULL;
|
||||||
OSIntMask prevInt;
|
OSIntMask prevInt;
|
||||||
|
|
||||||
LogUtils_CheckNullPointer("this", this, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this", this);
|
||||||
LogUtils_CheckNullPointer("c", c, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("c", c);
|
||||||
|
|
||||||
prevInt = osSetIntMask(1);
|
prevInt = osSetIntMask(1);
|
||||||
|
|
||||||
@ -214,8 +214,8 @@ void IrqMgr_ThreadEntry(void* arg0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void IrqMgr_Init(IrqMgr* this, void* stack, OSPri pri, u8 retraceCount) {
|
void IrqMgr_Init(IrqMgr* this, void* stack, OSPri pri, u8 retraceCount) {
|
||||||
LogUtils_CheckNullPointer("this", this, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this", this);
|
||||||
LogUtils_CheckNullPointer("stack", stack, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("stack", stack);
|
||||||
|
|
||||||
this->clients = NULL;
|
this->clients = NULL;
|
||||||
this->retraceMsg.type = OS_SC_RETRACE_MSG;
|
this->retraceMsg.type = OS_SC_RETRACE_MSG;
|
||||||
|
@ -4,8 +4,8 @@ void MtxConv_F2L(Mtx* m1, MtxF* m2) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
s32 j;
|
s32 j;
|
||||||
|
|
||||||
LogUtils_CheckNullPointer("m1", m1, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("m1", m1);
|
||||||
LogUtils_CheckNullPointer("m2", m2, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("m2", m2);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
for (j = 0; j < 4; j++) {
|
for (j = 0; j < 4; j++) {
|
||||||
@ -18,7 +18,7 @@ void MtxConv_F2L(Mtx* m1, MtxF* m2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MtxConv_L2F(MtxF* m1, Mtx* m2) {
|
void MtxConv_L2F(MtxF* m1, Mtx* m2) {
|
||||||
LogUtils_CheckNullPointer("m1", m1, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("m1", m1);
|
||||||
LogUtils_CheckNullPointer("m2", m2, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("m2", m2);
|
||||||
guMtxL2F(m1, m2);
|
guMtxL2F(m1, m2);
|
||||||
}
|
}
|
||||||
|
@ -398,7 +398,7 @@ void PadMgr_ThreadEntry(PadMgr* padMgr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
osRecvMesg(&padMgr->interruptMsgQ, (OSMesg*)&mesg, OS_MESG_BLOCK);
|
osRecvMesg(&padMgr->interruptMsgQ, (OSMesg*)&mesg, OS_MESG_BLOCK);
|
||||||
//LogUtils_CheckNullPointer("msg", mesg);
|
//LOG_CHECK_NULL_POINTER("msg", mesg);
|
||||||
|
|
||||||
PadMgr_HandleRetraceMsg(padMgr);
|
PadMgr_HandleRetraceMsg(padMgr);
|
||||||
break;
|
break;
|
||||||
|
@ -18,7 +18,7 @@ OSTime sRDPStartTime;
|
|||||||
void Sched_SwapFrameBuffer(CfbInfo* cfbInfo) {
|
void Sched_SwapFrameBuffer(CfbInfo* cfbInfo) {
|
||||||
u16 width;
|
u16 width;
|
||||||
|
|
||||||
LogUtils_CheckValidPointer("cfbinfo->swapbuffer", cfbInfo->swapBuffer, __FILE__, __LINE__);
|
LOG_CHECK_VALID_POINTER("cfbinfo->swapbuffer", cfbInfo->swapBuffer);
|
||||||
if (cfbInfo->swapBuffer != NULL) {
|
if (cfbInfo->swapBuffer != NULL) {
|
||||||
osViSwapBuffer(cfbInfo->swapBuffer);
|
osViSwapBuffer(cfbInfo->swapBuffer);
|
||||||
cfbInfo->updateRate2 = cfbInfo->updateRate;
|
cfbInfo->updateRate2 = cfbInfo->updateRate;
|
||||||
@ -221,7 +221,7 @@ void func_800C8BC4(SchedContext* sc, OSScTask* task) {
|
|||||||
if (sc->pendingSwapBuf1 == NULL) {
|
if (sc->pendingSwapBuf1 == NULL) {
|
||||||
sc->pendingSwapBuf1 = task->framebuffer;
|
sc->pendingSwapBuf1 = task->framebuffer;
|
||||||
|
|
||||||
LogUtils_CheckValidPointer("sc->pending_swapbuffer1", sc->pendingSwapBuf1, __FILE__, __LINE__);
|
LOG_CHECK_VALID_POINTER("sc->pending_swapbuffer1", sc->pendingSwapBuf1);
|
||||||
|
|
||||||
if ((sc->curBuf == NULL) || (sc->curBuf->updateRate2 < 1)) {
|
if ((sc->curBuf == NULL) || (sc->curBuf->updateRate2 < 1)) {
|
||||||
func_800C84E4(sc, task->framebuffer);
|
func_800C84E4(sc, task->framebuffer);
|
||||||
|
@ -29,7 +29,7 @@ SpeedMeterTimeEntry sSpeedMeterTimeEntryArray[] = {
|
|||||||
gDPPipeSync(gfx);
|
gDPPipeSync(gfx);
|
||||||
|
|
||||||
void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y) {
|
void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y) {
|
||||||
LogUtils_CheckNullPointer("this", this, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("this", this);
|
||||||
this->unk_18 = arg1;
|
this->unk_18 = arg1;
|
||||||
this->y = y;
|
this->y = y;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ void SysCfb_Init(s32 n64dd) {
|
|||||||
osSyncPrintf("RAM4M mode\n");
|
osSyncPrintf("RAM4M mode\n");
|
||||||
sSysCfbEnd = 0x80400000;
|
sSysCfbEnd = 0x80400000;
|
||||||
} else {
|
} else {
|
||||||
LogUtils_HungupThread("../sys_cfb.c", 354);
|
LOG_HUNGUP_THREAD();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1569,7 +1569,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
|
|||||||
&globalCtx->state.tha,
|
&globalCtx->state.tha,
|
||||||
colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y * colCtx->subdivAmount.z, ~1);
|
colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y * colCtx->subdivAmount.z, ~1);
|
||||||
if (colCtx->lookupTbl == NULL) {
|
if (colCtx->lookupTbl == NULL) {
|
||||||
LogUtils_HungupThread(__FILE__, __LINE__);
|
LOG_HUNGUP_THREAD();
|
||||||
}
|
}
|
||||||
colCtx->minBounds.x = colCtx->colHeader->minBounds.x;
|
colCtx->minBounds.x = colCtx->colHeader->minBounds.x;
|
||||||
colCtx->minBounds.y = colCtx->colHeader->minBounds.y;
|
colCtx->minBounds.y = colCtx->colHeader->minBounds.y;
|
||||||
@ -1598,7 +1598,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
|
|||||||
tblMax = customNodeListMax;
|
tblMax = customNodeListMax;
|
||||||
} else {
|
} else {
|
||||||
if (colCtx->memSize < memSize) {
|
if (colCtx->memSize < memSize) {
|
||||||
LogUtils_HungupThread(__FILE__, __LINE__);
|
LOG_HUNGUP_THREAD();
|
||||||
}
|
}
|
||||||
tblMax = (colCtx->memSize - memSize) / sizeof(SSNode);
|
tblMax = (colCtx->memSize - memSize) / sizeof(SSNode);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ KaleidoMgrOverlay* gKaleidoMgrCurOvl = NULL;
|
|||||||
u8 gBossMarkState = 0;
|
u8 gBossMarkState = 0;
|
||||||
|
|
||||||
void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl) {
|
void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl) {
|
||||||
//LogUtils_CheckNullPointer("KaleidoArea_allocp", sKaleidoAreaPtr, __FILE__, __LINE__);
|
//LOG_CHECK_NULL_POINTER("KaleidoArea_allocp", sKaleidoAreaPtr);
|
||||||
|
|
||||||
ovl->loadedRamAddr = sKaleidoAreaPtr;
|
ovl->loadedRamAddr = sKaleidoAreaPtr;
|
||||||
Overlay_Load(ovl->vromStart, ovl->vromEnd, ovl->vramStart, ovl->vramEnd, ovl->loadedRamAddr);
|
Overlay_Load(ovl->vromStart, ovl->vromEnd, ovl->vramStart, ovl->vramEnd, ovl->loadedRamAddr);
|
||||||
@ -63,7 +63,7 @@ void KaleidoManager_Init(GlobalContext* globalCtx) {
|
|||||||
osSyncPrintf(VT_RST);
|
osSyncPrintf(VT_RST);
|
||||||
|
|
||||||
sKaleidoAreaPtr = GameState_Alloc(&globalCtx->state, largestSize, __FILE__, __LINE__);
|
sKaleidoAreaPtr = GameState_Alloc(&globalCtx->state, largestSize, __FILE__, __LINE__);
|
||||||
LogUtils_CheckNullPointer("KaleidoArea_allocp", sKaleidoAreaPtr, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("KaleidoArea_allocp", sKaleidoAreaPtr);
|
||||||
|
|
||||||
osSyncPrintf(VT_FGCOL(GREEN));
|
osSyncPrintf(VT_FGCOL(GREEN));
|
||||||
osSyncPrintf("KaleidoArea %08x - %08x\n", sKaleidoAreaPtr, (uintptr_t)sKaleidoAreaPtr + largestSize);
|
osSyncPrintf("KaleidoArea %08x - %08x\n", sKaleidoAreaPtr, (uintptr_t)sKaleidoAreaPtr + largestSize);
|
||||||
|
@ -59,7 +59,7 @@ void MapMark_Init(GlobalContext* globalCtx) {
|
|||||||
u32 overlaySize = (uintptr_t)overlay->vramEnd - (uintptr_t)overlay->vramStart;
|
u32 overlaySize = (uintptr_t)overlay->vramEnd - (uintptr_t)overlay->vramStart;
|
||||||
|
|
||||||
overlay->loadedRamAddr = GameState_Alloc(&globalCtx->state, overlaySize, __FILE__, __LINE__);
|
overlay->loadedRamAddr = GameState_Alloc(&globalCtx->state, overlaySize, __FILE__, __LINE__);
|
||||||
LogUtils_CheckNullPointer("dlftbl->allocp", overlay->loadedRamAddr, __FILE__, __LINE__);
|
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);
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) {
|
|||||||
|
|
||||||
// "z_room.c: Data consistent with camera id does not exist camid=%d"
|
// "z_room.c: Data consistent with camera id does not exist camid=%d"
|
||||||
osSyncPrintf(VT_COL(RED, WHITE) "z_room.c:カメラIDに一致するデータが存在しません camid=%d\n" VT_RST, camId);
|
osSyncPrintf(VT_COL(RED, WHITE) "z_room.c:カメラIDに一致するデータが存在しません camid=%d\n" VT_RST, camId);
|
||||||
LogUtils_HungupThread(__FILE__, __LINE__);
|
LOG_HUNGUP_THREAD();
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -496,7 +496,7 @@ void func_80096F6C(GlobalContext* globalCtx, Room* room, u32 flags) {
|
|||||||
} else if (polygon1->format == 2) {
|
} else if (polygon1->format == 2) {
|
||||||
func_80096B6C(globalCtx, room, flags);
|
func_80096B6C(globalCtx, room, flags);
|
||||||
} else {
|
} else {
|
||||||
LogUtils_HungupThread(__FILE__, __LINE__);
|
LOG_HUNGUP_THREAD();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ s32 func_800AAA9C(View* view) {
|
|||||||
OPEN_DISPS(gfxCtx);
|
OPEN_DISPS(gfxCtx);
|
||||||
|
|
||||||
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
||||||
LogUtils_CheckNullPointer("vp", vp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("vp", vp);
|
||||||
View_ViewportToVp(vp, &view->viewport);
|
View_ViewportToVp(vp, &view->viewport);
|
||||||
view->vp = *vp;
|
view->vp = *vp;
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ s32 func_800AAA9C(View* view) {
|
|||||||
gSPViewport(POLY_KAL_DISP++, vp);
|
gSPViewport(POLY_KAL_DISP++, vp);
|
||||||
|
|
||||||
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||||
LogUtils_CheckNullPointer("projection", projection, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("projection", projection);
|
||||||
view->projectionPtr = projection;
|
view->projectionPtr = projection;
|
||||||
|
|
||||||
width = view->viewport.rightX - view->viewport.leftX;
|
width = view->viewport.rightX - view->viewport.leftX;
|
||||||
@ -315,7 +315,7 @@ s32 func_800AAA9C(View* view) {
|
|||||||
aspect = (f32)width / (f32)height;
|
aspect = (f32)width / (f32)height;
|
||||||
|
|
||||||
viewing = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
viewing = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||||
LogUtils_CheckNullPointer("viewing", viewing, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("viewing", viewing);
|
||||||
view->viewingPtr = viewing;
|
view->viewingPtr = viewing;
|
||||||
|
|
||||||
if (view->eye.x == view->lookAt.x && view->eye.y == view->lookAt.y && view->eye.z == view->lookAt.z) {
|
if (view->eye.x == view->lookAt.x && view->eye.y == view->lookAt.y && view->eye.z == view->lookAt.z) {
|
||||||
@ -473,7 +473,7 @@ s32 func_800AB0A8(View* view) {
|
|||||||
OPEN_DISPS(gfxCtx);
|
OPEN_DISPS(gfxCtx);
|
||||||
|
|
||||||
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
||||||
LogUtils_CheckNullPointer("vp", vp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("vp", vp);
|
||||||
View_ViewportToVp(vp, &view->viewport);
|
View_ViewportToVp(vp, &view->viewport);
|
||||||
view->vp = *vp;
|
view->vp = *vp;
|
||||||
|
|
||||||
@ -485,7 +485,7 @@ s32 func_800AB0A8(View* view) {
|
|||||||
gSPViewport(OVERLAY_DISP++, vp);
|
gSPViewport(OVERLAY_DISP++, vp);
|
||||||
|
|
||||||
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||||
LogUtils_CheckNullPointer("projection", projection, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("projection", projection);
|
||||||
view->projectionPtr = projection;
|
view->projectionPtr = projection;
|
||||||
|
|
||||||
guOrtho(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f,
|
guOrtho(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f,
|
||||||
@ -512,7 +512,7 @@ s32 func_800AB2C4(View* view) {
|
|||||||
OPEN_DISPS(gfxCtx);
|
OPEN_DISPS(gfxCtx);
|
||||||
|
|
||||||
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
||||||
LogUtils_CheckNullPointer("vp", vp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("vp", vp);
|
||||||
View_ViewportToVp(vp, &view->viewport);
|
View_ViewportToVp(vp, &view->viewport);
|
||||||
view->vp = *vp;
|
view->vp = *vp;
|
||||||
|
|
||||||
@ -522,7 +522,7 @@ s32 func_800AB2C4(View* view) {
|
|||||||
gSPViewport(OVERLAY_DISP++, vp);
|
gSPViewport(OVERLAY_DISP++, vp);
|
||||||
|
|
||||||
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||||
LogUtils_CheckNullPointer("projection", projection, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("projection", projection);
|
||||||
view->projectionPtr = projection;
|
view->projectionPtr = projection;
|
||||||
|
|
||||||
guOrtho(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f,
|
guOrtho(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f,
|
||||||
@ -550,7 +550,7 @@ s32 func_800AB560(View* view) {
|
|||||||
OPEN_DISPS(gfxCtx);
|
OPEN_DISPS(gfxCtx);
|
||||||
|
|
||||||
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
||||||
LogUtils_CheckNullPointer("vp", vp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("vp", vp);
|
||||||
View_ViewportToVp(vp, &view->viewport);
|
View_ViewportToVp(vp, &view->viewport);
|
||||||
view->vp = *vp;
|
view->vp = *vp;
|
||||||
|
|
||||||
@ -560,7 +560,7 @@ s32 func_800AB560(View* view) {
|
|||||||
gSPViewport(OVERLAY_DISP++, vp);
|
gSPViewport(OVERLAY_DISP++, vp);
|
||||||
|
|
||||||
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||||
LogUtils_CheckNullPointer("projection", projection, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("projection", projection);
|
||||||
view->projectionPtr = projection;
|
view->projectionPtr = projection;
|
||||||
|
|
||||||
width = view->viewport.rightX - view->viewport.leftX;
|
width = view->viewport.rightX - view->viewport.leftX;
|
||||||
@ -575,7 +575,7 @@ s32 func_800AB560(View* view) {
|
|||||||
gSPMatrix(OVERLAY_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(OVERLAY_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
|
|
||||||
viewing = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
viewing = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||||
LogUtils_CheckNullPointer("viewing", viewing, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("viewing", viewing);
|
||||||
view->viewingPtr = viewing;
|
view->viewingPtr = viewing;
|
||||||
|
|
||||||
if (view->eye.x == view->lookAt.x && view->eye.y == view->lookAt.y && view->eye.z == view->lookAt.z) {
|
if (view->eye.x == view->lookAt.x && view->eye.y == view->lookAt.y && view->eye.z == view->lookAt.z) {
|
||||||
@ -622,7 +622,7 @@ s32 func_800AB9EC(View* view, s32 arg1, Gfx** gfxp) {
|
|||||||
|
|
||||||
if (arg1 & 2) {
|
if (arg1 & 2) {
|
||||||
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
vp = Graph_Alloc(gfxCtx, sizeof(Vp));
|
||||||
LogUtils_CheckNullPointer("vp", vp, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("vp", vp);
|
||||||
View_ViewportToVp(vp, &view->viewport);
|
View_ViewportToVp(vp, &view->viewport);
|
||||||
|
|
||||||
view->vp = *vp;
|
view->vp = *vp;
|
||||||
@ -635,7 +635,7 @@ s32 func_800AB9EC(View* view, s32 arg1, Gfx** gfxp) {
|
|||||||
|
|
||||||
if (arg1 & 8) {
|
if (arg1 & 8) {
|
||||||
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||||
LogUtils_CheckNullPointer("projection", projection, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("projection", projection);
|
||||||
view->projectionPtr = projection;
|
view->projectionPtr = projection;
|
||||||
|
|
||||||
guOrtho(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f,
|
guOrtho(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f,
|
||||||
@ -646,7 +646,7 @@ s32 func_800AB9EC(View* view, s32 arg1, Gfx** gfxp) {
|
|||||||
gSPMatrix(gfx++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gfx++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
} else if (arg1 & 6) {
|
} else if (arg1 & 6) {
|
||||||
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
projection = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||||
LogUtils_CheckNullPointer("projection", projection, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("projection", projection);
|
||||||
view->projectionPtr = projection;
|
view->projectionPtr = projection;
|
||||||
|
|
||||||
width = view->viewport.rightX - view->viewport.leftX;
|
width = view->viewport.rightX - view->viewport.leftX;
|
||||||
@ -663,7 +663,7 @@ s32 func_800AB9EC(View* view, s32 arg1, Gfx** gfxp) {
|
|||||||
|
|
||||||
if (arg1 & 1) {
|
if (arg1 & 1) {
|
||||||
viewing = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
viewing = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||||
LogUtils_CheckNullPointer("viewing", viewing, __FILE__, __LINE__);
|
LOG_CHECK_NULL_POINTER("viewing", viewing);
|
||||||
view->viewingPtr = viewing;
|
view->viewingPtr = viewing;
|
||||||
|
|
||||||
func_800ABE74(view->eye.x, view->eye.y, view->eye.z);
|
func_800ABE74(view->eye.x, view->eye.y, view->eye.z);
|
||||||
|
@ -92,7 +92,7 @@ s32 EnHorseGameCheck_InitIngoRace(EnHorseGameCheckBase* base, GlobalContext* glo
|
|||||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, -250.0f, 1.0f, -1650.0f, 0, 0x4000, 0, 0x8003);
|
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, -250.0f, 1.0f, -1650.0f, 0, 0x4000, 0, 0x8003);
|
||||||
|
|
||||||
if (this->ingoHorse == NULL) {
|
if (this->ingoHorse == NULL) {
|
||||||
LogUtils_HungupThread(__FILE__, __LINE__);
|
LOG_HUNGUP_THREAD();
|
||||||
}
|
}
|
||||||
this->startTimer = 0;
|
this->startTimer = 0;
|
||||||
this->finishTimer = 0;
|
this->finishTimer = 0;
|
||||||
|
@ -54,7 +54,7 @@ u32 EffectSsKakera_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, voi
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
osSyncPrintf("shape_modelがNULL\n");
|
osSyncPrintf("shape_modelがNULL\n");
|
||||||
LogUtils_HungupThread(__FILE__, __LINE__);
|
LOG_HUNGUP_THREAD();
|
||||||
}
|
}
|
||||||
|
|
||||||
this->draw = EffectSsKakera_Draw;
|
this->draw = EffectSsKakera_Draw;
|
||||||
|
Loading…
Reference in New Issue
Block a user