General Cleanup 4 (#871)

* PartTimerWorker -> PartTimer

* cleanup

* format

* objChan draw macro

* Fix macro

* Fix warning

* PR Review

* Missed 1 ull

* UINT16_MAX

* Remove todo from footmark

* Remove * from tex in AnimatedMat_DrawTexCycle
This commit is contained in:
Derek Hensley
2022-07-11 20:06:21 -07:00
committed by GitHub
parent 81ce7bebcc
commit 85b19de4ab
99 changed files with 447 additions and 438 deletions
+1 -1
View File
@@ -277,7 +277,7 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) {
} else {
AudioHeap_WritebackDCache(dma->ramAddr, gAudioContext.sampleDmaBufSize);
dma->size = gAudioContext.sampleDmaBufSize;
dma->devAddr = 0U;
dma->devAddr = 0;
dma->sizeUnused = 0;
dma->unused = 0;
dma->ttl = 0;
+2 -2
View File
@@ -192,7 +192,7 @@ void GameState_Realloc(GameState* gameState, size_t size) {
void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx) {
gameState->gfxCtx = gfxCtx;
gameState->frames = 0U;
gameState->frames = 0;
gameState->main = NULL;
gameState->destroy = NULL;
gameState->running = 1;
@@ -201,7 +201,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
gfxCtx->xScale = gViConfigXScale;
gfxCtx->yScale = gViConfigYScale;
gameState->nextGameStateInit = NULL;
gameState->nextGameStateSize = 0U;
gameState->nextGameStateSize = 0;
{
s32 requiredScopeTemp;
+2 -2
View File
@@ -172,14 +172,14 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, PlayState* play) {
f32 alphaRatio;
if ((actor->id == ACTOR_PLAYER) && (((Player*)actor)->stateFlags3 & 0x8000)) {
f32 tmpScaleZ = actor->scale.z;
f32 prevScaleZ = actor->scale.z;
actor->scale.z += 0.03f * fabsf(Math_CosS(((Player*)actor)->unk_AAA));
actor->shape.shadowScale *= 0.2f;
alphaRatio = distToFloor * 0.03f;
actor->shape.shadowAlpha = actor->shape.shadowAlpha * CLAMP_MAX(alphaRatio, 1.0f);
ActorShadow_Draw(actor, mapper, play, gCircleShadowDL, NULL);
actor->scale.z = tmpScaleZ;
actor->scale.z = prevScaleZ;
} else {
actor->shape.shadowScale *= 0.3f;
alphaRatio = (distToFloor - 20.0f) * 0.02f;
+1 -1
View File
@@ -77,7 +77,7 @@ void EffFootmark_Update(PlayState* play) {
for (footmark = play->footprintInfo, i = 0; i < 100; i++, footmark++) {
if (footmark->actor != NULL) {
if ((footmark->flags & 1) == 1) {
if (footmark->age < 0xFFFFu) { // TODO replace with MAX_U16 or something
if ((u32)footmark->age < UINT16_MAX) {
footmark->age++;
}
+1 -1
View File
@@ -32,7 +32,7 @@
#include "overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.h"
#include "overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h"
void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) {
void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, TexturePtr texture) {
GraphicsContext* gfxCtx = play->state.gfxCtx;
f32 scale;
MtxF mfTrans;
+2 -2
View File
@@ -363,10 +363,10 @@ void AnimatedMat_DrawColorNonLinearInterp(PlayState* play, s32 segment, void* pa
*/
void AnimatedMat_DrawTexCycle(PlayState* play, s32 segment, void* params) {
AnimatedMatTexCycleParams* texAnimParams = params;
void** texList = Lib_SegmentedToVirtual(texAnimParams->textureList);
TexturePtr* texList = Lib_SegmentedToVirtual(texAnimParams->textureList);
u8* texId = Lib_SegmentedToVirtual(texAnimParams->textureIndexList);
s32 curFrame = sMatAnimStep % texAnimParams->keyFrameLength;
void* tex = Lib_SegmentedToVirtual(texList[texId[curFrame]]);
TexturePtr tex = Lib_SegmentedToVirtual(texList[texId[curFrame]]);
OPEN_DISPS(play->state.gfxCtx);