diff --git a/hyper.h b/hyper.h index e0a3cfc4..55695ff1 100644 --- a/hyper.h +++ b/hyper.h @@ -2498,13 +2498,11 @@ extern int startseed; extern transmatrix heptmove[MAX_EDGE], hexmove[MAX_EDGE]; extern transmatrix invheptmove[MAX_EDGE], invhexmove[MAX_EDGE]; -static const struct wstep_t { } wstep; -static const struct wmirror_t { } wmirror; +static const struct wstep_t { wstep_t() {} } wstep; +static const struct wmirror_t { wmirror_t() {}} wmirror; // heptspin hsstep(const heptspin &hs, int spin); -template - extern void fixmatrix(transmatrix&); void display(const transmatrix& T); transmatrix rgpushxto0(const hyperpoint& H); @@ -2551,9 +2549,11 @@ namespace texture { }; struct texture_data { - GLuint textureid = 0; + GLuint textureid; - int twidth = 2048; + int twidth; + + texture_data() { textureid = 0; twidth = 2048; } vector texture_pixels; @@ -2575,23 +2575,23 @@ namespace texture { }; struct texture_config { - string texturename = "textures/hyperrogue-texture.png"; - string configname = "textures/hyperrogue.txc"; - unsigned paint_color = 0x000000FF; + string texturename; + string configname; + unsigned paint_color; eTextureState tstate; eTextureState tstate_max; - transmatrix itt = Id; + transmatrix itt; - unsigned grid_color = 0; - unsigned mesh_color = 0; - unsigned master_color = 0xFFFFFF30; - unsigned slave_color = 0xFF000008; + unsigned grid_color; + unsigned mesh_color; + unsigned master_color; + unsigned slave_color; - int color_alpha = 128; - - int gsplits = 1; + int color_alpha; + int gsplits; + int recolor(int col); typedef tuple texture_parameters; @@ -2600,7 +2600,7 @@ namespace texture { map texture_map, texture_map_orig; set models; - bool texture_tuned = false; + bool texture_tuned; string texture_tuner; vector tuned_vertices; @@ -2622,6 +2622,22 @@ namespace texture { bool load(); texture_data data; + + texture_config() { + // argh, no member initialization in some of my compilers + texturename = "textures/hyperrogue-texture.png"; + configname = "textures/hyperrogue.txc"; + itt = Id; + paint_color = 0x000000FF; + grid_color = 0; + mesh_color = 0; + master_color = 0xFFFFFF30; + slave_color = 0xFF000008; + color_alpha = 128; + gsplits = 1; + texture_tuned = false; + } + }; extern texture_config config;