mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-01 17:32:51 +00:00
.. to last commit
This commit is contained in:
parent
66a2f41cd6
commit
0941411ffc
@ -458,7 +458,7 @@ namespace patterns {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int downdir(cell *c, cellfunction *cf = coastvalEdge) {
|
int downdir(cell *c, cellfunction *cf) {
|
||||||
cell *c2 = chosenDown(c, 1, 1, cf);
|
cell *c2 = chosenDown(c, 1, 1, cf);
|
||||||
if(!c2) return 0;
|
if(!c2) return 0;
|
||||||
return neighborId(c, c2);
|
return neighborId(c, c2);
|
||||||
|
14
polygons.cpp
14
polygons.cpp
@ -41,11 +41,6 @@ double minwidth_global;
|
|||||||
|
|
||||||
extern long double polydata[];
|
extern long double polydata[];
|
||||||
|
|
||||||
struct hpcshape {
|
|
||||||
int s, e, prio;
|
|
||||||
int flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
hpcshape *last = NULL;
|
hpcshape *last = NULL;
|
||||||
|
|
||||||
vector<polytodraw> ptds;
|
vector<polytodraw> ptds;
|
||||||
@ -2413,13 +2408,6 @@ void queuepolyb(const transmatrix& V, const hpcshape& h, int col, int b) {
|
|||||||
queuepolyat(V,h,col,h.prio+b);
|
queuepolyat(V,h,col,h.prio+b);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct qfloorinfo {
|
|
||||||
bool special;
|
|
||||||
transmatrix spin;
|
|
||||||
const hpcshape *shape;
|
|
||||||
textureinfo *tinf;
|
|
||||||
};
|
|
||||||
|
|
||||||
qfloorinfo qfi;
|
qfloorinfo qfi;
|
||||||
qfloorinfo qfi_dc;
|
qfloorinfo qfi_dc;
|
||||||
|
|
||||||
@ -2509,7 +2497,7 @@ void queuestr(int x, int y, int shift, int size, string str, int col, int frame
|
|||||||
ptd.prio = PPR_TEXT << PSHIFT;
|
ptd.prio = PPR_TEXT << PSHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void queuechr(int x, int y, int shift, int size, char chr, int col, int frame = 0, int align = 8) {
|
void queuechr(int x, int y, int shift, int size, char chr, int col, int frame, int align) {
|
||||||
polytodraw& ptd = nextptd();
|
polytodraw& ptd = nextptd();
|
||||||
ptd.kind = pkString;
|
ptd.kind = pkString;
|
||||||
ptd.u.chr.x = x;
|
ptd.u.chr.x = x;
|
||||||
|
42
shaders.cpp
42
shaders.cpp
@ -42,14 +42,6 @@ eMode mode;
|
|||||||
|
|
||||||
void switch_mode(eMode m);
|
void switch_mode(eMode m);
|
||||||
|
|
||||||
struct glmatrix {
|
|
||||||
GLfloat a[4][4];
|
|
||||||
GLfloat* operator[] (int i) { return a[i]; }
|
|
||||||
const GLfloat* operator[] (int i) const { return a[i]; }
|
|
||||||
GLfloat* as_array() { return a[0]; }
|
|
||||||
const GLfloat* as_array() const { return a[0]; }
|
|
||||||
};
|
|
||||||
|
|
||||||
void display(const glmatrix& m) {
|
void display(const glmatrix& m) {
|
||||||
for(int i=0; i<4; i++) {
|
for(int i=0; i<4; i++) {
|
||||||
for(int j=0; j<4; j++)
|
for(int j=0; j<4; j++)
|
||||||
@ -306,7 +298,7 @@ void id_modelview() {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void color2(int color, ld part = 1) {
|
void color2(int color, ld part) {
|
||||||
unsigned char *c = (unsigned char*) (&color);
|
unsigned char *c = (unsigned char*) (&color);
|
||||||
GLfloat cols[4];
|
GLfloat cols[4];
|
||||||
for(int i=0; i<4; i++) cols[i] = c[3-i] / 255.0 * part;
|
for(int i=0; i<4; i++) cols[i] = c[3-i] / 255.0 * part;
|
||||||
@ -516,38 +508,6 @@ glvertex pointtogl(const hyperpoint& t) {
|
|||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct colored_vertex {
|
|
||||||
glvec3 coords;
|
|
||||||
glvec4 color;
|
|
||||||
colored_vertex(GLfloat x, GLfloat y, GLfloat r, GLfloat g, GLfloat b) {
|
|
||||||
coords[0] = x;
|
|
||||||
coords[1] = y;
|
|
||||||
coords[2] = stereo::scrdist;
|
|
||||||
color[0] = r;
|
|
||||||
color[1] = g;
|
|
||||||
color[2] = b;
|
|
||||||
color[3] = 1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct textured_vertex {
|
|
||||||
glvec3 coords;
|
|
||||||
glvec3 texture;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ct_vertex {
|
|
||||||
glvec3 coords;
|
|
||||||
glvec4 color;
|
|
||||||
glvec3 texture;
|
|
||||||
ct_vertex(const hyperpoint& h, ld x1, ld y1, ld col) {
|
|
||||||
coords = pointtogl(h);
|
|
||||||
texture[0] = x1;
|
|
||||||
texture[1] = y1;
|
|
||||||
color[0] = color[1] = color[2] = col;
|
|
||||||
color[3] = 1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#if CAP_VERTEXBUFFER
|
#if CAP_VERTEXBUFFER
|
||||||
template<class T> void bindbuffer(T& v) {
|
template<class T> void bindbuffer(T& v) {
|
||||||
if(current_vertices == buffered_vertices || current_vertices == nullptr) {
|
if(current_vertices == buffered_vertices || current_vertices == nullptr) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user