diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2023-03-21 07:12:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-21 11:12:22 -0300 |
| commit | 9bb978527f619abbedbc5119fa2811385b29c01e (patch) | |
| tree | a56cf583e70983d8b336b112240c2b72189a768e /include | |
| parent | 6d1bc6e34b9a1bf17e90c677379fa5c27d2fec4b (diff) | |
Misc Cleanup 14 (#1214)
* bgId
* z64scene.h whitespace
* SubS_ComputeTrackPointRot casts
* Macros cleanup
* ifs
* Empty Loops
* Lights_FindBufSlot void
* SkelAnime_GetFrameData
* };
* Struct inits
* fs
* @todo
* Bug comments
* EnPofusen and ObjUm
* Trailing comma
* Revert "bgId"
This reverts commit eea073c5ac30fd41f50436eeade43a811d0f0981.
* Revert "z64scene.h whitespace"
This reverts commit 399fd57550b7536b357ab6283360042f2e3e1467.
* Revert "SubS_ComputeTrackPointRot casts"
This reverts commit dea896c8743475508a3c7391e9d19cdb6b63f6a7.
* FAKE
* Review
* Format
Diffstat (limited to 'include')
| -rw-r--r-- | include/functions.h | 2 | ||||
| -rw-r--r-- | include/macros.h | 13 | ||||
| -rw-r--r-- | include/z64math.h | 12 | ||||
| -rw-r--r-- | include/z64message.h | 2 | ||||
| -rw-r--r-- | include/z64save.h | 9 | ||||
| -rw-r--r-- | include/z64subs.h | 2 |
6 files changed, 23 insertions, 17 deletions
diff --git a/include/functions.h b/include/functions.h index fca5af036..223d4badb 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1476,7 +1476,7 @@ void Lights_BindPointWithReference(Lights* lights, LightParams* params, Vec3f* p void Lights_BindPoint(Lights* lights, LightParams* params, PlayState* play); void Lights_BindDirectional(Lights* lights, LightParams* params, void* unused); void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* refPos, PlayState* play); -LightNode* Lights_FindBufSlot(); +LightNode* Lights_FindBufSlot(void); void Lights_FreeNode(LightNode* light); void LightContext_Init(PlayState* play, LightContext* lightCtx); void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b); diff --git a/include/macros.h b/include/macros.h index a4923ac06..d572e9ccf 100644 --- a/include/macros.h +++ b/include/macros.h @@ -146,12 +146,13 @@ extern GraphicsContext* __gfxCtx; #define ROUND(x) (s32)(((x) >= 0.0) ? ((x) + 0.5) : ((x) - 0.5)) -#define SWAP(type, a, b) \ - { \ - type _temp = (a); \ - (a) = (b); \ - (b) = _temp; \ - } +#define SWAP(type, a, b) \ + { \ + type _temp = (a); \ + (a) = (b); \ + (b) = _temp; \ + } \ + (void)0 #define OVERLAY_RELOCATION_OFFSET(overlayEntry) ((uintptr_t)((overlayEntry)->vramStart) - (uintptr_t)((overlayEntry)->loadedRamAddr)) #define VRAM_PTR_SIZE(entry) ((uintptr_t)((entry)->vramEnd) - (uintptr_t)((entry)->vramStart)) diff --git a/include/z64math.h b/include/z64math.h index 70a115966..62b6432e8 100644 --- a/include/z64math.h +++ b/include/z64math.h @@ -104,11 +104,13 @@ typedef struct { #define LERPWEIGHT(val, prev, next) (((val) - (prev)) / ((next) - (prev))) #define F32_LERPWEIGHT(val, prev, next) (((f32)(val) - (f32)(prev)) / ((f32)(next) - (f32)(prev))) -#define VEC3F_LERPIMPDST(dst, v0, v1, t){ \ - (dst)->x = (v0)->x + (((v1)->x - (v0)->x) * t); \ - (dst)->y = (v0)->y + (((v1)->y - (v0)->y) * t); \ - (dst)->z = (v0)->z + (((v1)->z - (v0)->z) * t); \ -} +#define VEC3F_LERPIMPDST(dst, v0, v1, t) \ + { \ + (dst)->x = (v0)->x + (((v1)->x - (v0)->x) * t); \ + (dst)->y = (v0)->y + (((v1)->y - (v0)->y) * t); \ + (dst)->z = (v0)->z + (((v1)->z - (v0)->z) * t); \ + } \ + (void)0 #define IS_ZERO(f) (fabsf(f) < 0.008f) diff --git a/include/z64message.h b/include/z64message.h index 82c84a3f8..2b0387045 100644 --- a/include/z64message.h +++ b/include/z64message.h @@ -34,7 +34,7 @@ typedef enum TextState { #define FONT_CHAR_TEX_WIDTH 16 #define FONT_CHAR_TEX_HEIGHT 16 -//! @TODO: Make this use `sizeof(AnyFontTextureSymbol)` +//! TODO: Make this use `sizeof(AnyFontTextureSymbol)` #define FONT_CHAR_TEX_SIZE ((16 * 16) / 2) // 16x16 I4 texture // TODO: should Font be in its own header or is it fine to have it here? diff --git a/include/z64save.h b/include/z64save.h index d34b5f0d9..0037c5aa5 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -1450,9 +1450,12 @@ typedef enum SunsSongState { #define GET_WEEKEVENTREG_RACE_FLAGS (WEEKEVENTREG(92) & WEEKEVENTREG_RACE_FLAGS) -#define SET_WEEKEVENTREG_RACE_FLAGS(flag) \ - WEEKEVENTREG(92) &= (u8)~WEEKEVENTREG_RACE_FLAGS; \ - WEEKEVENTREG(92) = WEEKEVENTREG(92) | (u8)((WEEKEVENTREG(92) & ~WEEKEVENTREG_RACE_FLAGS) | (flag)) +#define SET_WEEKEVENTREG_RACE_FLAGS(flag) \ + { \ + WEEKEVENTREG(92) &= (u8)~WEEKEVENTREG_RACE_FLAGS; \ + WEEKEVENTREG(92) = WEEKEVENTREG(92) | (u8)((WEEKEVENTREG(92) & ~WEEKEVENTREG_RACE_FLAGS) | (flag)); \ + } \ + (void)0 /** * gSaveContext.eventInf diff --git a/include/z64subs.h b/include/z64subs.h index ca90cb232..cc0e7ba2f 100644 --- a/include/z64subs.h +++ b/include/z64subs.h @@ -16,7 +16,7 @@ typedef enum { /* 2 */ SUBS_CUTSCENE_SET_FLAG } SubSCutsceneType; -//! @TODO: rename based on func_8013E748 and func_800B8500 +//! TODO: rename based on func_8013E748 and func_800B8500 typedef s32 (*func_8013E748_VerifyFunc)(struct PlayState*, Actor*, void*); typedef s32 (*VerifyActor)(struct PlayState*, Actor*, Actor*, void*); |
