diff --git a/assets/wooden_axe.png b/assets/wooden_axe.png index 09d6419..b89ec42 100644 Binary files a/assets/wooden_axe.png and b/assets/wooden_axe.png differ diff --git a/build-linux/MorriCraft b/build-linux/MorriCraft index 2bd2eea..e778226 100755 Binary files a/build-linux/MorriCraft and b/build-linux/MorriCraft differ diff --git a/build-linux/assets/wooden_axe.png b/build-linux/assets/wooden_axe.png index 09d6419..b89ec42 100644 Binary files a/build-linux/assets/wooden_axe.png and b/build-linux/assets/wooden_axe.png differ diff --git a/build-windows/MorriCraft.exe b/build-windows/MorriCraft.exe index 9f88d79..3f3d97d 100755 Binary files a/build-windows/MorriCraft.exe and b/build-windows/MorriCraft.exe differ diff --git a/build-windows/assets/wooden_axe.png b/build-windows/assets/wooden_axe.png index 09d6419..b89ec42 100644 Binary files a/build-windows/assets/wooden_axe.png and b/build-windows/assets/wooden_axe.png differ diff --git a/src/main.cpp b/src/main.cpp index 555c3bd..9b4f3dd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -786,7 +786,9 @@ int main(void) // Handle crossfading based on state static float crossfade = 0.0f; // 0.0 = title, 1.0 = gameplay - if (currentState == GAMEPLAY || currentState == PAUSE_MENU || currentState == CRAFTING_GUI) { + bool inGame = (currentState == GAMEPLAY || currentState == PAUSE_MENU || currentState == CRAFTING_GUI || (currentState == OPTIONS_MENU && optionsReturnState != MAIN_MENU)); + + if (inGame) { crossfade += 0.02f; if (crossfade > 1.0f) crossfade = 1.0f; } else { @@ -1093,8 +1095,8 @@ int main(void) DrawTexturePro(titleTexture, sourceRec, destRec, origin, 0.0f, WHITE); EndMode2D(); - // Show Version Number (v1.6.4) in Red - DrawTextEx(customFont, "v1.6.4", (Vector2){ (float)currentWidth - 140, (float)currentHeight - 40 }, 22, 1.0f, RED); + // Show Version Number (v1.6.5) in Red + DrawTextEx(customFont, "v1.6.5", (Vector2){ (float)currentWidth - 140, (float)currentHeight - 40 }, 22, 1.0f, RED); } Vector2 mousePos = GetMousePosition(); @@ -1533,9 +1535,14 @@ int main(void) float dayFactor = (sinf(sunAngle) + 1.0f) / 2.0f; // 0 (night) to 1 (day) + // Rapid Music Crossfade Logic + float quickMix = (dayFactor - 0.5f) * 5.0f + 0.5f; // Steeper transition centered at 0.5 + if (quickMix > 1.0f) quickMix = 1.0f; + if (quickMix < 0.0f) quickMix = 0.0f; + // Update Music Volumes based on time of day - SetMusicVolume(gameplayMusic, masterMusicVolume * crossfade * dayFactor); - SetMusicVolume(nightMusic, masterMusicVolume * crossfade * (1.0f - dayFactor)); + SetMusicVolume(gameplayMusic, masterMusicVolume * crossfade * quickMix); + SetMusicVolume(nightMusic, masterMusicVolume * crossfade * (1.0f - quickMix)); float lightLevel = 0.2f + 0.8f * dayFactor; // Ambient light multiplier Color blockTint = { (unsigned char)(255 * lightLevel), (unsigned char)(255 * lightLevel), (unsigned char)(255 * lightLevel), 255 };