diff --git a/src/gameflow.h b/src/gameflow.h index 2832611..d8ef555 100644 --- a/src/gameflow.h +++ b/src/gameflow.h @@ -457,8 +457,8 @@ namespace TR { case VER_TR2 : return LVL_TR2_ASSAULT; case VER_TR3 : return LVL_TR3_HOUSE; } - return LVL_TR1_TITLE; ASSERT(false); + return LVL_MAX; } LevelID getStartId(Version version) { @@ -467,8 +467,8 @@ namespace TR { case VER_TR2 : return LVL_TR2_WALL; case VER_TR3 : return LVL_TR3_JUNGLE; } - return LVL_MAX; ASSERT(false); + return LVL_MAX; } LevelID getEndId(Version version) { @@ -477,8 +477,8 @@ namespace TR { case VER_TR2 : return LVL_TR2_HOUSE; case VER_TR3 : return LVL_TR3_CHAMBER; } - return LVL_MAX; ASSERT(false); + return LVL_MAX; } bool isCutsceneLevel(LevelID id) { @@ -546,7 +546,7 @@ namespace TR { } } else { strcpy(dst, "level/"); - if (version & VER_TR1) strcat(dst, "1/"); + if ((version & VER_TR1) || version == VER_UNKNOWN) strcat(dst, "1/"); if (version & VER_TR2) strcat(dst, "2/"); if (version & VER_TR3) strcat(dst, "3/"); strcat(dst, LEVEL_INFO[id].name); diff --git a/src/platform/nix/build.sh b/src/platform/nix/build.sh index a3dabf0..f84633e 100755 --- a/src/platform/nix/build.sh +++ b/src/platform/nix/build.sh @@ -1,3 +1,3 @@ set -e -clang++ -std=c++11 -Os -s -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I../../ -o../../../bin/OpenLara -lX11 -lGL -lm -lpthread -lpulse-simple -lpulse +clang++ -std=c++11 -Os -s -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I../../ -o../../../bin/OpenLara -lX11 -lGL -lm -lpthread -lpulse-simple -lpulse strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note