1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 22:44:30 +00:00

Cleanup unnecessary &'s on function/array pointers (#1031)

This commit is contained in:
Roman971 2021-11-28 11:47:55 +01:00 committed by GitHub
parent 6efb590699
commit d241bfb7ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 106 additions and 107 deletions

View file

@ -1038,18 +1038,18 @@ void Fault_Init(void) {
sFaultStructPtr = &gFaultStruct;
bzero(sFaultStructPtr, sizeof(FaultThreadStruct));
FaultDrawer_SetDefault();
FaultDrawer_SetInputCallback(&Fault_WaitForInput);
FaultDrawer_SetInputCallback(Fault_WaitForInput);
sFaultStructPtr->exitDebugger = false;
sFaultStructPtr->msgId = 0;
sFaultStructPtr->faultHandlerEnabled = false;
sFaultStructPtr->faultedThread = NULL;
sFaultStructPtr->padCallback = &Fault_PadCallback;
sFaultStructPtr->padCallback = Fault_PadCallback;
sFaultStructPtr->clients = NULL;
sFaultStructPtr->faultActive = false;
gFaultStruct.faultHandlerEnabled = true;
osCreateMesgQueue(&sFaultStructPtr->queue, &sFaultStructPtr->msg, 1);
StackCheck_Init(&sFaultThreadInfo, &sFaultStack, sFaultStack + sizeof(sFaultStack), 0, 0x100, "fault");
osCreateThread(&sFaultStructPtr->thread, 2, &Fault_ThreadEntry, 0, sFaultStack + sizeof(sFaultStack),
osCreateThread(&sFaultStructPtr->thread, 2, Fault_ThreadEntry, 0, sFaultStack + sizeof(sFaultStack),
OS_PRIORITY_APPMAX);
osStartThread(&sFaultStructPtr->thread);
}
@ -1067,7 +1067,7 @@ void Fault_AddHungupAndCrashImpl(const char* arg0, const char* arg1) {
FaultClient client;
s32 pad;
Fault_AddClient(&client, &Fault_HangupFaultClient, (void*)arg0, (void*)arg1);
Fault_AddClient(&client, Fault_HangupFaultClient, (void*)arg0, (void*)arg1);
*(u32*)0x11111111 = 0; // trigger an exception
}

View file

@ -418,7 +418,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
// "Other initialization processing time %d us"
osSyncPrintf("その他初期化 処理時間 %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
Fault_AddClient(&sGameFaultClient, &GameState_FaultPrint, NULL, NULL);
Fault_AddClient(&sGameFaultClient, GameState_FaultPrint, NULL, NULL);
osSyncPrintf("game コンストラクタ終了\n"); // "game constructor end"
}

View file

@ -402,7 +402,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, &gZTargetArrowDL);
gSPDisplayList(POLY_XLU_DISP++, gZTargetArrowDL);
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2158);
@ -3447,7 +3447,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx)
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8149),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, &gCircleShadowDL);
gSPDisplayList(POLY_OPA_DISP++, gCircleShadowDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8155);
}

View file

@ -83,7 +83,7 @@ void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, GlobalCo
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_debug_display.c", 189),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, &gDebugSpriteDL);
gSPDisplayList(POLY_XLU_DISP++, gDebugSpriteDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_debug_display.c", 192);
}

View file

@ -1023,7 +1023,7 @@ void EnItem00_DrawRupee(EnItem00* this, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTex[texIndex]));
gSPDisplayList(POLY_OPA_DISP++, &gRupeeDL);
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1568);
}
@ -1067,13 +1067,13 @@ void EnItem00_DrawHeartContainer(EnItem00* this, GlobalContext* globalCtx) {
func_8002EBCC(&this->actor, globalCtx, 0);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1634),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, &gHeartPieceExteriorDL);
gSPDisplayList(POLY_OPA_DISP++, gHeartPieceExteriorDL);
func_80093D84(globalCtx->state.gfxCtx);
func_8002ED80(&this->actor, globalCtx, 0);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1644),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, &gHeartContainerInteriorDL);
gSPDisplayList(POLY_XLU_DISP++, gHeartContainerInteriorDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1647);
}
@ -1090,7 +1090,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, GlobalContext* globalCtx) {
func_8002ED80(&this->actor, globalCtx, 0);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_item00.c", 1670),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, &gHeartPieceInteriorDL);
gSPDisplayList(POLY_XLU_DISP++, gHeartPieceInteriorDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_item00.c", 1673);
}

View file

@ -69,7 +69,7 @@ void Moji_DrawChar(GraphicsContext* gfxCtx, char c) {
}
if (sCurTLUTIndex != GET_CHAR_TLUT_INDEX(c)) {
gDPLoadTLUT(POLY_OPA_DISP++, 16, 256, &gMojiFontTLUTs[GET_CHAR_TLUT_INDEX(c)]);
gDPLoadTLUT(POLY_OPA_DISP++, 16, 256, gMojiFontTLUTs[GET_CHAR_TLUT_INDEX(c)]);
sCurTLUTIndex = GET_CHAR_TLUT_INDEX(c);
}
gSPTextureRectangle(POLY_OPA_DISP++, sScreenPosX << 2, sScreenPosY << 2, (sScreenPosX + DISP_CHAR_WIDTH) << 2,

View file

@ -381,7 +381,7 @@ void Sram_OpenSave(SramContext* sramCtx) {
osSyncPrintf(VT_FGCOL(BLUE));
osSyncPrintf("\n====================================================================\n");
MemCopy(gScarecrowCustomSongPtr, &gSaveContext.scarecrowCustomSong, sizeof(gSaveContext.scarecrowCustomSong));
MemCopy(gScarecrowCustomSongPtr, gSaveContext.scarecrowCustomSong, sizeof(gSaveContext.scarecrowCustomSong));
ptr = (u8*)gScarecrowCustomSongPtr;
for (i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowCustomSong); i++, ptr++) {
@ -396,7 +396,7 @@ void Sram_OpenSave(SramContext* sramCtx) {
osSyncPrintf(VT_FGCOL(GREEN));
osSyncPrintf("\n====================================================================\n");
MemCopy(gScarecrowSpawnSongPtr, &gSaveContext.scarecrowSpawnSong, sizeof(gSaveContext.scarecrowSpawnSong));
MemCopy(gScarecrowSpawnSongPtr, gSaveContext.scarecrowSpawnSong, sizeof(gSaveContext.scarecrowSpawnSong));
ptr = gScarecrowSpawnSongPtr;
for (i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowSpawnSong); i++, ptr++) {