mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-31 07:20:14 -05:00
ASSERT macro __FILE__ __LINE__
This commit is contained in:
parent
1cdaf454c2
commit
73d9bafe74
@ -190,13 +190,7 @@ 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 } }
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define ASSERT(cond, msg, file, line) ((void)0)
|
||||
#elif defined(REAL_ASSERT_MACRO)
|
||||
#define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(#cond, __FILE__, __LINE__))
|
||||
#else
|
||||
#define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(msg, file, line))
|
||||
#endif
|
||||
#define ASSERT(expression) (void)((!!(expression)) || (__assert(#expression, __FILE__, (unsigned)(__LINE__)), 0))
|
||||
|
||||
#define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \
|
||||
do { \
|
||||
|
@ -43,7 +43,7 @@ extern "C" void OTRGameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s
|
||||
|
||||
scene->unk_13 = 0;
|
||||
|
||||
//ASSERT(globalCtx->sceneSegment != NULL, "this->sceneSegment != NULL", __FILE__, __LINE__);
|
||||
//ASSERT(globalCtx->sceneSegment != NULL);
|
||||
//gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment);
|
||||
|
||||
OTRGameplay_InitScene(globalCtx, spawn);
|
||||
|
@ -908,7 +908,7 @@ extern "C" s32 OTRfunc_8009728C(GlobalContext* globalCtx, RoomContext* roomCtx,
|
||||
roomCtx->curRoom.segment = NULL;
|
||||
roomCtx->status = 1;
|
||||
|
||||
ASSERT(roomNum < globalCtx->numRooms, "read_room_ID < game_play->room_rom_address.num", __FILE__, __LINE__);
|
||||
ASSERT(roomNum < globalCtx->numRooms);
|
||||
|
||||
if (roomNum >= globalCtx->numRooms)
|
||||
return 0; // UH OH
|
||||
|
@ -125,9 +125,9 @@ end:
|
||||
s32 DmaMgr_DmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
|
||||
s32 ret;
|
||||
|
||||
ASSERT(pihandle == gCartHandle, "pihandle == carthandle", __FILE__, __LINE__);
|
||||
ASSERT(direction == OS_READ, "direction == OS_READ", __FILE__, __LINE__);
|
||||
ASSERT(mb != NULL, "mb != NULL", __FILE__, __LINE__);
|
||||
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,
|
||||
|
@ -102,9 +102,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),
|
||||
"(type == M_AUDTASK) || (type == M_GFXTASK) || (type == M_NJPEGTASK) || (type == M_NULTASK)", __FILE__,
|
||||
__LINE__);
|
||||
ASSERT((type == M_AUDTASK) || (type == M_GFXTASK) || (type == M_NJPEGTASK) || (type == M_NULTASK));
|
||||
|
||||
if (type == M_AUDTASK) {
|
||||
if (sLogScheduler) {
|
||||
@ -136,7 +134,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, "sc->curRSPTask->list.t.type != M_AUDTASK", __FILE__, __LINE__);
|
||||
ASSERT(sc->curRSPTask->list.t.type != M_AUDTASK);
|
||||
|
||||
sc->curRSPTask->state |= OS_SC_YIELD;
|
||||
|
||||
@ -155,14 +153,14 @@ OSScTask* func_800C89D4(SchedContext* sc, OSScTask* task) {
|
||||
|
||||
if (sc->pendingSwapBuf1 != NULL) {
|
||||
if (0) {
|
||||
ASSERT(sc->pendingSwapBuf1 != NULL, "sc->pending_swapbuffer1", __FILE__, UNK_LINE);
|
||||
ASSERT(sc->pendingSwapBuf1 != NULL);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (sc->pendingSwapBuf2 != NULL) {
|
||||
if (0) {
|
||||
ASSERT(sc->pendingSwapBuf2 != NULL, "sc->pending_swapbuffer2", __FILE__, UNK_LINE);
|
||||
ASSERT(sc->pendingSwapBuf2 != NULL);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -248,7 +246,7 @@ u32 Sched_IsComplete(SchedContext* sc, OSScTask* task) {
|
||||
}
|
||||
|
||||
void Sched_RunTask(SchedContext* sc, OSScTask* spTask, OSScTask* dpTask) {
|
||||
ASSERT(sc->curRSPTask == NULL, "sc->curRSPTask == NULL", __FILE__, __LINE__);
|
||||
ASSERT(sc->curRSPTask == NULL);
|
||||
if (spTask != NULL) {
|
||||
if (spTask->list.t.type == M_NULTASK) {
|
||||
if (spTask->flags & OS_SC_NEEDS_RSP) {
|
||||
@ -358,7 +356,7 @@ void Sched_HandleRSPDone(SchedContext* sc) {
|
||||
OSScTask* nextRDP = NULL;
|
||||
s32 state;
|
||||
|
||||
ASSERT(sc->curRSPTask != NULL, "sc->curRSPTask", __FILE__, __LINE__);
|
||||
ASSERT(sc->curRSPTask != NULL);
|
||||
|
||||
if (sc->curRSPTask->list.t.type == M_AUDTASK) {
|
||||
gRSPAudioTotalTime += osGetTime() - sRSPAudioStartTime;
|
||||
@ -407,8 +405,8 @@ void Sched_HandleRDPDone(SchedContext* sc) {
|
||||
s32 state;
|
||||
|
||||
gRDPTotalTime = osGetTime() - sRDPStartTime;
|
||||
ASSERT(sc->curRDPTask != NULL, "sc->curRDPTask", __FILE__, __LINE__);
|
||||
ASSERT(sc->curRDPTask->list.t.type == M_GFXTASK, "sc->curRDPTask->list.t.type == M_GFXTASK", __FILE__, __LINE__);
|
||||
ASSERT(sc->curRDPTask != NULL);
|
||||
ASSERT(sc->curRDPTask->list.t.type == M_GFXTASK);
|
||||
curTask = sc->curRDPTask;
|
||||
sc->curRDPTask = NULL;
|
||||
curTask->state &= ~OS_SC_DP;
|
||||
|
@ -35,7 +35,7 @@ void Matrix_Push(void) {
|
||||
void Matrix_Pop(void) {
|
||||
FrameInterpolation_RecordMatrixPop();
|
||||
sCurrentMatrix--;
|
||||
ASSERT(sCurrentMatrix >= sMatrixStack, "Matrix_now >= Matrix_stack", __FILE__, __LINE__);
|
||||
ASSERT(sCurrentMatrix >= sMatrixStack);
|
||||
}
|
||||
|
||||
void Matrix_Get(MtxF* dest) {
|
||||
|
@ -2362,7 +2362,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
||||
|
||||
if (0) {
|
||||
// This ASSERT is optimized out but it exists due to its presence in rodata
|
||||
ASSERT(gMaxActorId == ACTOR_ID_MAX, "MaxProfile == ACTOR_DLF_MAX", __FILE__, UNK_LINE);
|
||||
ASSERT(gMaxActorId == ACTOR_ID_MAX);
|
||||
}
|
||||
|
||||
sp74 = NULL;
|
||||
@ -2762,8 +2762,7 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
||||
if ((actor->flags & ACTOR_FLAG_7) &&
|
||||
((globalCtx->roomCtx.curRoom.showInvisActors == 0) || (globalCtx->actorCtx.unk_03 != 0) ||
|
||||
(actor->room != globalCtx->roomCtx.curRoom.num))) {
|
||||
ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX,
|
||||
"invisible_actor_counter < INVISIBLE_ACTOR_MAX", __FILE__, __LINE__);
|
||||
ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX);
|
||||
invisibleActors[invisibleActorCounter] = actor;
|
||||
invisibleActorCounter++;
|
||||
} else {
|
||||
@ -3006,7 +3005,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId
|
||||
u32 overlaySize;
|
||||
|
||||
overlayEntry = &gActorOverlayTable[actorId];
|
||||
ASSERT(actorId < ACTOR_ID_MAX, "profile < ACTOR_DLF_MAX", __FILE__, __LINE__);
|
||||
ASSERT(actorId < ACTOR_ID_MAX);
|
||||
|
||||
name = overlayEntry->name != NULL ? overlayEntry->name : "";
|
||||
overlaySize = (uintptr_t)overlayEntry->vramEnd - (uintptr_t)overlayEntry->vramStart;
|
||||
@ -3035,7 +3034,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId
|
||||
}
|
||||
} else {
|
||||
if (overlayEntry->allocType & ALLOCTYPE_ABSOLUTE) {
|
||||
ASSERT(overlaySize <= AM_FIELD_SIZE, "actor_segsize <= AM_FIELD_SIZE", __FILE__, __LINE__);
|
||||
ASSERT(overlaySize <= AM_FIELD_SIZE);
|
||||
|
||||
if (actorCtx->absoluteSpace == NULL) {
|
||||
// "AMF: absolute magic field"
|
||||
@ -3102,7 +3101,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ASSERT(overlayEntry->numLoaded < 255, "actor_dlftbl->clients < 255", __FILE__, __LINE__);
|
||||
ASSERT(overlayEntry->numLoaded < 255);
|
||||
|
||||
overlayEntry->numLoaded++;
|
||||
|
||||
@ -3243,8 +3242,8 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalC
|
||||
osSyncPrintf("オーバーレイではありません\n"); // "Not an overlay"
|
||||
}
|
||||
} else { */
|
||||
//ASSERT(overlayEntry->loadedRamAddr != NULL, "actor_dlftbl->allocp != NULL", __FILE__, __LINE__);
|
||||
//ASSERT(overlayEntry->numLoaded > 0, "actor_dlftbl->clients > 0", __FILE__, __LINE__);
|
||||
//ASSERT(overlayEntry->loadedRamAddr != NULL, "actor_dlftbl->allocp != NULL");
|
||||
//ASSERT(overlayEntry->numLoaded > 0, "actor_dlftbl->clients > 0");
|
||||
overlayEntry->numLoaded--;
|
||||
Actor_FreeOverlay(overlayEntry);
|
||||
//}
|
||||
|
@ -87,7 +87,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, "new_node != SS_NULL", __FILE__, __LINE__);
|
||||
ASSERT(newNodeId != SS_NULL);
|
||||
SSNode_SetValue(&nodeList->tbl[newNodeId], polyId, ssList->head);
|
||||
ssList->head = newNodeId;
|
||||
}
|
||||
@ -106,7 +106,7 @@ void DynaSSNodeList_Initialize(GlobalContext* globalCtx, DynaSSNodeList* nodeLis
|
||||
void DynaSSNodeList_Alloc(GlobalContext* globalCtx, DynaSSNodeList* nodeList, s32 max) {
|
||||
nodeList->tbl = THA_AllocEndAlign(&globalCtx->state.tha, max * sizeof(SSNode), -2);
|
||||
|
||||
ASSERT(nodeList->tbl != NULL, "psst->tbl != NULL", __FILE__, __LINE__);
|
||||
ASSERT(nodeList->tbl != NULL);
|
||||
|
||||
nodeList->max = max;
|
||||
nodeList->count = 0;
|
||||
@ -700,7 +700,7 @@ s32 BgCheck_SphVsStaticWall(StaticLookup* lookup, CollisionContext* colCtx, u16
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(!IS_ZERO(normalXZ), "!IS_ZERO(ac_size)", __FILE__, __LINE__);
|
||||
ASSERT(!IS_ZERO(normalXZ));
|
||||
|
||||
invNormalXZ = 1.0f / normalXZ;
|
||||
temp_f16 = fabsf(nz) * invNormalXZ;
|
||||
@ -781,7 +781,7 @@ s32 BgCheck_SphVsStaticWall(StaticLookup* lookup, CollisionContext* colCtx, u16
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(!IS_ZERO(normalXZ), "!IS_ZERO(ac_size)", __FILE__, __LINE__);
|
||||
ASSERT(!IS_ZERO(normalXZ));
|
||||
|
||||
invNormalXZ = 1.0f / normalXZ;
|
||||
temp_f16 = fabsf(nx) * invNormalXZ;
|
||||
@ -2427,11 +2427,11 @@ void SSNodeList_Alloc(GlobalContext* globalCtx, SSNodeList* this, s32 tblMax, s3
|
||||
this->count = 0;
|
||||
this->tbl = THA_AllocEndAlign(&globalCtx->state.tha, tblMax * sizeof(SSNode), -2);
|
||||
|
||||
ASSERT(this->tbl != NULL, "this->short_slist_node_tbl != NULL", __FILE__, __LINE__);
|
||||
ASSERT(this->tbl != NULL);
|
||||
|
||||
this->polyCheckTbl = GameState_Alloc(&globalCtx->state, numPolys, __FILE__, __LINE__);
|
||||
|
||||
ASSERT(this->polyCheckTbl != NULL, "this->polygon_check != NULL", __FILE__, __LINE__);
|
||||
ASSERT(this->polyCheckTbl != NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2441,8 +2441,7 @@ SSNode* SSNodeList_GetNextNode(SSNodeList* this) {
|
||||
SSNode* result = &this->tbl[this->count];
|
||||
|
||||
this->count++;
|
||||
ASSERT(this->count < this->max, "this->short_slist_node_last_index < this->short_slist_node_size", __FILE__,
|
||||
__LINE__);
|
||||
ASSERT(this->count < this->max);
|
||||
if (!(this->count < this->max)) {
|
||||
return NULL;
|
||||
}
|
||||
@ -2455,7 +2454,7 @@ SSNode* SSNodeList_GetNextNode(SSNodeList* this) {
|
||||
u16 SSNodeList_GetNextNodeIdx(SSNodeList* this) {
|
||||
u16 new_index = this->count++;
|
||||
|
||||
ASSERT(new_index < this->max, "new_index < this->short_slist_node_size", __FILE__, __LINE__);
|
||||
ASSERT(new_index < this->max);
|
||||
return new_index;
|
||||
}
|
||||
|
||||
@ -2561,7 +2560,7 @@ void DynaPoly_NullPolyList(CollisionPoly** polyList) {
|
||||
*/
|
||||
void DynaPoly_AllocPolyList(GlobalContext* globalCtx, CollisionPoly** polyList, s32 numPolys) {
|
||||
*polyList = THA_AllocEndAlign(&globalCtx->state.tha, numPolys * sizeof(CollisionPoly), -2);
|
||||
ASSERT(*polyList != NULL, "ptbl->pbuf != NULL", __FILE__, __LINE__);
|
||||
ASSERT(*polyList != NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2576,7 +2575,7 @@ void DynaPoly_NullVtxList(Vec3s** vtxList) {
|
||||
*/
|
||||
void DynaPoly_AllocVtxList(GlobalContext* globalCtx, Vec3s** vtxList, s32 numVtx) {
|
||||
*vtxList = THA_AllocEndAlign(&globalCtx->state.tha, numVtx * sizeof(Vec3s), -2);
|
||||
ASSERT(*vtxList != NULL, "ptbl->pbuf != NULL", __FILE__, __LINE__);
|
||||
ASSERT(*vtxList != NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2793,10 +2792,8 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
|
||||
*vtxStartIndex + pbgdata->numVertices, dyna->vtxListMax);
|
||||
}
|
||||
|
||||
ASSERT(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons,
|
||||
"pdyna_poly_info->poly_num >= *pstart_poly_index + pbgdata->poly_num", __FILE__, __LINE__);
|
||||
ASSERT(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices,
|
||||
"pdyna_poly_info->vert_num >= *pstart_vert_index + pbgdata->vtx_num", __FILE__, __LINE__);
|
||||
ASSERT(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons);
|
||||
ASSERT(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices);
|
||||
|
||||
if (!(dyna->bitFlag & DYNAPOLY_INVALIDATE_LOOKUP) &&
|
||||
(BgActor_IsTransformUnchanged(&dyna->bgActors[bgId]) == true)) {
|
||||
@ -3229,7 +3226,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), "!IS_ZERO(ac_size)", __FILE__, __LINE__);
|
||||
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)) {
|
||||
@ -3302,7 +3299,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), "!IS_ZERO(ac_size)", __FILE__, __LINE__);
|
||||
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)) {
|
||||
|
@ -70,7 +70,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, "vtx_tbl != NULL", __FILE__, __LINE__);
|
||||
ASSERT(vtxTbl != NULL);
|
||||
|
||||
vtxTbl[0].n.ob[0] = vA->x;
|
||||
vtxTbl[0].n.ob[1] = vA->y;
|
||||
@ -452,7 +452,7 @@ s32 Collider_SetJntSph(GlobalContext* globalCtx, ColliderJntSph* dest, Actor* ac
|
||||
Collider_SetBase(globalCtx, &dest->base, actor, &src->base);
|
||||
dest->count = src->count;
|
||||
dest->elements = elements;
|
||||
ASSERT(dest->elements != NULL, "pclobj_jntsph->elem_tbl != NULL", __FILE__, __LINE__);
|
||||
ASSERT(dest->elements != NULL);
|
||||
|
||||
for (destElem = dest->elements, srcElem = src->elements; destElem < dest->elements + dest->count;
|
||||
destElem++, srcElem++) {
|
||||
@ -789,7 +789,7 @@ s32 Collider_SetTris(GlobalContext* globalCtx, ColliderTris* dest, Actor* actor,
|
||||
Collider_SetBase(globalCtx, &dest->base, actor, &src->base);
|
||||
dest->count = src->count;
|
||||
dest->elements = elements;
|
||||
ASSERT(dest->elements != NULL, "pclobj_tris->elem_tbl != NULL", __FILE__, __LINE__);
|
||||
ASSERT(dest->elements != NULL);
|
||||
|
||||
for (destElem = dest->elements, srcElem = src->elements; destElem < dest->elements + dest->count;
|
||||
destElem++, srcElem++) {
|
||||
@ -1180,7 +1180,7 @@ s32 CollisionCheck_SetAT(GlobalContext* globalCtx, CollisionCheckContext* colChk
|
||||
if (FrameAdvance_IsEnabled(globalCtx) == true) {
|
||||
return -1;
|
||||
}
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", __FILE__, __LINE__);
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD);
|
||||
sATResetFuncs[collider->shape](globalCtx, collider);
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
return -1;
|
||||
@ -1205,7 +1205,7 @@ s32 CollisionCheck_SetAT(GlobalContext* globalCtx, CollisionCheckContext* colChk
|
||||
*/
|
||||
s32 CollisionCheck_SetAT_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", __FILE__, __LINE__);
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD);
|
||||
if (FrameAdvance_IsEnabled(globalCtx) == true) {
|
||||
return -1;
|
||||
}
|
||||
@ -1249,7 +1249,7 @@ s32 CollisionCheck_SetAC(GlobalContext* globalCtx, CollisionCheckContext* colChk
|
||||
if (FrameAdvance_IsEnabled(globalCtx) == true) {
|
||||
return -1;
|
||||
}
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", __FILE__, __LINE__);
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD);
|
||||
sACResetFuncs[collider->shape](globalCtx, collider);
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
return -1;
|
||||
@ -1274,7 +1274,7 @@ s32 CollisionCheck_SetAC(GlobalContext* globalCtx, CollisionCheckContext* colChk
|
||||
*/
|
||||
s32 CollisionCheck_SetAC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", __FILE__, __LINE__);
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD);
|
||||
if (FrameAdvance_IsEnabled(globalCtx) == true) {
|
||||
return -1;
|
||||
}
|
||||
@ -1319,7 +1319,7 @@ s32 CollisionCheck_SetOC(GlobalContext* globalCtx, CollisionCheckContext* colChk
|
||||
return -1;
|
||||
}
|
||||
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", __FILE__, __LINE__);
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD);
|
||||
|
||||
sOCResetFuncs[collider->shape](globalCtx, collider);
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
@ -1348,7 +1348,7 @@ s32 CollisionCheck_SetOC_SAC(GlobalContext* globalCtx, CollisionCheckContext* co
|
||||
if (FrameAdvance_IsEnabled(globalCtx) == true) {
|
||||
return -1;
|
||||
}
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", __FILE__, __LINE__);
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD);
|
||||
sOCResetFuncs[collider->shape](globalCtx, collider);
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
return -1;
|
||||
@ -2987,7 +2987,7 @@ void CollisionCheck_ApplyDamage(GlobalContext* globalCtx, CollisionCheckContext*
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT(info->acHitInfo != NULL, "pclobj_elem->ac_hit_elem != NULL", __FILE__, __LINE__);
|
||||
ASSERT(info->acHitInfo != NULL);
|
||||
tbl = collider->actor->colChkInfo.damageTable;
|
||||
if (tbl == NULL) {
|
||||
damage = (f32)info->acHitInfo->toucher.damage - info->bumper.defense;
|
||||
|
@ -38,7 +38,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
||||
|
||||
osSyncPrintf("parameter->parameterSegment=%x\n", interfaceCtx->parameterSegment);
|
||||
|
||||
ASSERT(interfaceCtx->parameterSegment != NULL, "parameter->parameterSegment != NULL", __FILE__, __LINE__);
|
||||
ASSERT(interfaceCtx->parameterSegment != NULL);
|
||||
DmaMgr_SendRequest1(interfaceCtx->parameterSegment, (uintptr_t)_parameter_staticSegmentRomStart, parameterSize,
|
||||
__FILE__, 162);
|
||||
|
||||
@ -47,7 +47,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
||||
osSyncPrintf("DOアクション テクスチャ初期=%x\n", 0x480); // "DO Action Texture Initialization"
|
||||
osSyncPrintf("parameter->do_actionSegment=%x\n", interfaceCtx->doActionSegment);
|
||||
|
||||
ASSERT(interfaceCtx->doActionSegment != NULL, "parameter->do_actionSegment != NULL", __FILE__, __LINE__);
|
||||
ASSERT(interfaceCtx->doActionSegment != NULL);
|
||||
|
||||
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||
doActionOffset = 0;
|
||||
@ -72,7 +72,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
||||
|
||||
memcpy(interfaceCtx->doActionSegment + 0x300, ResourceMgr_LoadTexByName(gReturnDoActionENGTex), 0x180);
|
||||
//DmaMgr_SendRequest1(interfaceCtx->doActionSegment + 0x300, (uintptr_t)_do_action_staticSegmentRomStart + doActionOffset,
|
||||
//0x180, __FILE__, __LINE__);
|
||||
//0x180);
|
||||
|
||||
interfaceCtx->iconItemSegment = GameState_Alloc(
|
||||
&globalCtx->state, 0x1000 * ARRAY_COUNT(gSaveContext.equips.buttonItems), __FILE__, __LINE__);
|
||||
@ -81,7 +81,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
||||
osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 0x4000);
|
||||
osSyncPrintf("parameter->icon_itemSegment=%x\n", interfaceCtx->iconItemSegment);
|
||||
|
||||
ASSERT(interfaceCtx->iconItemSegment != NULL, "parameter->icon_itemSegment != NULL", __FILE__, __LINE__);
|
||||
ASSERT(interfaceCtx->iconItemSegment != NULL);
|
||||
|
||||
osSyncPrintf("Register_Item[%x, %x, %x, %x]\n", gSaveContext.equips.buttonItems[0],
|
||||
gSaveContext.equips.buttonItems[1], gSaveContext.equips.buttonItems[2],
|
||||
@ -176,7 +176,7 @@ void Message_Init(GlobalContext* globalCtx) {
|
||||
osSyncPrintf("message->fukidashiSegment=%x\n", msgCtx->textboxSegment);
|
||||
|
||||
osSyncPrintf("吹き出しgame_alloc=%x\n", 0x2200); // "Textbox game_alloc=%x"
|
||||
ASSERT(msgCtx->textboxSegment != NULL, "message->fukidashiSegment != NULL", __FILE__, __LINE__);
|
||||
ASSERT(msgCtx->textboxSegment != NULL);
|
||||
|
||||
Font_LoadOrderedFont(&globalCtx->msgCtx.font);
|
||||
|
||||
|
@ -534,7 +534,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
|
||||
Vec3f sp118;
|
||||
Vec3f sp10C;
|
||||
|
||||
ASSERT(index - 1 >= 0, "index - 1 >= 0", __FILE__, __LINE__);
|
||||
ASSERT(index - 1 >= 0);
|
||||
|
||||
ratio = (f32)(elem - 1)->timer / (f32)this->elemDuration;
|
||||
EffectBlure_GetComputedValues(this, index - 1, ratio, &sp1EC, &sp1E4, &sp1DC, &sp1D8);
|
||||
@ -554,7 +554,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
|
||||
Vec3f sp100;
|
||||
Vec3f spF4;
|
||||
|
||||
ASSERT(index + 2 < this->numElements, "index + 2 < this2->now_edge_num", __FILE__, __LINE__);
|
||||
ASSERT(index + 2 < this->numElements);
|
||||
|
||||
ratio = (f32)(elem + 2)->timer / (f32)this->elemDuration;
|
||||
EffectBlure_GetComputedValues(this, index + 2, ratio, &sp1EC, &sp1E4, &sp1DC, &sp1D8);
|
||||
|
@ -18,7 +18,7 @@ void EffectSs_InitInfo(GlobalContext* globalCtx, s32 tableSize) {
|
||||
|
||||
sEffectSsInfo.table =
|
||||
GameState_Alloc(&globalCtx->state, tableSize * sizeof(EffectSs), __FILE__, __LINE__);
|
||||
ASSERT(sEffectSsInfo.table != NULL, "EffectSS2Info.data_table != NULL", __FILE__, __LINE__);
|
||||
ASSERT(sEffectSsInfo.table != NULL);
|
||||
|
||||
sEffectSsInfo.searchStartIndex = 0;
|
||||
sEffectSsInfo.tableSize = tableSize;
|
||||
@ -175,7 +175,7 @@ void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* init
|
||||
|
||||
overlayEntry = &gEffectSsOverlayTable[type];
|
||||
|
||||
ASSERT(type < EFFECT_SS_TYPE_MAX, "type < EFFECT_SS2_TYPE_LAST_LABEL", __FILE__, __LINE__);
|
||||
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
|
||||
|
@ -59,7 +59,7 @@ u32 ElfMessage_CheckCondition(ElfMessage* msg) {
|
||||
}
|
||||
|
||||
LOG_STRING("企画外 条件"); // "Unplanned conditions"
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(0);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -142,7 +142,7 @@ u16 ElfMessage_GetTextFromMsgs(ElfMessage* msg) {
|
||||
return msg->byte2 | 0x100;
|
||||
default:
|
||||
LOG_STRING("企画外 条件"); // "Unplanned conditions"
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(0);
|
||||
}
|
||||
msg++;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ s32 SkelCurve_Init(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, SkelCurv
|
||||
|
||||
skelCurve->transforms = ZeldaArena_MallocDebug(sizeof(*skelCurve->transforms) * skelCurve->limbCount,
|
||||
__FILE__, __LINE__);
|
||||
ASSERT(skelCurve->transforms != NULL, "this->now_joint != NULL", __FILE__, __LINE__);
|
||||
ASSERT(skelCurve->transforms != NULL);
|
||||
skelCurve->animCurFrame = 0.0f;
|
||||
return 1;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ void func_8006D0EC(GlobalContext* globalCtx, 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);
|
||||
|
||||
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", __FILE__, __LINE__);
|
||||
ASSERT(player->rideActor != NULL);
|
||||
|
||||
Actor_MountHorse(globalCtx, player, player->rideActor);
|
||||
func_8002DE74(globalCtx, player);
|
||||
@ -70,7 +70,7 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
|
||||
} else if ((gSaveContext.entranceIndex == 1230) && (gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
Actor* horseActor =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1);
|
||||
ASSERT(horseActor != NULL, "horse_actor != NULL", __FILE__, __LINE__);
|
||||
ASSERT(horseActor != NULL);
|
||||
} else if ((globalCtx->sceneNum == gSaveContext.horseData.scene) &&
|
||||
(Flags_GetEventChkInf(0x18) != 0 || DREG(1) != 0)) {
|
||||
// "Set by existence of horse %d %d %d"
|
||||
@ -81,7 +81,7 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
|
||||
Actor* horseActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE,
|
||||
gSaveContext.horseData.pos.x, gSaveContext.horseData.pos.y,
|
||||
gSaveContext.horseData.pos.z, 0, gSaveContext.horseData.angle, 0, 1);
|
||||
ASSERT(horseActor != NULL, "horse_actor != NULL", __FILE__, __LINE__);
|
||||
ASSERT(horseActor != NULL);
|
||||
if (globalCtx->sceneNum == SCENE_SPOT12) {
|
||||
horseActor->room = -1;
|
||||
}
|
||||
@ -95,7 +95,7 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
|
||||
} else if ((globalCtx->sceneNum == SCENE_SPOT20) && !Flags_GetEventChkInf(0x18) && (DREG(1) == 0)) {
|
||||
Actor* horseActor =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1);
|
||||
ASSERT(horseActor != NULL, "horse_actor != NULL", __FILE__, __LINE__);
|
||||
ASSERT(horseActor != NULL);
|
||||
} else if (Flags_GetEventChkInf(0x18) || (DREG(1) != 0)) {
|
||||
for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
|
||||
HorseSpawn* horseSpawn = &horseSpawns[i];
|
||||
@ -103,7 +103,7 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
|
||||
Actor* horseActor =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, horseSpawn->pos.x, horseSpawn->pos.y,
|
||||
horseSpawn->pos.z, 0, horseSpawn->angle, 0, horseSpawn->type);
|
||||
ASSERT(horseActor != NULL, "horse_actor != NULL", __FILE__, __LINE__);
|
||||
ASSERT(horseActor != NULL);
|
||||
if (globalCtx->sceneNum == SCENE_SPOT12) {
|
||||
horseActor->room = -1;
|
||||
}
|
||||
@ -153,7 +153,7 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
|
||||
|
||||
player->rideActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, spawnPos.x, spawnPos.y,
|
||||
spawnPos.z, 0, player->actor.world.rot.y, 0, 7);
|
||||
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", __FILE__, __LINE__);
|
||||
ASSERT(player->rideActor != NULL);
|
||||
|
||||
Actor_MountHorse(globalCtx, player, player->rideActor);
|
||||
func_8002DE74(globalCtx, player);
|
||||
@ -162,7 +162,7 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
|
||||
(Flags_GetEventChkInf(0x18) == 0) && (DREG(1) == 0)) {
|
||||
player->rideActor =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5);
|
||||
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", __FILE__, __LINE__);
|
||||
ASSERT(player->rideActor != NULL);
|
||||
|
||||
Actor_MountHorse(globalCtx, player, player->rideActor);
|
||||
func_8002DE74(globalCtx, player);
|
||||
@ -192,7 +192,7 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
|
||||
player->rideActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, 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);
|
||||
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", __FILE__, __LINE__);
|
||||
ASSERT(player->rideActor != NULL);
|
||||
|
||||
Actor_MountHorse(globalCtx, player, player->rideActor);
|
||||
func_8002DE74(globalCtx, player);
|
||||
@ -207,7 +207,7 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
|
||||
player->rideActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, 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);
|
||||
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", __FILE__, __LINE__);
|
||||
ASSERT(player->rideActor != NULL);
|
||||
|
||||
player->actor.world.pos.x = D_8011F9B8[i].pos.x;
|
||||
player->actor.world.pos.y = D_8011F9B8[i].pos.y;
|
||||
|
@ -250,8 +250,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), "worksize >= sizeof(JPEGWork) + MB_SIZE * (PROC_OF_MBS - 1)", __FILE__,
|
||||
__LINE__);
|
||||
ASSERT(workSize >= sizeof(JpegWork));
|
||||
|
||||
osCreateMesgQueue(&ctx.mq, &ctx.msg, 1);
|
||||
MsgEvent_SendNullTask();
|
||||
|
@ -520,7 +520,7 @@ void Map_Init(GlobalContext* globalCtx) {
|
||||
// "MAP texture initialization scene_data_ID=%d mapSegment=%x"
|
||||
osSyncPrintf("\n\n\nMAP テクスチャ初期化 scene_data_ID=%d\nmapSegment=%x\n\n", globalCtx->sceneNum,
|
||||
interfaceCtx->mapSegment, globalCtx);
|
||||
ASSERT(interfaceCtx->mapSegment != NULL, "parameter->mapSegment != NULL", __FILE__, __LINE__);
|
||||
ASSERT(interfaceCtx->mapSegment != NULL);
|
||||
|
||||
switch (globalCtx->sceneNum) {
|
||||
case SCENE_SPOT00:
|
||||
|
@ -28,7 +28,7 @@ void func_800BC450(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_800BC490(GlobalContext* globalCtx, s16 point) {
|
||||
ASSERT(point == 1 || point == 2, "point == 1 || point == 2", __FILE__, __LINE__);
|
||||
ASSERT(point == 1 || point == 2);
|
||||
|
||||
globalCtx->unk_1242B = point;
|
||||
|
||||
|
@ -852,7 +852,7 @@ Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far) {
|
||||
far++;
|
||||
}
|
||||
|
||||
ASSERT(near != far, "n != f", __FILE__, __LINE__);
|
||||
ASSERT(near != far);
|
||||
|
||||
gDPSetFogColor(gfx++, r, g, b, a);
|
||||
|
||||
@ -873,7 +873,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, "n != f", __FILE__, __LINE__);
|
||||
ASSERT(near != far);
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetFogColor(gfx++, r, g, b, a);
|
||||
|
@ -118,7 +118,7 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) {
|
||||
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon2->start);
|
||||
spA4 = spB8;
|
||||
|
||||
ASSERT(polygon2->num <= SHAPE_SORT_MAX, "polygon2->num <= SHAPE_SORT_MAX", __FILE__, __LINE__);
|
||||
ASSERT(polygon2->num <= SHAPE_SORT_MAX);
|
||||
sp78 = polygonDlist;
|
||||
|
||||
for (sp9C = 0; sp9C < polygon2->num; sp9C++, polygonDlist++) {
|
||||
@ -579,7 +579,7 @@ s32 func_8009728C(GlobalContext* globalCtx, RoomContext* roomCtx, s32 roomNum) {
|
||||
roomCtx->curRoom.segment = NULL;
|
||||
roomCtx->status = 1;
|
||||
|
||||
ASSERT(roomNum < globalCtx->numRooms, "read_room_ID < game_play->room_rom_address.num", __FILE__, __LINE__);
|
||||
ASSERT(roomNum < globalCtx->numRooms);
|
||||
|
||||
size = globalCtx->roomList[roomNum].vromEnd - globalCtx->roomList[roomNum].vromStart;
|
||||
roomCtx->unk_34 = (void*)ALIGN16((intptr_t)roomCtx->bufPtrs[roomCtx->unk_30] - ((size + 8) * roomCtx->unk_30 + 7));
|
||||
@ -622,8 +622,7 @@ void Room_Draw(GlobalContext* globalCtx, Room* room, u32 flags) {
|
||||
if (room->segment != NULL)
|
||||
{
|
||||
gSegments[3] = VIRTUAL_TO_PHYSICAL(room->segment);
|
||||
ASSERT(room->mesh->polygon.type < ARRAY_COUNTU(sRoomDrawHandlers),
|
||||
"this->ground_shape->polygon.type < number(Room_Draw_Proc)", __FILE__, __LINE__);
|
||||
ASSERT(room->mesh->polygon.type < ARRAY_COUNTU(sRoomDrawHandlers));
|
||||
sRoomDrawHandlers[room->mesh->polygon.type](globalCtx, room, flags);
|
||||
}
|
||||
}
|
||||
|
@ -15,9 +15,7 @@ s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId) {
|
||||
objectCtx->spaceEnd);
|
||||
|
||||
ASSERT(((objectCtx->num < OBJECT_EXCHANGE_BANK_MAX) &&
|
||||
(((uintptr_t)objectCtx->status[objectCtx->num].segment + size) < (uintptr_t)objectCtx->spaceEnd)),
|
||||
"this->num < OBJECT_EXCHANGE_BANK_MAX && (this->status[this->num].Segment + size) < this->endSegment",
|
||||
__FILE__, __LINE__);
|
||||
(((uintptr_t)objectCtx->status[objectCtx->num].segment + size) < (uintptr_t)objectCtx->spaceEnd)));
|
||||
|
||||
DmaMgr_SendRequest1(objectCtx->status[objectCtx->num].segment, gObjectTable[objectId].vromStart, size,
|
||||
__FILE__, __LINE__);
|
||||
@ -153,9 +151,8 @@ void* func_800982FC(ObjectContext* objectCtx, s32 bankIndex, s16 objectId) {
|
||||
osSyncPrintf("OBJECT EXCHANGE NO=%2d BANK=%3d SIZE=%8.3fK\n", bankIndex, objectId, size / 1024.0f);
|
||||
|
||||
nextPtr = (void*)ALIGN16((uintptr_t)status->segment + size);
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
ASSERT(nextPtr < objectCtx->spaceEnd, "nextptr < this->endSegment", __FILE__, __LINE__);
|
||||
ASSERT(nextPtr < objectCtx->spaceEnd);
|
||||
|
||||
// "Object exchange free size=%08x"
|
||||
osSyncPrintf("オブジェクト入れ替え空きサイズ=%08x\n", (uintptr_t)objectCtx->spaceEnd - (uintptr_t)nextPtr);
|
||||
@ -295,8 +292,7 @@ void func_8009899C(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
status++;
|
||||
}
|
||||
|
||||
ASSERT(cmd->objectList.num <= OBJECT_EXCHANGE_BANK_MAX, "scene_info->object_bank.num <= OBJECT_EXCHANGE_BANK_MAX",
|
||||
__FILE__, __LINE__);
|
||||
ASSERT(cmd->objectList.num <= OBJECT_EXCHANGE_BANK_MAX);
|
||||
|
||||
if (1) {}
|
||||
|
||||
|
@ -1106,7 +1106,7 @@ void SkelAnime_InitLink(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkel
|
||||
skelAnime->jointTable = ZeldaArena_MallocDebug(allocSize, __FILE__, __LINE__);
|
||||
skelAnime->morphTable = ZeldaArena_MallocDebug(allocSize, __FILE__, __LINE__);
|
||||
} else {
|
||||
ASSERT(limbBufCount == limbCount, "joint_buff_num == joint_num", __FILE__, __LINE__);
|
||||
ASSERT(limbBufCount == limbCount);
|
||||
|
||||
skelAnime->jointTable = (Vec3s*)ALIGN16((uintptr_t)jointTable);
|
||||
skelAnime->morphTable = (Vec3s*)ALIGN16((uintptr_t)morphTable);
|
||||
@ -1435,7 +1435,7 @@ s32 SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeade
|
||||
skelAnime->morphTable =
|
||||
ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->morphTable), __FILE__, __LINE__);
|
||||
} else {
|
||||
ASSERT(limbCount == skelAnime->limbCount, "joint_buff_num == this->joint_num", __FILE__, __LINE__);
|
||||
ASSERT(limbCount == skelAnime->limbCount);
|
||||
skelAnime->jointTable = jointTable;
|
||||
skelAnime->morphTable = morphTable;
|
||||
}
|
||||
@ -1471,7 +1471,7 @@ s32 SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkele
|
||||
skelAnime->morphTable =
|
||||
ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->morphTable), __FILE__, __LINE__);
|
||||
} else {
|
||||
ASSERT(limbCount == skelAnime->limbCount, "joint_buff_num == this->joint_num", __FILE__, __LINE__);
|
||||
ASSERT(limbCount == skelAnime->limbCount);
|
||||
skelAnime->jointTable = jointTable;
|
||||
skelAnime->morphTable = morphTable;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ void Skin_Init(GlobalContext* globalCtx, Skin* skin, SkeletonHeader* skeletonHea
|
||||
|
||||
skin->vtxTable = ZeldaArena_MallocDebug(limbCount * sizeof(SkinLimbVtx), __FILE__, __LINE__);
|
||||
|
||||
ASSERT(skin->vtxTable != NULL, "pskin_awb->avb_tbl != NULL", __FILE__, __LINE__);
|
||||
ASSERT(skin->vtxTable != NULL);
|
||||
|
||||
for (i = 0; i < limbCount; i++) {
|
||||
SkinLimbVtx* vtxEntry = &skin->vtxTable[i];
|
||||
@ -71,11 +71,11 @@ void Skin_Init(GlobalContext* globalCtx, Skin* skin, SkeletonHeader* skeletonHea
|
||||
|
||||
vtxEntry->buf[0] =
|
||||
ZeldaArena_MallocDebug(animatedLimbData->totalVtxCount * sizeof(Vtx), __FILE__, __LINE__);
|
||||
ASSERT(vtxEntry->buf[0] != NULL, "psavb->buf[0] != NULL", __FILE__, __LINE__);
|
||||
ASSERT(vtxEntry->buf[0] != NULL);
|
||||
|
||||
vtxEntry->buf[1] =
|
||||
ZeldaArena_MallocDebug(animatedLimbData->totalVtxCount * sizeof(Vtx), __FILE__, __LINE__);
|
||||
ASSERT(vtxEntry->buf[1] != NULL, "psavb->buf[1] != NULL", __FILE__, __LINE__);
|
||||
ASSERT(vtxEntry->buf[1] != NULL);
|
||||
|
||||
Skin_InitAnimatedLimb(globalCtx, skin, i);
|
||||
}
|
||||
|
@ -176,10 +176,10 @@ void func_800AA550(View* view) {
|
||||
lrx = view->viewport.rightX - varX;
|
||||
lry = view->viewport.bottomY - varY;
|
||||
|
||||
ASSERT(ulx >= 0, "ulx >= 0", __FILE__, __LINE__);
|
||||
ASSERT(uly >= 0, "uly >= 0", __FILE__, __LINE__);
|
||||
ASSERT(lrx <= SCREEN_WIDTH, "lrx <= SCREEN_WD", __FILE__, __LINE__);
|
||||
ASSERT(lry <= SCREEN_HEIGHT, "lry <= SCREEN_HT", __FILE__, __LINE__);
|
||||
ASSERT(ulx >= 0);
|
||||
ASSERT(uly >= 0);
|
||||
ASSERT(lrx <= SCREEN_WIDTH);
|
||||
ASSERT(lry <= SCREEN_HEIGHT);
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
|
@ -101,7 +101,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, "glistp_end <= mono_dl + DLSIZE", __FILE__, __LINE__);
|
||||
ASSERT(glistpEnd <= monoDL + DLSIZE);
|
||||
}
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
@ -131,6 +131,6 @@ void VisMono_DrawOld(VisMono* this) {
|
||||
if (!this->monoDl) {
|
||||
this->monoDl = SystemArena_MallocDebug(DLSIZE * sizeof(Gfx), __FILE__, __LINE__);
|
||||
glistpEnd = VisMono_DrawTexture(this, this->monoDl);
|
||||
ASSERT(glistpEnd <= this->monoDl + DLSIZE, "glistp_end <= this->mono_dl + DLSIZE", __FILE__, __LINE__);
|
||||
ASSERT(glistpEnd <= this->monoDl + DLSIZE);
|
||||
}
|
||||
}
|
||||
|
@ -961,24 +961,24 @@ void Skybox_Init(GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId) {
|
||||
|
||||
if (skyboxCtx->unk_140 != 0) {
|
||||
skyboxCtx->dListBuf = GameState_Alloc(state, 8 * 150 * sizeof(Gfx), __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->dListBuf != NULL, "vr_box->dpList != NULL", __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->dListBuf != NULL);
|
||||
|
||||
skyboxCtx->roomVtx = GameState_Alloc(state, 256 * sizeof(Vtx), __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->roomVtx != NULL, "vr_box->roomVtx != NULL", __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->roomVtx != NULL);
|
||||
|
||||
func_800AEFC8(skyboxCtx, skyboxId);
|
||||
} else {
|
||||
skyboxCtx->dListBuf = GameState_Alloc(state, 12 * 150 * sizeof(Gfx), __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->dListBuf != NULL, "vr_box->dpList != NULL", __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->dListBuf != NULL);
|
||||
|
||||
if (skyboxId == SKYBOX_CUTSCENE_MAP) {
|
||||
skyboxCtx->roomVtx = GameState_Alloc(state, 192 * sizeof(Vtx), __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->roomVtx != NULL, "vr_box->roomVtx != NULL", __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->roomVtx != NULL);
|
||||
|
||||
func_800AF178(skyboxCtx, 6);
|
||||
} else {
|
||||
skyboxCtx->roomVtx = GameState_Alloc(state, 160 * sizeof(Vtx), __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->roomVtx != NULL, "vr_box->roomVtx != NULL", __FILE__, __LINE__);
|
||||
ASSERT(skyboxCtx->roomVtx != NULL);
|
||||
|
||||
func_800AF178(skyboxCtx, 5);
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ void BgGndIceblock_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
sBlockPositions[1] = 14;
|
||||
} else {
|
||||
LOG_FLOAT("thisx->world.position.x", this->dyna.actor.world.pos.x);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ void Demo6K_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
osSyncPrintf("bank_ID = %d\n", objBankIndex);
|
||||
|
||||
if (objBankIndex < 0) {
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(objBankIndex < 0);
|
||||
} else {
|
||||
this->objBankIndex = objBankIndex;
|
||||
}
|
||||
@ -173,7 +173,7 @@ void Demo6K_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->unk_293 = params - 14;
|
||||
break;
|
||||
default:
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " bank_ID = %d\n" VT_RST, objectIndex);
|
||||
|
||||
if (objectIndex < 0) {
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(objectIndex < 0);
|
||||
} else {
|
||||
this->initObjectBankIndex = objectIndex;
|
||||
}
|
||||
@ -506,7 +506,7 @@ void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
break;
|
||||
|
||||
default:
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -683,7 +683,7 @@ void DemoEffect_InitTimeWarp(DemoEffect* this, GlobalContext* globalCtx) {
|
||||
s32 effectType = (this->actor.params & 0x00FF);
|
||||
|
||||
if (!SkelCurve_Init(globalCtx, &this->skelCurve, &gTimeWarpSkel, &gTimeWarpAnim)) {
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(!SkelCurve_Init(globalCtx, &this->skelCurve, &gTimeWarpSkel, &gTimeWarpAnim));
|
||||
}
|
||||
|
||||
if (effectType == DEMO_EFFECT_TIMEWARP_TIMEBLOCK_LARGE || effectType == DEMO_EFFECT_TIMEWARP_TIMEBLOCK_SMALL) {
|
||||
|
@ -186,7 +186,7 @@ void DemoKankyo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
osSyncPrintf("bank_ID = %d\n", objBankIndex);
|
||||
if (objBankIndex < 0) {
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(objBankIndex < 0);
|
||||
} else {
|
||||
this->objBankIndex = objBankIndex;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ void DemoTreLgt_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
osSyncPrintf("Demo_Tre_Lgt_Actor_ct();コンストラクト失敗\n");
|
||||
}
|
||||
|
||||
ASSERT(true, "1", __FILE__, UNK_LINE);
|
||||
ASSERT(true);
|
||||
|
||||
this->unk_170 = 255;
|
||||
this->unk_174 = 255;
|
||||
|
@ -569,7 +569,7 @@ Gfx* EnBox_EmptyDList(GraphicsContext* gfxCtx) {
|
||||
Gfx* dList;
|
||||
|
||||
dList = Graph_Alloc(gfxCtx, sizeof(Gfx));
|
||||
ASSERT(dList != NULL, "gfxp != NULL", __FILE__, __LINE__);
|
||||
ASSERT(dList != NULL);
|
||||
|
||||
dListHead = dList;
|
||||
gSPEndDisplayList(dListHead++);
|
||||
@ -583,7 +583,7 @@ Gfx* func_809CA4A0(GraphicsContext* gfxCtx) {
|
||||
Gfx* dListHead;
|
||||
|
||||
dListHead = Graph_Alloc(gfxCtx, 2 * sizeof(Gfx));
|
||||
ASSERT(dListHead != NULL, "gfxp != NULL", __FILE__, __LINE__);
|
||||
ASSERT(dListHead != NULL);
|
||||
|
||||
dList = dListHead;
|
||||
gDPSetRenderMode(dListHead++,
|
||||
@ -601,7 +601,7 @@ Gfx* func_809CA518(GraphicsContext* gfxCtx) {
|
||||
Gfx* dListHead;
|
||||
|
||||
dListHead = Graph_Alloc(gfxCtx, 2 * sizeof(Gfx));
|
||||
ASSERT(dListHead != NULL, "gfxp != NULL", __FILE__, __LINE__);
|
||||
ASSERT(dListHead != NULL);
|
||||
|
||||
dList = dListHead;
|
||||
gDPSetRenderMode(dListHead++,
|
||||
|
@ -404,7 +404,7 @@ void EnElf_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ASSERT(0, "0", __FILE__, 1103);
|
||||
ASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -798,7 +798,7 @@ void func_80A03AB0(EnElf* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->func_2C8 == NULL) {
|
||||
ASSERT(0, "0", __FILE__, 1725);
|
||||
ASSERT(this->func_2C8 == NULL);
|
||||
}
|
||||
|
||||
this->func_2C8(this, globalCtx);
|
||||
|
@ -226,7 +226,7 @@ void EnFr_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
// "The argument is wrong!!"
|
||||
osSyncPrintf("%s[%d] : 引数が間違っている!!(%d)\n", __FILE__, __LINE__, this->actor.params);
|
||||
osSyncPrintf(VT_RST);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT((this->actor.params >= 6) || (this->actor.params < 0));
|
||||
}
|
||||
|
||||
this->objBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GAMEPLAY_FIELD_KEEP);
|
||||
@ -236,7 +236,7 @@ void EnFr_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
// "There is no bank!!"
|
||||
osSyncPrintf("%s[%d] : バンクが無いよ!!\n", __FILE__, __LINE__);
|
||||
osSyncPrintf(VT_RST);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(this->objBankIndex < 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ void EnGe2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->actor.targetMode = 6;
|
||||
break;
|
||||
default:
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
this->stateFlags = 0;
|
||||
|
@ -384,7 +384,7 @@ void EnGirlA_InitItem(EnGirlA* this, GlobalContext* globalCtx) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE));
|
||||
osSyncPrintf("引数がおかしいよ(arg_data=%d)!!\n", this->actor.params);
|
||||
osSyncPrintf(VT_RST);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT((params >= SI_MAX) && (params < 0));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -395,7 +395,7 @@ void EnGirlA_InitItem(EnGirlA* this, GlobalContext* globalCtx) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE));
|
||||
osSyncPrintf("バンクが無いよ!!(%s)\n", sShopItemDescriptions[params]);
|
||||
osSyncPrintf(VT_RST);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(this->objBankIndex < 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ void EnGm_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
// "There is no model bank! !! (Medi Goron)"
|
||||
osSyncPrintf("モデル バンクが無いよ!!(中ゴロン)\n");
|
||||
osSyncPrintf(VT_RST);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(this->objGmBankIndex < 0);
|
||||
}
|
||||
|
||||
this->updateFunc = func_80A3D838;
|
||||
|
@ -62,7 +62,7 @@ void EnGuest_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
// "No such bank!!"
|
||||
osSyncPrintf("%s[%d] : バンクが無いよ!!\n", __FILE__, __LINE__);
|
||||
osSyncPrintf(VT_RST);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(this->osAnimeBankIndex < 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -869,7 +869,8 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, 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);
|
||||
if (this->rider == NULL) {
|
||||
__assert("this->race.rider != NULL", __FILE__, __LINE__);
|
||||
//__assert("this->race.rider != NULL");
|
||||
ASSERT(this->rider == NULL);
|
||||
}
|
||||
if (!(gSaveContext.eventInf[0] & 0x40)) {
|
||||
this->ingoHorseMaxSpeed = 12.07f;
|
||||
|
@ -584,7 +584,7 @@ void EnOssan_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE));
|
||||
osSyncPrintf("引数がおかしいよ(arg_data=%d)!!\n", this->actor.params);
|
||||
osSyncPrintf(VT_RST);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(this->actor.params > OSSAN_TYPE_MASK && this->actor.params < OSSAN_TYPE_KOKIRI);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -613,7 +613,7 @@ void EnOssan_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE));
|
||||
osSyncPrintf("バンクが無いよ!!(%s)\n", sShopkeeperPrintName[this->actor.params]);
|
||||
osSyncPrintf(VT_RST);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(this->objBankIndex1 < 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -622,7 +622,7 @@ void EnOssan_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE));
|
||||
osSyncPrintf("予備バンクが無いよ!!(%s)\n", sShopkeeperPrintName[this->actor.params]);
|
||||
osSyncPrintf(VT_RST);
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(EnOssan_TryGetObjBankIndexes(this, globalCtx, objectIds) == 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -964,7 +964,7 @@ void func_80ACC00C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
this->actor.draw = NULL;
|
||||
break;
|
||||
default:
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -788,7 +788,7 @@ void EnRr_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
if (this->hasPlayer == 0x3F80) { // checks if 1.0f has been stored to hasPlayer's address
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(this->hasPlayer == 0x3F80);
|
||||
}
|
||||
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.1f);
|
||||
|
@ -128,7 +128,7 @@ void EnSth_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
osSyncPrintf("bank_ID = %d\n", objectBankIdx);
|
||||
if (objectBankIdx < 0) {
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(objectBankIdx < 0);
|
||||
}
|
||||
this->objectBankIdx = objectBankIdx;
|
||||
this->drawFunc = EnSth_Draw;
|
||||
|
@ -114,7 +114,7 @@ void EnTr_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
break;
|
||||
|
||||
default:
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -169,10 +169,10 @@ void EnViewer_InitImpl(EnViewer* this, GlobalContext* globalCtx) {
|
||||
EnViewerInitData* initData = &sInitData[this->actor.params >> 8];
|
||||
s32 skelObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, initData->skeletonObject);
|
||||
|
||||
ASSERT(skelObjBankIndex >= 0, "bank_ID >= 0", __FILE__, __LINE__);
|
||||
ASSERT(skelObjBankIndex >= 0);
|
||||
|
||||
this->animObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, initData->animObject);
|
||||
ASSERT(this->animObjBankIndex >= 0, "this->anime_bank_ID >= 0", __FILE__, __LINE__);
|
||||
ASSERT(this->animObjBankIndex >= 0);
|
||||
|
||||
if (!Object_IsLoaded(&globalCtx->objectCtx, skelObjBankIndex) ||
|
||||
!Object_IsLoaded(&globalCtx->objectCtx, this->animObjBankIndex)) {
|
||||
|
@ -68,7 +68,7 @@ void ItemEtcetera_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
objBankIndex = Object_GetIndex(&globalCtx->objectCtx, sObjectIds[type]);
|
||||
osSyncPrintf("bank_ID = %d\n", objBankIndex);
|
||||
if (objBankIndex < 0) {
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(objBankIndex < 0);
|
||||
} else {
|
||||
this->objBankIndex = objBankIndex;
|
||||
}
|
||||
|
@ -771,7 +771,7 @@ void ObjectKankyo_SunGraveSparkInit(ObjectKankyo* this, GlobalContext* globalCtx
|
||||
s32 objBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_SPOT02_OBJECTS);
|
||||
|
||||
if (objBankIndex < 0) {
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(objBankIndex < 0);
|
||||
} else {
|
||||
this->requiredObjBankIndex = objBankIndex;
|
||||
}
|
||||
@ -872,7 +872,7 @@ void ObjectKankyo_InitBeams(ObjectKankyo* this, GlobalContext* globalCtx) {
|
||||
s32 objectIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_DEMO_KEKKAI);
|
||||
|
||||
if (objectIndex < 0) {
|
||||
ASSERT(0, "0", __FILE__, __LINE__);
|
||||
ASSERT(objectIndex < 0);
|
||||
} else {
|
||||
this->requiredObjBankIndex = objectIndex;
|
||||
}
|
||||
|
@ -4901,7 +4901,7 @@ void func_8083AE40(Player* this, s16 objectId) {
|
||||
size = gObjectTable[objectId].vromEnd - gObjectTable[objectId].vromStart;
|
||||
|
||||
LOG_HEX("size", size);
|
||||
ASSERT(size <= 1024 * 8, "size <= 1024 * 8", __FILE__, __LINE__);
|
||||
ASSERT(size <= 1024 * 8);
|
||||
|
||||
DmaMgr_SendRequest2(&this->giObjectDmaRequest, (uintptr_t)this->giObjectSegment, gObjectTable[objectId].vromStart,
|
||||
size, 0, &this->giObjectLoadQueue, OS_MESG_PTR(NULL), __FILE__, __LINE__);
|
||||
|
@ -1954,12 +1954,12 @@ void FileChoose_Init(GameState* thisx) {
|
||||
osSyncPrintf("SIZE=%x\n", size);
|
||||
|
||||
this->staticSegment = GameState_Alloc(&this->state, size, __FILE__, __LINE__);
|
||||
ASSERT(this->staticSegment != NULL, "this->staticSegment != NULL", __FILE__, __LINE__);
|
||||
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(&this->state, size, __FILE__, __LINE__);
|
||||
ASSERT(this->parameterSegment != NULL, "this->parameterSegment != NULL", __FILE__, __LINE__);
|
||||
ASSERT(this->parameterSegment != NULL);
|
||||
DmaMgr_SendRequest1(this->parameterSegment, (u32)_parameter_staticSegmentRomStart, size, __FILE__,
|
||||
__LINE__);
|
||||
|
||||
|
@ -333,7 +333,7 @@ void Title_Init(GameState* thisx) {
|
||||
|
||||
//this->staticSegment = GameState_Alloc(&this->state, size, __FILE__, __LINE__);
|
||||
osSyncPrintf("z_title.c\n");
|
||||
//ASSERT(this->staticSegment != NULL, "this->staticSegment != NULL", __FILE__, __LINE__);
|
||||
//ASSERT(this->staticSegment != NULL);
|
||||
|
||||
//ResourceMgr_CacheDirectory("nintendo_rogo_static*");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user