diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2022-07-11 20:06:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-11 23:06:21 -0400 |
| commit | 85b19de4ab93ac0d36ff7e37a1a130b44c02316a (patch) | |
| tree | 9d6f0f377fdbad3902e7c2661f84a476bf14bdb3 /src/code | |
| parent | 81ce7bebccfbd0d4804a26be7eb845e1294e634f (diff) | |
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
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/audio/audio_load.c | 2 | ||||
| -rw-r--r-- | src/code/game.c | 4 | ||||
| -rw-r--r-- | src/code/z_actor.c | 4 | ||||
| -rw-r--r-- | src/code/z_eff_footmark.c | 2 | ||||
| -rw-r--r-- | src/code/z_effect_soft_sprite_old_init.c | 2 | ||||
| -rw-r--r-- | src/code/z_scene_proc.c | 4 |
6 files changed, 9 insertions, 9 deletions
diff --git a/src/code/audio/audio_load.c b/src/code/audio/audio_load.c index 8faf565ea..8b70eadd7 100644 --- a/src/code/audio/audio_load.c +++ b/src/code/audio/audio_load.c @@ -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; diff --git a/src/code/game.c b/src/code/game.c index c8d3e14ba..60bebd967 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -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; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 4ba99cec9..7609f163a 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -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; diff --git a/src/code/z_eff_footmark.c b/src/code/z_eff_footmark.c index 2205d2d95..1dc3d7237 100644 --- a/src/code/z_eff_footmark.c +++ b/src/code/z_eff_footmark.c @@ -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++; } diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c index c14d424e0..60a15c3cc 100644 --- a/src/code/z_effect_soft_sprite_old_init.c +++ b/src/code/z_effect_soft_sprite_old_init.c @@ -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; diff --git a/src/code/z_scene_proc.c b/src/code/z_scene_proc.c index 8bb8fa473..8ddde8a82 100644 --- a/src/code/z_scene_proc.c +++ b/src/code/z_scene_proc.c @@ -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); |
