Skip to content

Commit 24acfbe

Browse files
Merge pull request #2892 from AlmostSeagull/fix-tempo-rary-issue
Fix tempo rary issue
2 parents 505fc87 + a7a97a3 commit 24acfbe

File tree

4 files changed

+218
-217
lines changed

4 files changed

+218
-217
lines changed

base-hack/src/misc/music_text.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ void SpeedUpMusic(void) {
7272
// Checking items
7373
if (win_con == GOAL_KROOL) {
7474
win_con_item = REQITEM_KEY;
75-
win_con_count = 9; // Triggers upon picking up key 8
75+
win_con_count = 9; // Triggers upon picking up the 8th key
7676
} else if (win_con != GOAL_CUSTOMITEM) {
77-
// Goal is inelligible for speed up
77+
// Goal is ineligible for speed up
7878
return;
7979
}
8080
if (win_con_count < 2) {
@@ -90,10 +90,11 @@ void SpeedUpMusic(void) {
9090
songs song = SongInWriteSlot[i];
9191
if ((music_types[song] == SONGTYPE_BGM) && (song != SONG_BABOONBALLOON)) {
9292
int existing_tempo = getSongTempo(compactSequencePlayers[i]);
93-
float tempo = musicStorage[i]->division * compactSequencePlayers[i]->uspt;
94-
float targ_tempo = tempo / 1.5f;
95-
if (existing_tempo != targ_tempo) {
96-
alCSPSetTempo(compactSequencePlayers[i], targ_tempo);
93+
float current_inverse_division = compactSequencePlayers[i]->target->qnpt;
94+
float target_inverse_division = (1.0f / musicStorage[i]->division / 1.5f);
95+
if (current_inverse_division != target_inverse_division) {
96+
compactSequencePlayers[i]->target->qnpt = target_inverse_division;
97+
alCSPSetTempo(compactSequencePlayers[i], existing_tempo);
9798
}
9899
}
99100
}

randomizer/Patching/ApplyLocal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ async def patching_response(data, from_patch_gen=False, lanky_from_history=False
293293
BooleanProperties(settings.camera_is_follow, 0xCB), # Free/Follow Cam
294294
BooleanProperties(settings.camera_is_not_inverted, 0xCC), # Inverted/Non-Inverted Camera
295295
BooleanProperties(settings.fps_display, 0x96), # FPS Display
296-
# BooleanProperties(settings.song_speed_near_win, 0x1B4), # Song Win Con Speedup
296+
BooleanProperties(settings.song_speed_near_win, 0x1B4), # Song Win Con Speedup
297297
BooleanProperties(settings.disable_flavor_text, 0xAF), # Disable Flavor Text
298298
BooleanProperties(settings.rainbow_ammo, 0x112), # Rainbow Ammo
299299
]

static/patches/shrink-dk64.bps

-29 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)