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 eea073c5ac.

* Revert "z64scene.h whitespace"

This reverts commit 399fd57550.

* Revert "SubS_ComputeTrackPointRot casts"

This reverts commit dea896c874.

* FAKE

* Review

* Format
This commit is contained in:
Derek Hensley
2023-03-21 07:12:22 -07:00
committed by GitHub
parent 6d1bc6e34b
commit 9bb978527f
38 changed files with 117 additions and 124 deletions
+1 -1
View File
@@ -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);
+7 -6
View File
@@ -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))
+7 -5
View File
@@ -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)
+1 -1
View File
@@ -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?
+6 -3
View File
@@ -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
+1 -1
View File
@@ -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*);