1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-10 19:20:13 +00:00

Run formatter (#1139)

This commit is contained in:
Dragorn421 2022-02-13 00:29:48 +01:00 committed by GitHub
parent 8926b08582
commit ed0daabf98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 33 additions and 33 deletions

View file

@ -24,7 +24,6 @@ void bootproc(void) {
Locale_Init(); Locale_Init();
StackCheck_Init(&sIdleThreadInfo, sIdleThreadStack, STACK_TOP(sIdleThreadStack), 0, 256, "idle"); StackCheck_Init(&sIdleThreadInfo, sIdleThreadStack, STACK_TOP(sIdleThreadStack), 0, 256, "idle");
osCreateThread(&sIdleThread, 1, Idle_ThreadEntry, NULL, STACK_TOP(sIdleThreadStack), osCreateThread(&sIdleThread, 1, Idle_ThreadEntry, NULL, STACK_TOP(sIdleThreadStack), Z_PRIORITY_MAIN);
Z_PRIORITY_MAIN);
osStartThread(&sIdleThread); osStartThread(&sIdleThread);
} }

View file

@ -1265,8 +1265,7 @@ void Fault_Init(void) {
gFaultMgr.faultHandlerEnabled = true; gFaultMgr.faultHandlerEnabled = true;
osCreateMesgQueue(&sFaultInstance->queue, &sFaultInstance->msg, 1); osCreateMesgQueue(&sFaultInstance->queue, &sFaultInstance->msg, 1);
StackCheck_Init(&sFaultThreadInfo, &sFaultStack, STACK_TOP(sFaultStack), 0, 0x100, "fault"); StackCheck_Init(&sFaultThreadInfo, &sFaultStack, STACK_TOP(sFaultStack), 0, 0x100, "fault");
osCreateThread(&sFaultInstance->thread, 2, Fault_ThreadEntry, 0, STACK_TOP(sFaultStack), osCreateThread(&sFaultInstance->thread, 2, Fault_ThreadEntry, 0, STACK_TOP(sFaultStack), OS_PRIORITY_APPMAX);
OS_PRIORITY_APPMAX);
osStartThread(&sFaultInstance->thread); osStartThread(&sFaultInstance->thread);
} }

View file

@ -470,7 +470,8 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Gl
if ((actorArg != NULL) && (targetCtx->unk_4B == 0)) { if ((actorArg != NULL) && (targetCtx->unk_4B == 0)) {
Actor_ProjectPos(globalCtx, &actorArg->focus.pos, &projectedFocusPos, &cappedInvWDest); Actor_ProjectPos(globalCtx, &actorArg->focus.pos, &projectedFocusPos, &cappedInvWDest);
if (((projectedFocusPos.z <= 0.0f) || (1.0f <= fabsf(projectedFocusPos.x * cappedInvWDest))) || (1.0f <= fabsf(projectedFocusPos.y * cappedInvWDest))) { if (((projectedFocusPos.z <= 0.0f) || (1.0f <= fabsf(projectedFocusPos.x * cappedInvWDest))) ||
(1.0f <= fabsf(projectedFocusPos.y * cappedInvWDest))) {
actorArg = NULL; actorArg = NULL;
} }
} }
@ -728,23 +729,23 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
(u8)titleCtx->alpha); (u8)titleCtx->alpha);
gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA, G_IM_SIZ_8b,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOLOD); G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1, G_TX_RENDERTILE, gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1,
0, 0, 1 << 10, 1 << 10); G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
height = titleCtx->height - height; height = titleCtx->height - height;
// If texture is bigger than 0x1000, display the rest // If texture is bigger than 0x1000, display the rest
if (height > 0) { if (height > 0) {
gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + textureLanguageOffset + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, width, gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + textureLanguageOffset + 0x1000, G_IM_FMT_IA,
height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOLOD, G_TX_NOLOD); G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4, titleSecondY + (height * 4) - 1, gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
} }
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2880); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2880);

View file

@ -452,8 +452,10 @@ void HealthMeter_Draw(GlobalContext* globalCtx) {
heartTexCoordPerPixel *= 1 << 10; heartTexCoordPerPixel *= 1 << 10;
halfHeartLength = 8.0f; halfHeartLength = 8.0f;
halfHeartLength *= 0.68f; halfHeartLength *= 0.68f;
gSPTextureRectangle(OVERLAY_DISP++, (s32)((heartCenterX - halfHeartLength) * 4), (s32)((heartCenterY - halfHeartLength) * 4), gSPTextureRectangle(OVERLAY_DISP++, (s32)((heartCenterX - halfHeartLength) * 4),
(s32)((heartCenterX + halfHeartLength) * 4), (s32)((heartCenterY + halfHeartLength) * 4), G_TX_RENDERTILE, 0, 0, (s32)((heartCenterY - halfHeartLength) * 4),
(s32)((heartCenterX + halfHeartLength) * 4),
(s32)((heartCenterY + halfHeartLength) * 4), G_TX_RENDERTILE, 0, 0,
(s32)heartTexCoordPerPixel, (s32)heartTexCoordPerPixel); (s32)heartTexCoordPerPixel, (s32)heartTexCoordPerPixel);
} else { } else {
if ((ddHeartCountMinusOne < 0) || (heartIndex > ddHeartCountMinusOne)) { if ((ddHeartCountMinusOne < 0) || (heartIndex > ddHeartCountMinusOne)) {
@ -474,8 +476,9 @@ void HealthMeter_Draw(GlobalContext* globalCtx) {
{ {
Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx)); Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx));
Matrix_SetTranslateScaleMtx2(matrix, 1.0f - (0.32f * beatingHeartPulsingSize), 1.0f - (0.32f * beatingHeartPulsingSize), 1.0f - (0.32f * beatingHeartPulsingSize), Matrix_SetTranslateScaleMtx2(
-130.0f + offsetX, 94.5f - offsetY, 0.0f); matrix, 1.0f - (0.32f * beatingHeartPulsingSize), 1.0f - (0.32f * beatingHeartPulsingSize),
1.0f - (0.32f * beatingHeartPulsingSize), -130.0f + offsetX, 94.5f - offsetY, 0.0f);
gSPMatrix(OVERLAY_DISP++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(OVERLAY_DISP++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPVertex(OVERLAY_DISP++, beatingHeartVtx, 4, 0); gSPVertex(OVERLAY_DISP++, beatingHeartVtx, 4, 0);
gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0); gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0);

View file

@ -63,10 +63,10 @@ void MapMark_Init(GlobalContext* globalCtx) {
Overlay_Load(overlay->vromStart, overlay->vromEnd, overlay->vramStart, overlay->vramEnd, overlay->loadedRamAddr); Overlay_Load(overlay->vromStart, overlay->vromEnd, overlay->vramStart, overlay->vramEnd, overlay->loadedRamAddr);
sLoadedMarkDataTable = gMapMarkDataTable; sLoadedMarkDataTable = gMapMarkDataTable;
sLoadedMarkDataTable = (void*)(u32)((overlay->vramTable != NULL) sLoadedMarkDataTable = (void*)(u32)(
? (void*)((u32)overlay->vramTable - (overlay->vramTable != NULL)
(s32)((u32)overlay->vramStart - (u32)overlay->loadedRamAddr)) ? (void*)((u32)overlay->vramTable - (s32)((u32)overlay->vramStart - (u32)overlay->loadedRamAddr))
: NULL); : NULL);
} }
void MapMark_ClearPointers(GlobalContext* globalCtx) { void MapMark_ClearPointers(GlobalContext* globalCtx) {

View file

@ -155,7 +155,8 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
// "Identification Completed!" // "Identification Completed!"
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n" VT_RST, this->type); osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n" VT_RST, this->type);
// "Message completed!" // "Message completed!"
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, (this->actor.params >> 8) & 0xF); osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST,
(this->actor.params >> 8) & 0xF);
} }
} }

View file

@ -61,12 +61,8 @@ static s16 sObjectIds[6] = {
}; };
static FlexSkeletonHeader* sSkeletons[6] = { static FlexSkeletonHeader* sSkeletons[6] = {
&object_ahg_Skel_0000F0, &object_ahg_Skel_0000F0, &object_boj_Skel_0000F0, &object_boj_Skel_0000F0,
&object_boj_Skel_0000F0, &object_boj_Skel_0000F0, &object_boj_Skel_0000F0, &object_boj_Skel_0000F0,
&object_boj_Skel_0000F0,
&object_boj_Skel_0000F0,
&object_boj_Skel_0000F0,
&object_boj_Skel_0000F0,
}; };
static AnimationHeader* sAnimations[6] = { static AnimationHeader* sAnimations[6] = {

View file

@ -186,7 +186,8 @@ void func_80B3A3D4(EnWonderTalk2* this, GlobalContext* globalCtx) {
if ((this->switchFlag >= 0) && (this->talkMode != 4)) { if ((this->switchFlag >= 0) && (this->talkMode != 4)) {
Flags_SetSwitch(globalCtx, this->switchFlag); Flags_SetSwitch(globalCtx, this->switchFlag);
// "(Forced) I saved it! All of it!" // "(Forced) I saved it! All of it!"
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ (強制)セーブしたよ!おもいっきり! %x\n" VT_RST, this->switchFlag); osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ (強制)セーブしたよ!おもいっきり! %x\n" VT_RST,
this->switchFlag);
} }
if (this->talkMode == 4) { if (this->talkMode == 4) {

View file

@ -344,8 +344,8 @@ s16 ObjOshihiki_GetHighestFloor(ObjOshihiki* this) {
for (i = 1; i < ARRAY_COUNT(this->floorHeights); i++) { for (i = 1; i < ARRAY_COUNT(this->floorHeights); i++) {
if (this->floorHeights[i] > this->floorHeights[highestFloor]) { if (this->floorHeights[i] > this->floorHeights[highestFloor]) {
highestFloor = i; highestFloor = i;
} else if ((this->floorBgIds[i] == BGCHECK_SCENE) && } else if ((this->floorBgIds[i] == BGCHECK_SCENE) &&
((this->floorHeights[i] - this->floorHeights[highestFloor]) > -0.001f)) { ((this->floorHeights[i] - this->floorHeights[highestFloor]) > -0.001f)) {
highestFloor = i; highestFloor = i;
} }
} }