A few warning fixes and slight tweaks

This commit is contained in:
Colton Rushton 2021-02-16 09:51:51 -04:00
parent 2ce60d18c5
commit 9f907a4a62
3 changed files with 13 additions and 15 deletions

View File

@ -1074,7 +1074,7 @@ s32 play_mode_change_area(void) {
#ifndef QOL_FIXES
if (sTransitionUpdate == (void (*)(s16 *)) - 1) {
#else
if (sTransitionTimer == -1) {
if (sTransitionTimer <= -1) {
#endif
update_camera(gCurrentArea->camera);
} else if (sTransitionUpdate != NULL) {
@ -1082,7 +1082,11 @@ s32 play_mode_change_area(void) {
}
if (sTransitionTimer > 0) {
#ifndef QOL_FIXES
sTransitionTimer -= 1;
#else
sTransitionTimer--;
#endif
}
//! If sTransitionTimer is -1, this will miss.

View File

@ -400,11 +400,7 @@ s32 act_start_hanging(struct MarioState *m) {
}
//! Crash if Mario's referenced ceiling is NULL (same for other hanging actions)
#ifndef QOL_FIXES
if (m->ceil->type != SURFACE_HANGABLE) {
#else
if (m->ceil->type != SURFACE_HANGABLE || m->ceil->type != NULL) {
#endif
return set_mario_action(m, ACT_FREEFALL, 0);
}

View File

@ -222,24 +222,22 @@ static void set_state(void) {
}
void set_logo(void) {
if (lastCourseNum)
if (lastCourseNum) {
if (snprintf(largeImageKey, sizeof(largeImageKey), "%d", lastCourseNum) < 0)
abort();
else
} else {
strcpy(largeImageKey, "0");
}
/*
if (lastActNum)
if (snprintf(smallImageKey, sizeof(largeImageKey), "%d", lastActNum) < 0)
if (lastActNum) {
if (snprintf(smallImageKey, sizeof(smallImageKey), "%d", lastActNum) < 0)
abort();
else
} else {
smallImageKey[0] = '\0';
*/
}
discordRichPresence.largeImageKey = largeImageKey;
//discordRichPresence.largeImageText = "";
//discordRichPresence.smallImageKey = smallImageKey;
//discordRichPresence.smallImageText = "";
discordRichPresence.smallImageKey = smallImageKey;
}
void discord_update_rich_presence(void) {