mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 15:34:41 +00:00
Fix misc 6 (#1148)
* Fix typo `vertexs` -> `vertices` * Fix typo `limbMatricies` -> `limbMatrices` * Fix some `gSPTextureRectangle` usage of fixed point constants * Run formatter * `ALIGN8` macro * `object_skj` cleanup * sholder -> shoulder * cleanup `stdbool.h` * Some function prototypes cleanup * Use macros in `osVirtualToPhysical`
This commit is contained in:
parent
c3533052ca
commit
a9526a3354
22 changed files with 128 additions and 130 deletions
|
@ -32,7 +32,7 @@ SoundFontSample* AudioLoad_GetFontSample(s32 fontId, s32 instId);
|
|||
void AudioLoad_ProcessAsyncLoads(s32 resetStatus);
|
||||
void AudioLoad_ProcessAsyncLoadUnkMedium(AudioAsyncLoad* asyncLoad, s32 resetStatus);
|
||||
void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus);
|
||||
void AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, SoundFontData* mem, RelocInfo* relocInfo, s32 temporary);
|
||||
void AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, SoundFontData* mem, RelocInfo* relocInfo, s32 async);
|
||||
void AudioLoad_RelocateSample(SoundFontSound* sound, SoundFontData* mem, RelocInfo* relocInfo);
|
||||
void AudioLoad_DiscardFont(s32 fontId);
|
||||
u32 AudioLoad_TrySyncLoadSampleBank(u32 sampleBankId, u32* outMedium, s32 noLoad);
|
||||
|
|
|
@ -978,7 +978,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
|||
switch (curPart) {
|
||||
case 0:
|
||||
AudioSynth_InterL(cmd++, DMEM_UNCOMPRESSED_NOTE + skipBytes, DMEM_TEMP + 0x20,
|
||||
((samplesLenAdjusted / 2) + 7) & ~7);
|
||||
ALIGN8(samplesLenAdjusted / 2));
|
||||
resampledTempLen = samplesLenAdjusted;
|
||||
noteSamplesDmemAddrBeforeResampling = DMEM_TEMP + 0x20;
|
||||
if (finished) {
|
||||
|
@ -988,7 +988,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
|||
break;
|
||||
case 1:
|
||||
AudioSynth_InterL(cmd++, DMEM_UNCOMPRESSED_NOTE + skipBytes,
|
||||
DMEM_TEMP + 0x20 + resampledTempLen, ((samplesLenAdjusted / 2) + 7) & ~7);
|
||||
DMEM_TEMP + 0x20 + resampledTempLen, ALIGN8(samplesLenAdjusted / 2));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -506,7 +506,7 @@ void* Graph_DlistAlloc(Gfx** gfx, u32 size) {
|
|||
u8* ptr;
|
||||
Gfx* dst;
|
||||
|
||||
size = ((size + 7) & ~7),
|
||||
size = ALIGN8(size);
|
||||
|
||||
ptr = (u8*)(*gfx + 1);
|
||||
|
||||
|
|
|
@ -8078,7 +8078,7 @@ void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* d
|
|||
}
|
||||
}
|
||||
|
||||
s32 Camera_QRegInit() {
|
||||
s32 Camera_QRegInit(void) {
|
||||
if (!R_RELOAD_CAM_PARAMS) {
|
||||
QREG(2) = 1;
|
||||
QREG(10) = -1;
|
||||
|
@ -8113,7 +8113,7 @@ s32 Camera_QRegInit() {
|
|||
return true;
|
||||
}
|
||||
|
||||
s32 func_8005B198() {
|
||||
s32 func_8005B198(void) {
|
||||
return D_8011D3AC;
|
||||
}
|
||||
|
||||
|
|
|
@ -1004,7 +1004,7 @@ s32 Collider_DestroyLine(GlobalContext* globalCtx, OcLine* line) {
|
|||
* Sets up an OcLine with endpoints a and b.
|
||||
* OcLines are entirely unused.
|
||||
*/
|
||||
s32 Collider_SetLinePoints(GlobalContext* GlobalContext, OcLine* ocLine, Vec3f* a, Vec3f* b) {
|
||||
s32 Collider_SetLinePoints(GlobalContext* globalCtx, OcLine* ocLine, Vec3f* a, Vec3f* b) {
|
||||
Math_Vec3f_Copy(&ocLine->line.a, a);
|
||||
Math_Vec3f_Copy(&ocLine->line.b, b);
|
||||
return 1;
|
||||
|
|
|
@ -848,7 +848,7 @@ void Environment_Update(GlobalContext* globalCtx, EnvironmentContext* envCtx, Li
|
|||
s32 adjustment;
|
||||
|
||||
if ((((void)0, gSaveContext.gameMode) != 0) && (((void)0, gSaveContext.gameMode) != 3)) {
|
||||
func_800AA16C(globalCtx);
|
||||
func_800AA16C();
|
||||
}
|
||||
|
||||
if (pauseCtx->state == 0) {
|
||||
|
|
|
@ -546,15 +546,15 @@ s16 Math_SmoothStepToS(s16* pValue, s16 target, s16 scale, s16 step, s16 minStep
|
|||
/**
|
||||
* Changes pValue by step towards target. If step is more than 1/scale of the remaining distance, step by that instead.
|
||||
*/
|
||||
void Math_ApproachS(s16* pValue, s16 target, s16 scale, s16 maxStep) {
|
||||
void Math_ApproachS(s16* pValue, s16 target, s16 scale, s16 step) {
|
||||
s16 diff = target - *pValue;
|
||||
|
||||
diff /= scale;
|
||||
|
||||
if (diff > maxStep) {
|
||||
*pValue += maxStep;
|
||||
} else if (diff < -maxStep) {
|
||||
*pValue -= maxStep;
|
||||
if (diff > step) {
|
||||
*pValue += step;
|
||||
} else if (diff < -step) {
|
||||
*pValue -= step;
|
||||
} else {
|
||||
*pValue += diff;
|
||||
}
|
||||
|
|
|
@ -475,8 +475,8 @@ void Minimap_Draw(GlobalContext* globalCtx) {
|
|||
8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gSPTextureRectangle(OVERLAY_DISP++, 1080, 616, 1112, 648, G_TX_RENDERTILE, 0, 0, 1 << 10,
|
||||
1 << 10);
|
||||
gSPTextureRectangle(OVERLAY_DISP++, 270 << 2, 154 << 2, 278 << 2, 162 << 2, G_TX_RENDERTILE, 0,
|
||||
0, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
Minimap_DrawCompassIcons(globalCtx); // Draw icons for the player spawn and current position
|
||||
|
|
|
@ -1349,23 +1349,23 @@ s32 OnePointCutscene_AttentionSetSfx(GlobalContext* globalCtx, Actor* actor, s32
|
|||
}
|
||||
|
||||
// unused
|
||||
void OnePointCutscene_EnableAttention() {
|
||||
void OnePointCutscene_EnableAttention(void) {
|
||||
sDisableAttention = false;
|
||||
}
|
||||
|
||||
// unused
|
||||
void OnePointCutscene_DisableAttention() {
|
||||
void OnePointCutscene_DisableAttention(void) {
|
||||
sDisableAttention = true;
|
||||
}
|
||||
|
||||
s32 OnePointCutscene_CheckForCategory(GlobalContext* globalCtx, s32 category) {
|
||||
s32 OnePointCutscene_CheckForCategory(GlobalContext* globalCtx, s32 actorCategory) {
|
||||
Camera* parentCam = globalCtx->cameraPtrs[MAIN_CAM];
|
||||
|
||||
while (parentCam->childCamIdx != SUBCAM_FREE) {
|
||||
parentCam = globalCtx->cameraPtrs[parentCam->childCamIdx];
|
||||
if ((parentCam == NULL) || (parentCam->setting != CAM_SET_CS_ATTENTION)) {
|
||||
break;
|
||||
} else if (category == parentCam->target->category) {
|
||||
} else if (actorCategory == parentCam->target->category) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -340,7 +340,7 @@ void SkelAnime_DrawOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTa
|
|||
*/
|
||||
void SkelAnime_DrawFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg,
|
||||
Mtx** limbMatricies) {
|
||||
Mtx** limbMatrices) {
|
||||
StandardLimb* limb;
|
||||
Gfx* newDList;
|
||||
Gfx* limbDList;
|
||||
|
@ -364,13 +364,13 @@ void SkelAnime_DrawFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** s
|
|||
if ((overrideLimbDraw == NULL) || !overrideLimbDraw(globalCtx, limbIndex, &newDList, &pos, &rot, arg)) {
|
||||
Matrix_TranslateRotateZYX(&pos, &rot);
|
||||
if (newDList != NULL) {
|
||||
Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1242);
|
||||
gSPMatrix(POLY_OPA_DISP++, *limbMatricies, G_MTX_LOAD);
|
||||
Matrix_ToMtx(*limbMatrices, "../z_skelanime.c", 1242);
|
||||
gSPMatrix(POLY_OPA_DISP++, *limbMatrices, G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, newDList);
|
||||
(*limbMatricies)++;
|
||||
(*limbMatrices)++;
|
||||
} else if (limbDList != NULL) {
|
||||
Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1249);
|
||||
(*limbMatricies)++;
|
||||
Matrix_ToMtx(*limbMatrices, "../z_skelanime.c", 1249);
|
||||
(*limbMatrices)++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -380,14 +380,14 @@ void SkelAnime_DrawFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** s
|
|||
|
||||
if (limb->child != LIMB_DONE) {
|
||||
SkelAnime_DrawFlexLimbOpa(globalCtx, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
limbMatricies);
|
||||
limbMatrices);
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
|
||||
if (limb->sibling != LIMB_DONE) {
|
||||
SkelAnime_DrawFlexLimbOpa(globalCtx, limb->sibling, skeleton, jointTable, overrideLimbDraw, postLimbDraw, arg,
|
||||
limbMatricies);
|
||||
limbMatrices);
|
||||
}
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_skelanime.c", 1265);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue