mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-16 12:54:40 +00:00
Fix/cleanup/rephrase miscellaneous stuff (#983)
* Add parens around params usage in VEC_SET macro * Remove unnecessary space character in a xml * Use defines instead of magic values in head/tail magic comments * Use `OS_USEC_TO_CYCLES` to make a time look better in `Graph_TaskSet00` * `0x25800` -> `sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])` * `0x803DA800` -> `0x80400000 - frame buffer size` * Use `OS_VI_` defines instead of hex * Add empty line after some variable declarations * Remove unused `extern CutsceneData` in `z_bg_dy_yoseizo.c` * `Matrix_MtxFToYXZRotS` does not use `MTXMODE_` * Use `MTXMODE_` more * Remove `ASCII_TO_U32`, use `'IS64'` * Add explicit `!= NULL` in some ternaries * Use `INV_CONTENT`, `AMMO` macros more * Use `PLAYER_AP_` enum more to compare to `Player#heldItemActionParam` * Get rid of lowercase hex (outside libultra) * `gWindMill*` -> `gWindmill*` * Format and small fix enums in `z_boss_mo.h` * Use `CHECK_BTN_ANY` more * Fix xz/xy mistake in comment in tektite * Rephrase comments mentioning "the devs" in a more neutral way * Clean-up some objectively useless parens * Fix some negative values written as u16 instead of s16 in ichains * `SKJ_ACTON_` -> `SKJ_ACTION_` * Run formatter * Fix unk_ offset of `TransformUpdateIndex#unk_10` -> `unk_0E` * Remove comments using in-game text * Remove `U` suffix from integer literals * Revert "Remove `ASCII_TO_U32`, use `'IS64'`" This reverts commitc801337dde
. * Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)` * Add empty line after decl x2 * Revert "Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)`" This reverts commitd80bdb32da
. * Make `CUR_UPG_VALUE(UPG_STRENGTH)` compare to integers (eventually needs its own enum) * Only use `PLAYER_SHIELD_` enum with `Player#currentShield` * Only use `PLAYER_TUNIC_` enum with `Player#currentTunic`
This commit is contained in:
parent
5c95f70d59
commit
f1d27bf653
82 changed files with 327 additions and 323 deletions
|
@ -32,16 +32,16 @@ void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
|
|||
sub->bitField0.s.usesHeadsetPanEffects = sp24.usesHeadsetPanEffects;
|
||||
if (stereoHeadsetEffects && gAudioContext.soundMode == 1) {
|
||||
smallPanIndex = pan >> 1;
|
||||
if (smallPanIndex > 0x3f) {
|
||||
smallPanIndex = 0x3f;
|
||||
if (smallPanIndex > 0x3F) {
|
||||
smallPanIndex = 0x3F;
|
||||
}
|
||||
|
||||
sub->headsetPanLeft = gHeadsetPanQuantization[smallPanIndex];
|
||||
sub->headsetPanRight = gHeadsetPanQuantization[0x3f - smallPanIndex];
|
||||
sub->headsetPanRight = gHeadsetPanQuantization[0x3F - smallPanIndex];
|
||||
sub->bitField1.s.usesHeadsetPanEffects2 = true;
|
||||
|
||||
volLeft = gHeadsetPanVolume[pan];
|
||||
volRight = gHeadsetPanVolume[0x7f - pan];
|
||||
volRight = gHeadsetPanVolume[0x7F - pan];
|
||||
} else if (stereoHeadsetEffects && gAudioContext.soundMode == 0) {
|
||||
strongLeft = strongRight = 0;
|
||||
sub->headsetPanRight = 0;
|
||||
|
@ -49,7 +49,7 @@ void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
|
|||
sub->bitField1.s.usesHeadsetPanEffects2 = false;
|
||||
|
||||
volLeft = gStereoPanVolume[pan];
|
||||
volRight = gStereoPanVolume[0x7f - pan];
|
||||
volRight = gStereoPanVolume[0x7F - pan];
|
||||
if (pan < 0x20) {
|
||||
strongLeft = 1;
|
||||
} else if (pan > 0x60) {
|
||||
|
@ -85,7 +85,7 @@ void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
|
|||
sub->bitField0.s.stereoStrongRight = sp24.strongRight;
|
||||
sub->bitField0.s.stereoStrongLeft = sp24.strongLeft;
|
||||
volLeft = gDefaultPanVolume[pan];
|
||||
volRight = gDefaultPanVolume[0x7f - pan];
|
||||
volRight = gDefaultPanVolume[0x7F - pan];
|
||||
}
|
||||
|
||||
vel = 0.0f > vel ? 0.0f : vel;
|
||||
|
@ -169,7 +169,7 @@ void Audio_ProcessNotes(void) {
|
|||
noteSubEu2 = &gAudioContext.noteSubsEu[gAudioContext.noteSubEuOffset + i];
|
||||
playbackState = ¬e->playbackState;
|
||||
if (playbackState->parentLayer != NO_LAYER) {
|
||||
if ((u32)playbackState->parentLayer < 0x7FFFFFFFU) {
|
||||
if ((u32)playbackState->parentLayer < 0x7FFFFFFF) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ Drum* Audio_GetDrum(s32 bankId, s32 drumId) {
|
|||
gAudioContext.audioErrorFlags = ((bankId << 8) + drumId) + 0x4000000;
|
||||
return NULL;
|
||||
}
|
||||
if ((u32)gAudioContext.ctlEntries[bankId].drums < 0x80000000U) {
|
||||
if ((u32)gAudioContext.ctlEntries[bankId].drums < 0x80000000) {
|
||||
return NULL;
|
||||
}
|
||||
drum = gAudioContext.ctlEntries[bankId].drums[drumId];
|
||||
|
@ -378,7 +378,7 @@ AudioBankSound* Audio_GetSfx(s32 bankId, s32 sfxId) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if ((u32)gAudioContext.ctlEntries[bankId].soundEffects < 0x80000000U) {
|
||||
if ((u32)gAudioContext.ctlEntries[bankId].soundEffects < 0x80000000) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -570,7 +570,7 @@ void Audio_InitSyntheticWave(Note* note, SequenceChannelLayer* seqLayer) {
|
|||
s32 waveSampleCountIndex;
|
||||
s32 waveId = seqLayer->instOrWave;
|
||||
|
||||
if (waveId == 0xff) {
|
||||
if (waveId == 0xFF) {
|
||||
waveId = seqLayer->seqChannel->instOrWave;
|
||||
}
|
||||
|
||||
|
@ -761,7 +761,7 @@ void Audio_NoteInitForLayer(Note* note, SequenceChannelLayer* seqLayer) {
|
|||
Audio_NoteInit(note);
|
||||
instId = seqLayer->instOrWave;
|
||||
|
||||
if (instId == 0xff) {
|
||||
if (instId == 0xFF) {
|
||||
instId = seqLayer->seqChannel->instOrWave;
|
||||
}
|
||||
sub->sound.audioBankSound = seqLayer->sound;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue