clangd: Started fixing warnings and errors, code cleanup

This commit is contained in:
LagoLunatic
2024-10-17 21:35:18 -04:00
parent f1d73f7fc7
commit 34afbd84db
58 changed files with 417 additions and 316 deletions
+3 -2
View File
@@ -1597,7 +1597,7 @@ void dScnKy_env_light_c::settingTevStruct(int i_lightType, cXyz* i_pos, dKy_tevs
} else {
i_tevstr->mLightMode = 0;
if (i_tevstr->mRoomNo >= 128) {
if (i_tevstr->mRoomNo >= 128) { // Bug: mRoomNo is an s8, so this condition never evaluates to true.
i_tevstr->mEnvrIdxCurr = 0;
} else {
i_tevstr->mEnvrIdxCurr = i_tevstr->mRoomNo;
@@ -2134,7 +2134,7 @@ void dKy_event_proc() {
switch (env_light.mDiceWeatherState) {
case DICE_STATE_RESET_e:
break;
case DICE_STATE_INIT_e:
case DICE_STATE_INIT_e: {
u8 table_no = cM_rndF(7.99f);
env_light.mDiceWeatherCurrPattern = S_wether_table[table_no];
env_light.mDiceWeatherCounter = 0;
@@ -2165,6 +2165,7 @@ void dKy_event_proc() {
env_light.mDiceWeatherCounter++;
env_light.mDiceWeatherState++;
break;
}
case DICE_STATE_EXEC_e:
if (current_time > env_light.mDiceWeatherTime &&
current_time - env_light.mDiceWeatherTime < 180.0f)