diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2022-08-30 23:35:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-30 17:35:00 -0400 |
| commit | 2e18eb334bad77db0625549c62849333705214b8 (patch) | |
| tree | c3b39fc35144f6af78437dd766408a26e03be0ef /src/code | |
| parent | 881fe0ad0a34494ac0e82adaa32daf34d31507c8 (diff) | |
Fix misc 16 (#1371)
* Replace tabs in exceptasm.s source
* Replace tabs with \t in strings
* Fix grammar in various comments
* Fix "initalize" typos in code
* (fix typo) `__osMallocIsInitalized` -> `__osMallocIsInitialized`
* Some Link -> Player
* Use `EXCH_ITEM_` more
* "bgm music" -> "background music"
* Fix typos in `place_title_cards.xml`
* `SkelAnime_Update` returns a boolean
* Run formatter
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/__osMalloc.c | 8 | ||||
| -rw-r--r-- | src/code/audio_heap.c | 2 | ||||
| -rw-r--r-- | src/code/audio_load.c | 4 | ||||
| -rw-r--r-- | src/code/audio_synthesis.c | 2 | ||||
| -rw-r--r-- | src/code/code_800E4FE0.c | 2 | ||||
| -rw-r--r-- | src/code/code_800EC960.c | 2 | ||||
| -rw-r--r-- | src/code/debug_malloc.c | 4 | ||||
| -rw-r--r-- | src/code/speed_meter.c | 2 | ||||
| -rw-r--r-- | src/code/system_malloc.c | 4 | ||||
| -rw-r--r-- | src/code/z_actor.c | 2 | ||||
| -rw-r--r-- | src/code/z_camera.c | 30 | ||||
| -rw-r--r-- | src/code/z_malloc.c | 4 | ||||
| -rw-r--r-- | src/code/z_play.c | 4 | ||||
| -rw-r--r-- | src/code/z_view.c | 4 |
14 files changed, 37 insertions, 37 deletions
diff --git a/src/code/__osMalloc.c b/src/code/__osMalloc.c index 19de34a8b..22cabc0b5 100644 --- a/src/code/__osMalloc.c +++ b/src/code/__osMalloc.c @@ -163,7 +163,7 @@ void __osMallocCleanup(Arena* arena) { bzero(arena, sizeof(*arena)); } -u8 __osMallocIsInitalized(Arena* arena) { +u8 __osMallocIsInitialized(Arena* arena) { return arena->isInit; } @@ -682,8 +682,8 @@ void __osDisplayArena(Arena* arena) { ArenaNode* iter; ArenaNode* next; - if (!__osMallocIsInitalized(arena)) { - osSyncPrintf("アリーナは初期化されていません\n"); // "Arena is not initalized" + if (!__osMallocIsInitialized(arena)) { + osSyncPrintf("アリーナは初期化されていません\n"); // "Arena is not initialized" return; } @@ -746,7 +746,7 @@ void ArenaImpl_FaultClient(Arena* arena) { ArenaNode* next; FaultDrawer_Printf("ARENA INFO (0x%08x)\n", arena); - if (!__osMallocIsInitalized(arena)) { + if (!__osMallocIsInitialized(arena)) { FaultDrawer_Printf("Arena is uninitalized\n", arena); return; } diff --git a/src/code/audio_heap.c b/src/code/audio_heap.c index 7cdfe086b..504b56244 100644 --- a/src/code/audio_heap.c +++ b/src/code/audio_heap.c @@ -1059,7 +1059,7 @@ void AudioHeap_Init(void) { AudioHeap_InitSampleCaches(spec->persistentSampleCacheSize, spec->temporarySampleCacheSize); AudioLoad_InitSampleDmaBuffers(gAudioContext.numNotes); - // Initalize Loads + // Initialize Loads gAudioContext.preloadSampleStackTop = 0; AudioLoad_InitSlowLoads(); AudioLoad_InitScriptLoads(); diff --git a/src/code/audio_load.c b/src/code/audio_load.c index 73de88411..c234538f3 100644 --- a/src/code/audio_load.c +++ b/src/code/audio_load.c @@ -70,7 +70,7 @@ s32 sAudioLoadPad2[4]; // double file padding? DmaHandler sDmaHandler = osEPiStartDma; void* sUnusedHandler = NULL; -s32 gAudioContextInitalized = false; +s32 gAudioContextInitialized = false; void AudioLoad_DecreaseSampleDmaTtls(void) { u32 i; @@ -1235,7 +1235,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) { } AudioHeap_InitPool(&gAudioContext.permanentPool, ramAddr, gAudioHeapInitSizes.permanentPoolSize); - gAudioContextInitalized = true; + gAudioContextInitialized = true; osSendMesg(gAudioContext.taskStartQueueP, (OSMesg)gAudioContext.totalTaskCount, OS_MESG_NOBLOCK); } diff --git a/src/code/audio_synthesis.c b/src/code/audio_synthesis.c index a00c57ffa..26538dcfd 100644 --- a/src/code/audio_synthesis.c +++ b/src/code/audio_synthesis.c @@ -1266,7 +1266,7 @@ Acmd* AudioSynth_LoadWaveSamples(Acmd* cmd, NoteSubEu* noteSubEu, NoteSynthesisS } /** - * The Haas Effect gives directionality to sound by appling a small (< 35ms) delay to either the left or right channel. + * The Haas Effect gives directionality to sound by applying a small (< 35ms) delay to either the left or right channel. * The delay is small enough that the sound is still perceived as one sound, but the channel that is not delayed will * reach our ear first and give a sense of directionality. The sound is directed towards the opposite side of the delay. */ diff --git a/src/code/code_800E4FE0.c b/src/code/code_800E4FE0.c index c1a75de4a..3b140b6cf 100644 --- a/src/code/code_800E4FE0.c +++ b/src/code/code_800E4FE0.c @@ -573,7 +573,7 @@ s32 func_800E5F88(s32 resetPreloadID) { void Audio_PreNMIInternal(void) { gAudioContext.resetTimer = 1; - if (gAudioContextInitalized) { + if (gAudioContextInitialized) { func_800E5F88(0); gAudioContext.resetStatus = 0; } diff --git a/src/code/code_800EC960.c b/src/code/code_800EC960.c index 074fececa..fc05e71ad 100644 --- a/src/code/code_800EC960.c +++ b/src/code/code_800EC960.c @@ -4854,7 +4854,7 @@ void Audio_SetSequenceMode(u8 seqMode) { sPrevSeqMode = seqMode + 0x80; } } else { - // Hyrule Field will play slightly different bgm music depending on whether player is standing + // Hyrule Field will play slightly different background music depending on whether player is standing // still or moving. This is the logic to determine the transition between those two states if (seqMode == SEQ_MODE_DEFAULT) { if (sPrevSeqMode == SEQ_MODE_STILL) { diff --git a/src/code/debug_malloc.c b/src/code/debug_malloc.c index 60c7607cb..670ce857a 100644 --- a/src/code/debug_malloc.c +++ b/src/code/debug_malloc.c @@ -106,6 +106,6 @@ void DebugArena_Cleanup(void) { __osMallocCleanup(&sDebugArena); } -u8 DebugArena_IsInitalized(void) { - return __osMallocIsInitalized(&sDebugArena); +u8 DebugArena_IsInitialized(void) { + return __osMallocIsInitialized(&sDebugArena); } diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index 59fe13067..f37a22788 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -167,7 +167,7 @@ void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, Gam y = 212; if (SREG(0) > 2) { - if (ZeldaArena_IsInitalized()) { + if (ZeldaArena_IsInitialized()) { ZeldaArena_GetSizes(&zeldaFreeMax, &zeldaFree, &zeldaAlloc); SpeedMeter_InitAllocEntry(&entry, zeldaFree + zeldaAlloc, zeldaAlloc, GPACK_RGBA5551(0, 0, 255, 1), GPACK_RGBA5551(255, 255, 255, 1), ulx, lrx, y, y + 1); diff --git a/src/code/system_malloc.c b/src/code/system_malloc.c index d9085c12f..f62e5639a 100644 --- a/src/code/system_malloc.c +++ b/src/code/system_malloc.c @@ -105,6 +105,6 @@ void SystemArena_Cleanup(void) { __osMallocCleanup(&gSystemArena); } -u8 SystemArena_IsInitalized(void) { - return __osMallocIsInitalized(&gSystemArena); +u8 SystemArena_IsInitialized(void) { + return __osMallocIsInitialized(&gSystemArena); } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 9c71c3128..5e331cbe4 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -2939,7 +2939,7 @@ void func_800328D4(PlayState* play, ActorContext* actorCtx, Player* player, u32 if ((actor->update != NULL) && ((Player*)actor != player) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0)) { // This block below is for determining the closest actor to player in determining the volume - // used while playing enemy bgm music + // used while playing enemy background music if ((actorCategory == ACTORCAT_ENEMY) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) && (actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sbgmEnemyDistSq)) { actorCtx->targetCtx.bgmEnemy = actor; diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 234985969..a46705140 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -68,8 +68,8 @@ f32 Camera_InterpolateCurve(f32 a, f32 b) { } /* - * Performs linear interpoloation between `cur` and `target`. If `cur` is within - * `minDiff` units, The result is rounded up to `target` + * Performs linear interpolation between `cur` and `target`. If `cur` is within + * `minDiff` units, the result is rounded up to `target` */ f32 Camera_LERPCeilF(f32 target, f32 cur, f32 stepScale, f32 minDiff) { f32 diff = target - cur; @@ -87,8 +87,8 @@ f32 Camera_LERPCeilF(f32 target, f32 cur, f32 stepScale, f32 minDiff) { } /* - * Performs linear interpoloation between `cur` and `target`. If `cur` is within - * `minDiff` units, The result is rounded down to `cur` + * Performs linear interpolation between `cur` and `target`. If `cur` is within + * `minDiff` units, the result is rounded down to `cur` */ f32 Camera_LERPFloorF(f32 target, f32 cur, f32 stepScale, f32 minDiff) { f32 diff = target - cur; @@ -106,8 +106,8 @@ f32 Camera_LERPFloorF(f32 target, f32 cur, f32 stepScale, f32 minDiff) { } /* - * Performs linear interpoloation between `cur` and `target`. If `cur` is within - * `minDiff` units, The result is rounded up to `target` + * Performs linear interpolation between `cur` and `target`. If `cur` is within + * `minDiff` units, the result is rounded up to `target` */ s16 Camera_LERPCeilS(s16 target, s16 cur, f32 stepScale, s16 minDiff) { s16 diff = target - cur; @@ -125,8 +125,8 @@ s16 Camera_LERPCeilS(s16 target, s16 cur, f32 stepScale, s16 minDiff) { } /* - * Performs linear interpoloation between `cur` and `target`. If `cur` is within - * `minDiff` units, The result is rounded down to `cur` + * Performs linear interpolation between `cur` and `target`. If `cur` is within + * `minDiff` units, the result is rounded down to `cur` */ s16 Camera_LERPFloorS(s16 target, s16 cur, f32 stepScale, s16 minDiff) { s16 diff = target - cur; @@ -144,8 +144,8 @@ s16 Camera_LERPFloorS(s16 target, s16 cur, f32 stepScale, s16 minDiff) { } /* - * Performs linear interpoloation between `cur` and `target`. If `cur` is within - * `minDiff` units, The result is rounded up to `target` + * Performs linear interpolation between `cur` and `target`. If `cur` is within + * `minDiff` units, the result is rounded up to `target` */ void Camera_LERPCeilVec3f(Vec3f* target, Vec3f* cur, f32 yStepScale, f32 xzStepScale, f32 minDiff) { cur->x = Camera_LERPCeilF(target->x, cur->x, xzStepScale, minDiff); @@ -5642,7 +5642,7 @@ s32 Camera_Demo1(Camera* camera) { switch (camera->animState) { case 0: - // initalize camera state + // initialize camera state rwData->keyframe = 0; rwData->curFrame = 0.0f; camera->animState++; @@ -6174,7 +6174,7 @@ s32 Camera_Demo6(Camera* camera) { switch (camera->animState) { case 0: - // initalizes the camera state. + // initializes the camera state. rwData->animTimer = 0; camera->fov = 60.0f; Actor_GetWorld(&focusPosRot, camFocus); @@ -6280,7 +6280,7 @@ s32 Camera_Demo9(Camera* camera) { switch (camera->animState) { case 0: - // initalize the camera state + // initialize the camera state rwData->keyframe = 0; rwData->finishAction = 0; rwData->curFrame = 0.0f; @@ -6301,7 +6301,7 @@ s32 Camera_Demo9(Camera* camera) { // if the animation timer is still running, run the demo logic // if it is not, then the case will fallthrough to the finish logic. - // Run the at and eye cs interpoloation functions, if either of them return 1 (that no more points + // Run the at and eye cs interpolation functions, if either of them returns 1 (that no more points // exist) change the animation state to 2 (standby) if (func_800BB2B4(&csEyeUpdate, &newRoll, camFOV, onePointCamData->eyePoints, &rwData->keyframe, &rwData->curFrame) != 0 || @@ -6711,7 +6711,7 @@ s32 Camera_Special6(Camera* camera) { camera->fov += (CAM_DATA_SCALED(fov) - camera->fov) / rwData->animTimer; rwData->animTimer--; } else { - // Camera following link on the x axis. + // Camera following player on the x axis. sCameraInterfaceFlags &= 0xF0FF; eyePosCalc = *eyeNext; eyePosCalc.x += (playerPosRot->pos.x - eyePosCalc.x) * 0.5f; diff --git a/src/code/z_malloc.c b/src/code/z_malloc.c index e51d381cb..35942de28 100644 --- a/src/code/z_malloc.c +++ b/src/code/z_malloc.c @@ -104,6 +104,6 @@ void ZeldaArena_Cleanup(void) { __osMallocCleanup(&sZeldaArena); } -u8 ZeldaArena_IsInitalized(void) { - return __osMallocIsInitalized(&sZeldaArena); +u8 ZeldaArena_IsInitialized(void) { + return __osMallocIsInitialized(&sZeldaArena); } diff --git a/src/code/z_play.c b/src/code/z_play.c index 33013a2e5..ceeb68f75 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -517,10 +517,10 @@ void Play_Update(PlayState* this) { // fade out bgm if "continue bgm" flag is not set if (!(gEntranceTable[this->nextEntranceIndex + sceneLayer].field & ENTRANCE_INFO_CONTINUE_BGM_FLAG)) { - // "Sound initalized. 111" + // "Sound initialized. 111" osSyncPrintf("\n\n\nサウンドイニシャル来ました。111"); if ((this->transitionType < TRANS_TYPE_MAX) && !Environment_IsForcedSequenceDisabled()) { - // "Sound initalized. 222" + // "Sound initialized. 222" osSyncPrintf("\n\n\nサウンドイニシャル来ました。222"); func_800F6964(0x14); gSaveContext.seqId = (u8)NA_BGM_DISABLED; diff --git a/src/code/z_view.c b/src/code/z_view.c index 96c7b79d1..044e5603e 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -334,7 +334,7 @@ s32 View_ApplyPerspective(View* view) { Matrix_MtxToMtxF(projection, &mf); osSyncPrintf("projection\n"); for (i = 0; i < 4; i++) { - osSyncPrintf(" %f %f %f %f\n", mf.mf[i][0], mf.mf[i][1], mf.mf[i][2], mf.mf[i][3]); + osSyncPrintf("\t%f\t%f\t%f\t%f\n", mf.mf[i][0], mf.mf[i][1], mf.mf[i][2], mf.mf[i][3]); } osSyncPrintf("\n"); } @@ -373,7 +373,7 @@ s32 View_ApplyPerspective(View* view) { Matrix_MtxToMtxF(view->viewingPtr, &mf); osSyncPrintf("viewing\n"); for (i = 0; i < 4; i++) { - osSyncPrintf(" %f %f %f %f\n", mf.mf[i][0], mf.mf[i][1], mf.mf[i][2], mf.mf[i][3]); + osSyncPrintf("\t%f\t%f\t%f\t%f\n", mf.mf[i][0], mf.mf[i][1], mf.mf[i][2], mf.mf[i][3]); } osSyncPrintf("\n"); } |
