diff --git a/README.md b/README.md index 311c007..7149434 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,11 @@ MorriCraft is a high-performance voxel engine built with C++ and Raylib. It feat ## Version History -### v2.1.1 - Interface Isolation (Latest) -* **Menu Collision Fix**: Resolved a state conflict where the Direct Connect menu would draw over the Skin Editor. -* **State Hardening**: Correctly isolated all menu drawing blocks to prevent visual "hijacking" of new interfaces. +### v2.1.3 - Stability & Audio Fallback (Latest) +* **Linux Stability Fix**: Resolved a critical PulseAudio crash caused by double audio device initialization. +* **Procedural Hit Sound**: Implemented a synthesized audio fallback for the hit effect to ensure combat feedback always works. + +### v2.1.2 - Combat Update ### v2.1.0 - Personalization & Stability * **Integrated Skin Editor**: Personalize your shirt and pants colors directly from the Options menu. diff --git a/build-linux/MorriCraft b/build-linux/MorriCraft index c50c877..c568338 100755 Binary files a/build-linux/MorriCraft and b/build-linux/MorriCraft differ diff --git a/build-linux/assets/version.txt b/build-linux/assets/version.txt index 826e142..535b2f4 100644 --- a/build-linux/assets/version.txt +++ b/build-linux/assets/version.txt @@ -1 +1 @@ -v2.1.1 +v2.1.3 diff --git a/build-windows/MorriCraft.exe b/build-windows/MorriCraft.exe index 76468f5..9b16251 100755 Binary files a/build-windows/MorriCraft.exe and b/build-windows/MorriCraft.exe differ diff --git a/build-windows/assets/version.txt b/build-windows/assets/version.txt index 826e142..535b2f4 100644 --- a/build-windows/assets/version.txt +++ b/build-windows/assets/version.txt @@ -1 +1 @@ -v2.1.1 +v2.1.3 diff --git a/src/main.cpp b/src/main.cpp index fb6771b..de16d3e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -783,12 +783,24 @@ int main(void) // By default, windows have minimize, maximize, and close buttons on the top bar. SetConfigFlags(FLAG_WINDOW_RESIZABLE | FLAG_VSYNC_HINT); - InitWindow(screenWidth, screenHeight, "MorriCraft v2.1.2"); + InitWindow(screenWidth, screenHeight, "MorriCraft v2.1.3"); LoadConfig(); SetExitKey(KEY_NULL); // Prevent ESC from closing the window // Initialize audio device InitAudioDevice(); + + hitSound = LoadSound("assets/hit.wav"); + if (hitSound.frameCount == 0) { + // Procedural fallback if asset missing + Wave w = { 0 }; + w.frameCount = 4410; w.sampleRate = 44100; w.sampleSize = 16; w.channels = 1; + w.data = RL_MALLOC(w.frameCount * 2); + short* d = (short*)w.data; + for(int i=0; i