mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-25 06:00:54 +02:00
#15 fix nix/rpi compilation
This commit is contained in:
@@ -357,8 +357,8 @@ namespace Core {
|
|||||||
#define MAX_CACHED_LIGHTS 3
|
#define MAX_CACHED_LIGHTS 3
|
||||||
#define MAX_RENDER_BUFFERS 32
|
#define MAX_RENDER_BUFFERS 32
|
||||||
#define MAX_CONTACTS 15
|
#define MAX_CONTACTS 15
|
||||||
#define MAX_ANIM_TEX_RANGES 60
|
#define MAX_ANIM_TEX_RANGES 16
|
||||||
#define MAX_ANIM_TEX_OFFSETS 265
|
#define MAX_ANIM_TEX_OFFSETS 32
|
||||||
|
|
||||||
struct Shader;
|
struct Shader;
|
||||||
struct Texture;
|
struct Texture;
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
set -e
|
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
|
strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
set -e
|
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
|
strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note
|
||||||
|
10
src/utils.h
10
src/utils.h
@@ -1018,11 +1018,11 @@ struct Stream {
|
|||||||
char *name;
|
char *name;
|
||||||
int size, pos;
|
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))) {
|
if (contentDir[0] && (!cacheDir[0] || !strstr(name, cacheDir))) {
|
||||||
char path[255];
|
char path[255];
|
||||||
path[0] = 0;
|
path[0] = 0;
|
||||||
@@ -1112,7 +1112,7 @@ struct Stream {
|
|||||||
inline T& read(T &x) {
|
inline T& read(T &x) {
|
||||||
raw(&x, sizeof(x));
|
raw(&x, sizeof(x));
|
||||||
/*
|
/*
|
||||||
if (endian == BIG_ENDIAN) {
|
if (endian == eBig) {
|
||||||
if (sizeof(T) == 2) x = T(swap16(x));
|
if (sizeof(T) == 2) x = T(swap16(x));
|
||||||
if (sizeof(T) == 4) x = T(swap32(x));
|
if (sizeof(T) == 4) x = T(swap32(x));
|
||||||
}
|
}
|
||||||
@@ -1185,4 +1185,4 @@ namespace String {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user