From 0941411ffc89626a8e4e2ce57fbc4edbca7cd093 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 6 Apr 2018 00:33:03 +0200 Subject: [PATCH] .. to last commit --- pattern2.cpp | 2 +- polygons.cpp | 14 +------------- shaders.cpp | 42 +----------------------------------------- whirl.cpp | 1 - 4 files changed, 3 insertions(+), 56 deletions(-) diff --git a/pattern2.cpp b/pattern2.cpp index 243d9dc3..85405fe7 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -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); if(!c2) return 0; return neighborId(c, c2); diff --git a/polygons.cpp b/polygons.cpp index 5639d6da..a3304be1 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -41,11 +41,6 @@ double minwidth_global; extern long double polydata[]; -struct hpcshape { - int s, e, prio; - int flags; - }; - hpcshape *last = NULL; vector ptds; @@ -2413,13 +2408,6 @@ void queuepolyb(const transmatrix& V, const hpcshape& h, int col, int b) { queuepolyat(V,h,col,h.prio+b); } -struct qfloorinfo { - bool special; - transmatrix spin; - const hpcshape *shape; - textureinfo *tinf; - }; - qfloorinfo qfi; 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; } -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(); ptd.kind = pkString; ptd.u.chr.x = x; diff --git a/shaders.cpp b/shaders.cpp index 798a34a2..41d71e6c 100644 --- a/shaders.cpp +++ b/shaders.cpp @@ -42,14 +42,6 @@ eMode mode; 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) { for(int i=0; i<4; i++) { for(int j=0; j<4; j++) @@ -306,7 +298,7 @@ void id_modelview() { #endif -void color2(int color, ld part = 1) { +void color2(int color, ld part) { unsigned char *c = (unsigned char*) (&color); GLfloat cols[4]; 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; } -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 template void bindbuffer(T& v) { if(current_vertices == buffered_vertices || current_vertices == nullptr) { diff --git a/whirl.cpp b/whirl.cpp index 0a9a76d3..535e1343 100644 --- a/whirl.cpp +++ b/whirl.cpp @@ -1,6 +1,5 @@ namespace whirl { bool whirl; - typedef pair loc; loc param(1, 0); hyperpoint next;