Skip to content

Commit

Permalink
FIX: Making the new challenge more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
afska committed Jan 9, 2024
1 parent 77672f6 commit d06aa17
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
3 changes: 2 additions & 1 deletion src/gameplay/save/State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ void STATE_setup(Song* song, Chart* chart) {
}

#ifdef SENV_DEVELOPMENT
if (gameMode == GameMode::DEATH_MIX)
if (gameMode == GameMode::DEATH_MIX) {
GameState.mods.stageBreak = ((~REG_KEYS & KEY_ANY) & KEY_SELECT)
? StageBreakOpts::sON
: StageBreakOpts::sOFF;
}
#endif

GameState.positionX[0] =
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/AdminScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "scenes/StartScene.h"
#include "utils/SceneUtils.h"

#define TITLE "ADMIN MENU (v1.8.0)"
#define TITLE "ADMIN MENU (v1.8.1)"
#define SUBMENU_OFFSETS 0
#define SUBMENU_RESET 1
#define SUBMENU_SURE_OFFSETS 2
Expand Down
38 changes: 24 additions & 14 deletions src/scenes/SongScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const u32 LIFEBAR_TILE_END = 15;
const u32 RUMBLE_FRAMES = 4;
const u32 RUMBLE_PRELOAD_FRAMES = 2;
const u32 RUMBLE_IDLE_FREQUENCY = 5;
const u32 DEATH_MIX_ANTICIPATION_LEVEL = 5;
const u32 DEATH_MIX_ANTICIPATION_LEVEL = 6;
const u32 DEATH_MIX_SEEK_SPEED_FRAMES = 5;
const u32 BOUNCE_STEPS[] = {0, 1, 2, 4, 6,
8, 10, 7, 3, 0}; // <~>ALPHA_BLINK_LEVEL

Expand Down Expand Up @@ -290,38 +291,47 @@ bool SongScene::initializeGame(u16 keys) {
if (GameState.mods.autoMod)
backupPalettes(
[](u32 progress) { EFFECT_setMosaic(max(MAX_MOSAIC - progress, 0)); });
player_play(song->audioPath.c_str());
processModsLoad();

initialized:
if (deathMix != NULL) {
if (!deathMix->didStartScroll) {
if (!deathMix->isInitialSong()) {
scores[0]->setLife(deathMix->life);
scores[0]->getCombo()->setValue(deathMix->combo);
scores[0]->setHasMissCombo(deathMix->hasMissCombo);
scores[0]->setHalfLifeBonus(deathMix->halfLifeBonus);
scores[0]->setMaxCombo(deathMix->maxCombo);
scores[0]->setCounters(deathMix->counters);
scores[0]->setPoints(deathMix->points);
scores[0]->setLongNotes(deathMix->longNotes);
lifeBars[0]->tick(foregroundPalette.get());
}

arrowPool->turnOff();
chartReaders[0]->turnOffObjectPools();

player_seek(song->sampleStart);
GameState.mods.speedHack = SpeedHackOpts::hAUTO_VELOCITY;
chartReaders[0]->setMultiplier(DEATH_MIX_ANTICIPATION_LEVEL);
for (u32 t = 0; t < song->sampleStart;
t += FRAME_MS * DEATH_MIX_SEEK_SPEED_FRAMES)
chartReaders[0]->update(t);
chartReaders[0]->update(song->sampleStart);
GameState.mods.speedHack = SpeedHackOpts::hOFF;

deathMix->didStartScroll = true;
return false;
} else {
arrowPool->turnOn();
chartReaders[0]->turnOnObjectPools();
chartReaders[0]->setMultiplier(deathMix->multiplier);

if (!deathMix->isInitialSong()) {
scores[0]->setLife(deathMix->life);
scores[0]->getCombo()->setValue(deathMix->combo);
scores[0]->setHasMissCombo(deathMix->hasMissCombo);
scores[0]->setHalfLifeBonus(deathMix->halfLifeBonus);
scores[0]->setMaxCombo(deathMix->maxCombo);
scores[0]->setCounters(deathMix->counters);
scores[0]->setPoints(deathMix->points);
scores[0]->setLongNotes(deathMix->longNotes);
}
}
}

player_play(song->audioPath.c_str());
if (deathMix != NULL)
player_seek(song->sampleStart);

if (!IS_STORY(SAVEFILE_getGameMode()) && (keys & KEY_START) &&
(keys & KEY_SELECT)) {
// (if START and SELECT are pressed on start, the chart will be marked as
Expand Down

0 comments on commit d06aa17

Please sign in to comment.