summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2023-07-27 09:15:40 -0700
committerGitHub <noreply@github.com>2023-07-27 12:15:40 -0400
commiteb6b837d65ba1c7ca949c19a199c4c83e296ca5f (patch)
treea7d091f20f31764fe347014bcf1b8ebbcb453f22 /src
parent9e85f5545a290c0bc113ba9b8a12bb7c56130e59 (diff)
Clang-Format 14 (#1321)
* format * Update dockerfile and other documentation * Update mac instructions
Diffstat (limited to 'src')
-rw-r--r--src/code/z_DLF.c100
-rw-r--r--src/code/z_actor.c10
-rw-r--r--src/code/z_effect_soft_sprite.c10
-rw-r--r--src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c8
4 files changed, 64 insertions, 64 deletions
diff --git a/src/code/z_DLF.c b/src/code/z_DLF.c
index 036777d49..cb226b30c 100644
--- a/src/code/z_DLF.c
+++ b/src/code/z_DLF.c
@@ -17,35 +17,35 @@ void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
(uintptr_t)vramStart, (uintptr_t)overlayEntry->vramEnd);
if (overlayEntry->loadedRamAddr != NULL) {
- overlayEntry->unk_14 = (uintptr_t)(
- (overlayEntry->unk_14 != NULL)
- ? (void*)((uintptr_t)overlayEntry->unk_14 -
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->unk_14 = (void*)(uintptr_t)((overlayEntry->unk_14 != NULL)
+ ? (void*)((uintptr_t)overlayEntry->unk_14 -
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
- overlayEntry->init = (uintptr_t)(
- (overlayEntry->init != NULL)
- ? (void*)((uintptr_t)overlayEntry->init -
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->init = (void*)(uintptr_t)((overlayEntry->init != NULL)
+ ? (void*)((uintptr_t)overlayEntry->init -
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
- overlayEntry->destroy = (uintptr_t)(
- (overlayEntry->destroy != NULL)
- ? (void*)((uintptr_t)overlayEntry->destroy -
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->destroy = (void*)(uintptr_t)((overlayEntry->destroy != NULL)
+ ? (void*)((uintptr_t)overlayEntry->destroy -
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
- overlayEntry->unk_20 = (uintptr_t)(
- (overlayEntry->unk_20 != NULL)
- ? (void*)((uintptr_t)overlayEntry->unk_20 -
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->unk_20 = (void*)(uintptr_t)((overlayEntry->unk_20 != NULL)
+ ? (void*)((uintptr_t)overlayEntry->unk_20 -
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
- overlayEntry->unk_24 = (uintptr_t)(
- (overlayEntry->unk_24 != NULL)
- ? (void*)((uintptr_t)overlayEntry->unk_24 -
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->unk_24 = (void*)(uintptr_t)((overlayEntry->unk_24 != NULL)
+ ? (void*)((uintptr_t)overlayEntry->unk_24 -
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
overlayEntry->unk_28 = 0;
}
@@ -57,35 +57,35 @@ void Overlay_FreeGameState(GameStateOverlay* overlayEntry) {
if (overlayEntry->loadedRamAddr != NULL) {
var_v0 = (overlayEntry->unk_28 != 0) ? -1 : 0;
if (var_v0 == 0) {
- overlayEntry->unk_14 = (uintptr_t)(
- (overlayEntry->unk_14 != NULL)
- ? (void*)((uintptr_t)overlayEntry->unk_14 +
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->unk_14 = (void*)(uintptr_t)((overlayEntry->unk_14 != NULL)
+ ? (void*)((uintptr_t)overlayEntry->unk_14 +
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
- overlayEntry->init = (uintptr_t)(
- (overlayEntry->init != NULL)
- ? (void*)((uintptr_t)overlayEntry->init +
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->init = (void*)(uintptr_t)((overlayEntry->init != NULL)
+ ? (void*)((uintptr_t)overlayEntry->init +
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
- overlayEntry->destroy = (uintptr_t)(
- (overlayEntry->destroy != NULL)
- ? (void*)((uintptr_t)overlayEntry->destroy +
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->destroy = (uintptr_t)((overlayEntry->destroy != NULL)
+ ? (void*)((uintptr_t)overlayEntry->destroy +
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
- overlayEntry->unk_20 = (uintptr_t)(
- (overlayEntry->unk_20 != NULL)
- ? (void*)((uintptr_t)overlayEntry->unk_20 +
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->unk_20 = (void*)(uintptr_t)((overlayEntry->unk_20 != NULL)
+ ? (void*)((uintptr_t)overlayEntry->unk_20 +
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
- overlayEntry->unk_24 = (uintptr_t)(
- (overlayEntry->unk_24 != NULL)
- ? (void*)((uintptr_t)overlayEntry->unk_24 +
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ overlayEntry->unk_24 = (void*)(uintptr_t)((overlayEntry->unk_24 != NULL)
+ ? (void*)((uintptr_t)overlayEntry->unk_24 +
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
SystemArena_Free(overlayEntry->loadedRamAddr);
overlayEntry->loadedRamAddr = NULL;
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 0d72410ad..a85c2f31b 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -3190,11 +3190,11 @@ ActorInit* Actor_LoadOverlay(ActorContext* actorCtx, s16 index) {
overlayEntry->numLoaded = 0;
}
- actorInit = (uintptr_t)(
- (overlayEntry->initInfo != NULL)
- ? (void*)((uintptr_t)overlayEntry->initInfo -
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ actorInit = (void*)(uintptr_t)((overlayEntry->initInfo != NULL)
+ ? (void*)((uintptr_t)overlayEntry->initInfo -
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
}
return actorInit;
diff --git a/src/code/z_effect_soft_sprite.c b/src/code/z_effect_soft_sprite.c
index 0c247998e..870132a07 100644
--- a/src/code/z_effect_soft_sprite.c
+++ b/src/code/z_effect_soft_sprite.c
@@ -189,11 +189,11 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initData) {
overlayEntry->loadedRamAddr);
}
- initInfo = (uintptr_t)(
- (overlayEntry->initInfo != NULL)
- ? (void*)((uintptr_t)overlayEntry->initInfo -
- (intptr_t)((uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr))
- : NULL);
+ initInfo = (void*)(uintptr_t)((overlayEntry->initInfo != NULL)
+ ? (void*)((uintptr_t)overlayEntry->initInfo -
+ (intptr_t)((uintptr_t)overlayEntry->vramStart -
+ (uintptr_t)overlayEntry->loadedRamAddr))
+ : NULL);
}
if (initInfo->init != NULL) {
diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c
index 43a48f2b2..59e3a09e9 100644
--- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c
+++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c
@@ -1741,10 +1741,10 @@ void EnBigslime_WindupThrowPlayer(EnBigslime* this, PlayState* play) {
// loop over x, y, z
for (j = 0; j < 3; j++) {
// Linearly interpolate dynamicVtx --> staticVtx * (1 - scale * vtxSurfacePerturbation)
- dynamicVtx->n.ob[j] += (s16)(
- ((staticVtx->n.ob[j] - (s32)(scale * staticVtx->n.ob[j] * this->vtxSurfacePerturbation[i])) -
- dynamicVtx->n.ob[j]) *
- invWindupPunchTimer);
+ dynamicVtx->n.ob[j] += (s16)(((staticVtx->n.ob[j] - (s32)(scale * staticVtx->n.ob[j] *
+ this->vtxSurfacePerturbation[i])) -
+ dynamicVtx->n.ob[j]) *
+ invWindupPunchTimer);
}
} else {
// loop over x, y, z