mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-19 20:40:10 +00:00
Fix some unguarded bits of CAP_BT and CAP_CRYSTAL.
Found by trying to build with `-DISMINI=0`, not that that comes even close to working.
This commit is contained in:
parent
3e3457bd81
commit
36136dab6a
@ -9,11 +9,17 @@
|
|||||||
namespace hr {
|
namespace hr {
|
||||||
|
|
||||||
EX namespace bt {
|
EX namespace bt {
|
||||||
#if CAP_BT
|
|
||||||
|
|
||||||
/** note: nihsolv and kd3 tilings return bt::in(). They are defined elsewhere, although some of bt:: functions are used for them */
|
/** note: nihsolv and kd3 tilings return bt::in(). They are defined elsewhere, although some of bt:: functions are used for them */
|
||||||
EX bool in() { return cgflags & qBINARY; }
|
EX bool in() {
|
||||||
|
#if CAP_BT
|
||||||
|
return cgflags & qBINARY;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if CAP_BT
|
||||||
#if HDR
|
#if HDR
|
||||||
enum bindir {
|
enum bindir {
|
||||||
bd_right = 0,
|
bd_right = 0,
|
||||||
|
@ -433,16 +433,16 @@ hpcshape
|
|||||||
ld alpha;
|
ld alpha;
|
||||||
int area;
|
int area;
|
||||||
};
|
};
|
||||||
shared_ptr<gpdata_t> gpdata;
|
shared_ptr<gpdata_t> gpdata = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int state;
|
int state = 0;
|
||||||
int usershape_state;
|
int usershape_state = 0;
|
||||||
|
|
||||||
/** contains the texture point coordinates for 3D models */
|
/** contains the texture point coordinates for 3D models */
|
||||||
basic_textureinfo models_texture;
|
basic_textureinfo models_texture;
|
||||||
|
|
||||||
geometry_information() { last = NULL; state = usershape_state = 0; gpdata = NULL; }
|
geometry_information() { last = NULL; }
|
||||||
|
|
||||||
void require_basics() { if(state & 1) return; state |= 1; prepare_basics(); }
|
void require_basics() { if(state & 1) return; state |= 1; prepare_basics(); }
|
||||||
void require_shapes() { if(state & 2) return; state |= 2; prepare_shapes(); }
|
void require_shapes() { if(state & 2) return; state |= 2; prepare_shapes(); }
|
||||||
|
2
reg3.cpp
2
reg3.cpp
@ -282,6 +282,7 @@ EX namespace reg3 {
|
|||||||
return Id;
|
return Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CAP_CRYSTAL
|
||||||
int encode_coord(const crystal::coord& co) {
|
int encode_coord(const crystal::coord& co) {
|
||||||
int c = 0;
|
int c = 0;
|
||||||
for(int i=0; i<4; i++) c |= ((co[i]>>1) & 3) << (2*i);
|
for(int i=0; i<4; i++) c |= ((co[i]>>1) & 3) << (2*i);
|
||||||
@ -314,6 +315,7 @@ EX namespace reg3 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
struct hrmap_field3 : reg3::hrmap_quotient3 {
|
struct hrmap_field3 : reg3::hrmap_quotient3 {
|
||||||
|
|
||||||
|
@ -407,7 +407,6 @@ extern "C" {
|
|||||||
#define CAP_GLEW (CAP_GL && !ISMOBILE && !ISMAC && !ISLINUX && !ISWEB)
|
#define CAP_GLEW (CAP_GL && !ISMOBILE && !ISMAC && !ISLINUX && !ISWEB)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CAP_GL
|
|
||||||
#if CAP_GLEW
|
#if CAP_GLEW
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
#else
|
#else
|
||||||
@ -429,7 +428,6 @@ extern "C" {
|
|||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user