diff --git a/src/core.h b/src/core.h index 5948df7..9b487a9 100644 --- a/src/core.h +++ b/src/core.h @@ -357,8 +357,8 @@ namespace Core { #define MAX_CACHED_LIGHTS 3 #define MAX_RENDER_BUFFERS 32 #define MAX_CONTACTS 15 -#define MAX_ANIM_TEX_RANGES 60 -#define MAX_ANIM_TEX_OFFSETS 265 +#define MAX_ANIM_TEX_RANGES 16 +#define MAX_ANIM_TEX_OFFSETS 32 struct Shader; struct Texture; diff --git a/src/platform/nix/build.sh b/src/platform/nix/build.sh index 000092d..a3dabf0 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 -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 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 diff --git a/src/platform/rpi/build.sh b/src/platform/rpi/build.sh index 75c582f..f518ddc 100755 --- a/src/platform/rpi/build.sh +++ b/src/platform/rpi/build.sh @@ -1,3 +1,3 @@ set -e -clang++ -std=c++11 -Os -s -g -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__RPI__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c -I/opt/vc/include -I../../ -o../../../bin/OpenLara -L/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lX11 -lm -lrt -lpthread -lasound -lbcm_host -ludev +clang++ -std=c++11 -Os -s -g -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__RPI__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I/opt/vc/include -I../../ -o../../../bin/OpenLara -L/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lX11 -lm -lrt -lpthread -lasound -lbcm_host -ludev strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note diff --git a/src/utils.h b/src/utils.h index 95fe579..1d570ba 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1018,11 +1018,11 @@ struct Stream { char *name; int size, pos; - enum Endian { LITTLE_ENDIAN, BIG_ENDIAN } endian; + enum Endian { eLittle, eBig } endian; - Stream(const void *data, int size) : callback(NULL), userData(NULL), f(NULL), data((char*)data), name(NULL), size(size), pos(0), endian(LITTLE_ENDIAN) {} + Stream(const void *data, int size) : callback(NULL), userData(NULL), f(NULL), data((char*)data), name(NULL), size(size), pos(0), endian(eLittle) {} - Stream(const char *name, Callback *callback = NULL, void *userData = NULL) : callback(callback), userData(userData), data(NULL), name(NULL), size(-1), pos(0), endian(LITTLE_ENDIAN) { + Stream(const char *name, Callback *callback = NULL, void *userData = NULL) : callback(callback), userData(userData), data(NULL), name(NULL), size(-1), pos(0), endian(eLittle) { if (contentDir[0] && (!cacheDir[0] || !strstr(name, cacheDir))) { char path[255]; path[0] = 0; @@ -1112,7 +1112,7 @@ struct Stream { inline T& read(T &x) { raw(&x, sizeof(x)); /* - if (endian == BIG_ENDIAN) { + if (endian == eBig) { if (sizeof(T) == 2) x = T(swap16(x)); if (sizeof(T) == 4) x = T(swap32(x)); } @@ -1185,4 +1185,4 @@ namespace String { } -#endif \ No newline at end of file +#endif