1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

fixes for older compilers

This commit is contained in:
Zeno Rogue 2019-07-28 12:24:23 +02:00
parent f6c0bf0304
commit 2f804e9f1e
3 changed files with 6 additions and 6 deletions

View File

@ -284,9 +284,9 @@ void display_data::set_projection(int ed) {
for(int z=0; z<PRECZ; z++) for(int z=0; z<PRECZ; z++)
for(int y=0; y<PRECX; y++) for(int y=0; y<PRECX; y++)
for(int x=0; x<PRECX; x++) for(int x=0; x<PRECX; x++)
xbuffer[z][y][x] = glvertex({inverse_exp_table[z][y][x][0], inverse_exp_table[z][y][x][1], inverse_exp_table[z][y][x][2], 1}); xbuffer[z][y][x] = glhr::makevertex(inverse_exp_table[z][y][x][0], inverse_exp_table[z][y][x][1], inverse_exp_table[z][y][x][2]);
glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA32F, PRECX, PRECX, PRECZ, 0, GL_RGBA, GL_FLOAT, xbuffer); glTexImage3D(GL_TEXTURE_3D, 0, 34836 /*GL_RGBA32F*/, PRECX, PRECX, PRECZ, 0, GL_RGBA, GL_FLOAT, xbuffer);
delete xbuffer; delete xbuffer;
} }

View File

@ -223,7 +223,7 @@ struct hrmap_kite : hrmap {
map<int, transmatrix> graphrules; map<int, transmatrix> graphrules;
auto encode(pshape s0, int d0, pshape s1, int d1) { int encode(pshape s0, int d0, pshape s1, int d1) {
return d0 + d1 * 16 + s0 * 256 + s1 * 512; return d0 + d1 * 16 + s0 * 256 + s1 * 512;
} }
@ -289,7 +289,7 @@ struct hrmap_kite : hrmap {
auto c1 = c->cmove(dir); auto c1 = c->cmove(dir);
auto code = encode(getshape(c->master), dir, getshape(c1->master), c->c.spin(dir)); auto code = encode(getshape(c->master), dir, getshape(c1->master), c->c.spin(dir));
if(!graphrules.count(code)) { if(!graphrules.count(code)) {
println(hlog, "rule missing: ", tuple(getshape(c->master), dir, getshape(c1->master), c->c.spin(dir))); println(hlog, "rule missing: ", make_tuple(getshape(c->master), dir, getshape(c1->master), c->c.spin(dir)));
throw 0; throw 0;
} }
return graphrules[code]; return graphrules[code];

View File

@ -14,8 +14,8 @@ namespace solv {
const ld SXY = 32.; const ld SXY = 32.;
const ld SZ = 8.; const ld SZ = 8.;
using pt = hyperpoint; typedef hyperpoint pt;
using ptlow = array<float, 3>; typedef array<float, 3> ptlow;
ptlow inverse_exp_table[PRECZ][PRECX][PRECX]; ptlow inverse_exp_table[PRECZ][PRECX][PRECX];