diff --git a/src/gameplay/DeathMix.cpp b/src/gameplay/DeathMix.cpp index d408dfd7..080a7fce 100644 --- a/src/gameplay/DeathMix.cpp +++ b/src/gameplay/DeathMix.cpp @@ -22,21 +22,21 @@ DeathMix::DeathMix(const GBFS_FILE* fs, DifficultyLevel difficultyLevel) { this->fs = fs; this->difficultyLevel = difficultyLevel; - this->current = 0; + this->next = 0; this->total = librarySize; } SongChart DeathMix::getNextSongChart() { - if (current >= total) + if (next >= total) return SongChart{.song = NULL, .chart = NULL}; - Song* tempSong = SONG_parse(fs, songFiles[current].get()); + Song* tempSong = SONG_parse(fs, songFiles[next].get()); u8 index = SONG_findChartIndexByDifficultyLevel(tempSong, difficultyLevel); SONG_free(tempSong); - Song* song = SONG_parse(fs, songFiles[current].get(), std::vector{index}); + Song* song = SONG_parse(fs, songFiles[next].get(), std::vector{index}); Chart* chart = song->charts + index; - current++; + next++; return SongChart{.song = song, .chart = chart}; } diff --git a/src/gameplay/DeathMix.h b/src/gameplay/DeathMix.h index 49b8f8cf..143d47cc 100644 --- a/src/gameplay/DeathMix.h +++ b/src/gameplay/DeathMix.h @@ -29,14 +29,14 @@ class DeathMix { DeathMix(const GBFS_FILE* fs, DifficultyLevel difficultyLevel); - bool isInitialSong() { return current == 1; } + bool isInitialSong() { return next == 1; } SongChart getNextSongChart(); private: const GBFS_FILE* fs; DifficultyLevel difficultyLevel; std::vector> songFiles; - u32 current; + u32 next; u32 total; }; diff --git a/src/objects/base/InputHandler.h b/src/objects/base/InputHandler.h index 9bfbc728..31841ecd 100644 --- a/src/objects/base/InputHandler.h +++ b/src/objects/base/InputHandler.h @@ -33,7 +33,7 @@ class InputHandler { protected: bool isPressed = false; bool isNewPressEvent = false; - bool isNewReleaseEvent; + bool isNewReleaseEvent = false; bool handledFlag = false; bool isWaiting = false; };