mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
Remove extraneous semicolons to quiet pedantic GCC warnings.
This commit is contained in:
parent
14d2237c01
commit
a0da10b408
@ -964,7 +964,7 @@ EX void achievement_display() {
|
|||||||
|
|
||||||
EX bool isAscending(int i) {
|
EX bool isAscending(int i) {
|
||||||
return i == 13 || i == 14 || i == 15 || i == 16 || i == 29 || i == 30 || i == 45;
|
return i == 13 || i == 14 || i == 15 || i == 16 || i == 29 || i == 30 || i == 45;
|
||||||
};
|
}
|
||||||
|
|
||||||
EX int score_default(int i) {
|
EX int score_default(int i) {
|
||||||
if(isAscending(i)) return 1999999999;
|
if(isAscending(i)) return 1999999999;
|
||||||
|
@ -1144,7 +1144,7 @@ function<void()> setcanvas(char c) {
|
|||||||
patterns::whichCanvas = c;
|
patterns::whichCanvas = c;
|
||||||
start_game();
|
start_game();
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
EX void show() {
|
EX void show() {
|
||||||
if(lastsample < isize(samples)) {
|
if(lastsample < isize(samples)) {
|
||||||
|
@ -931,7 +931,7 @@ namespace mf {
|
|||||||
|
|
||||||
static const flagtype band = (cylindrical | pseudocylindrical | uses_bandshift);
|
static const flagtype band = (cylindrical | pseudocylindrical | uses_bandshift);
|
||||||
static const flagtype pseudoband = (pseudocylindrical | uses_bandshift);
|
static const flagtype pseudoband = (pseudocylindrical | uses_bandshift);
|
||||||
};
|
}
|
||||||
|
|
||||||
struct modelinfo {
|
struct modelinfo {
|
||||||
const char *name_hyperbolic;
|
const char *name_hyperbolic;
|
||||||
|
@ -37,7 +37,7 @@ EX namespace dialog {
|
|||||||
bool positive;
|
bool positive;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline ld identity_f(ld x) { return x; };
|
static inline ld identity_f(ld x) { return x; }
|
||||||
|
|
||||||
const static scaler identity = {identity_f, identity_f, false};
|
const static scaler identity = {identity_f, identity_f, false};
|
||||||
const static scaler logarithmic = {log, exp, true};
|
const static scaler logarithmic = {log, exp, true};
|
||||||
@ -100,7 +100,7 @@ EX namespace dialog {
|
|||||||
if(clicked) hr::displayfr(x * zoomf + shiftx, y * zoomf + shifty, b, size * zoomf, s, hicolor, align);
|
if(clicked) hr::displayfr(x * zoomf + shiftx, y * zoomf + shifty, b, size * zoomf, s, hicolor, align);
|
||||||
return clicked;
|
return clicked;
|
||||||
}
|
}
|
||||||
EX };
|
EX }
|
||||||
|
|
||||||
#if CAP_MENUSCALING && CAP_SDL
|
#if CAP_MENUSCALING && CAP_SDL
|
||||||
EX void handleZooming(SDL_Event &ev) {
|
EX void handleZooming(SDL_Event &ev) {
|
||||||
@ -142,7 +142,7 @@ EX namespace dialog {
|
|||||||
EX void handler(int sym, int uni) {
|
EX void handler(int sym, int uni) {
|
||||||
dialog::handleNavigation(sym, uni);
|
dialog::handleNavigation(sym, uni);
|
||||||
if(doexiton(sym, uni)) popScreen();
|
if(doexiton(sym, uni)) popScreen();
|
||||||
};
|
}
|
||||||
|
|
||||||
EX void init() {
|
EX void init() {
|
||||||
items.clear();
|
items.clear();
|
||||||
@ -1268,6 +1268,6 @@ EX namespace dialog {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -459,7 +459,7 @@ EX namespace euc {
|
|||||||
cat += val * main_axes[i];
|
cat += val * main_axes[i];
|
||||||
}
|
}
|
||||||
return cat;
|
return cat;
|
||||||
};
|
}
|
||||||
|
|
||||||
EX bool valid_third_turn(const intmatrix& m) {
|
EX bool valid_third_turn(const intmatrix& m) {
|
||||||
if(m[0][2] != -m[0][0]-m[0][1]) return false;
|
if(m[0][2] != -m[0][0]-m[0][1]) return false;
|
||||||
@ -630,7 +630,7 @@ EX namespace euc {
|
|||||||
int diagonal_cross(const coord& a, const coord& b) {
|
int diagonal_cross(const coord& a, const coord& b) {
|
||||||
return a[0]*b[1] + a[1]*b[2] + a[2]*b[0]
|
return a[0]*b[1] + a[1]*b[2] + a[2]*b[0]
|
||||||
- b[0]*a[1] - b[1]*a[2] - b[2]*a[0];
|
- b[0]*a[1] - b[1]*a[2] - b[2]*a[0];
|
||||||
};
|
}
|
||||||
|
|
||||||
void torus_config_full::canonicalize(coord& x, coord& d, transmatrix& M, bool& mirr) {
|
void torus_config_full::canonicalize(coord& x, coord& d, transmatrix& M, bool& mirr) {
|
||||||
if(!twisted) {
|
if(!twisted) {
|
||||||
|
@ -483,7 +483,7 @@ EX namespace tortoise {
|
|||||||
|
|
||||||
return gradient(0x487830, mcol, 0, dd, 0xFF);
|
return gradient(0x487830, mcol, 0, dd, 0xFF);
|
||||||
}
|
}
|
||||||
EX };
|
EX }
|
||||||
|
|
||||||
double footfun(double d) {
|
double footfun(double d) {
|
||||||
d -= floor(d);
|
d -= floor(d);
|
||||||
@ -5019,7 +5019,7 @@ namespace sm {
|
|||||||
static const int DIALOG_STRICT_X = 32768; // do not interpret dialog clicks outside of the X region
|
static const int DIALOG_STRICT_X = 32768; // do not interpret dialog clicks outside of the X region
|
||||||
static const int EXPANSION = (1<<16);
|
static const int EXPANSION = (1<<16);
|
||||||
static const int HEXEDIT = (1<<17);
|
static const int HEXEDIT = (1<<17);
|
||||||
};
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EX int cmode;
|
EX int cmode;
|
||||||
|
4
help.cpp
4
help.cpp
@ -755,11 +755,11 @@ void gotoHelpFor(eItem i) {
|
|||||||
|
|
||||||
void gotoHelpFor(eWall w) {
|
void gotoHelpFor(eWall w) {
|
||||||
help = generateHelpForWall(w);
|
help = generateHelpForWall(w);
|
||||||
};
|
}
|
||||||
|
|
||||||
void gotoHelpFor(eMonster m) {
|
void gotoHelpFor(eMonster m) {
|
||||||
help = generateHelpForMonster(m);
|
help = generateHelpForMonster(m);
|
||||||
};
|
}
|
||||||
|
|
||||||
EX void appendHelp(string s) {
|
EX void appendHelp(string s) {
|
||||||
auto h = helpgenerator;
|
auto h = helpgenerator;
|
||||||
|
@ -307,7 +307,7 @@ hyperpoint compute_hybrid(hyperpoint H, int rootid) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
EX ld signed_sqrt(ld x) { return x > 0 ? sqrt(x) : -sqrt(-x); };
|
EX ld signed_sqrt(ld x) { return x > 0 ? sqrt(x) : -sqrt(-x); }
|
||||||
|
|
||||||
EX void applymodel(hyperpoint H, hyperpoint& ret) {
|
EX void applymodel(hyperpoint H, hyperpoint& ret) {
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ namespace lv {
|
|||||||
static const flagtype appears_in_ptm = 8;
|
static const flagtype appears_in_ptm = 8;
|
||||||
static const flagtype display_in_help = 16;
|
static const flagtype display_in_help = 16;
|
||||||
static const flagtype one_and_half = 32;
|
static const flagtype one_and_half = 32;
|
||||||
};
|
}
|
||||||
|
|
||||||
struct land_validity_t {
|
struct land_validity_t {
|
||||||
int quality_level; // 0 (dont show), 1 (1/2), 2 (ok), 3(1!)
|
int quality_level; // 0 (dont show), 1 (1/2), 2 (ok), 3(1!)
|
||||||
|
@ -325,7 +325,7 @@ int main() {
|
|||||||
printf("#define NUMEXTRA %d\n", isize(vchars));
|
printf("#define NUMEXTRA %d\n", isize(vchars));
|
||||||
printf("#define NATCHARS {");
|
printf("#define NATCHARS {");
|
||||||
for(auto&& elt : vchars) printf("\"%s\",", elt.c_str());
|
for(auto&& elt : vchars) printf("\"%s\",", elt.c_str());
|
||||||
printf("};\n");
|
printf("}\n");
|
||||||
printf("extern const char* natchars[NUMEXTRA];\n");
|
printf("extern const char* natchars[NUMEXTRA];\n");
|
||||||
printf("#endif\n");
|
printf("#endif\n");
|
||||||
printf("#endif\n");
|
printf("#endif\n");
|
||||||
|
@ -2141,7 +2141,7 @@ namespace mapeditor {
|
|||||||
addHook(hooks_removecells, 0, [] () {
|
addHook(hooks_removecells, 0, [] () {
|
||||||
modelcell.clear();
|
modelcell.clear();
|
||||||
set_if_removed(mapeditor::copysource.at, NULL);
|
set_if_removed(mapeditor::copysource.at, NULL);
|
||||||
});;;
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EX void initdraw(cell *c) {
|
EX void initdraw(cell *c) {
|
||||||
|
@ -2889,7 +2889,7 @@ EX namespace linepatterns {
|
|||||||
dialog::display();
|
dialog::display();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
int val46(cell *c) {
|
int val46(cell *c) {
|
||||||
patterns::patterninfo si;
|
patterns::patterninfo si;
|
||||||
|
@ -136,7 +136,7 @@ struct raycaster : glhr::GLprogram {
|
|||||||
|
|
||||||
shared_ptr<raycaster> our_raycaster;
|
shared_ptr<raycaster> our_raycaster;
|
||||||
|
|
||||||
EX void reset_raycaster() { our_raycaster = nullptr; };
|
EX void reset_raycaster() { our_raycaster = nullptr; }
|
||||||
|
|
||||||
int deg;
|
int deg;
|
||||||
|
|
||||||
@ -846,7 +846,7 @@ array<float, 2> enc(int i, int a) {
|
|||||||
res[0] = ((i%per_row) * deg + a + .5) / length;
|
res[0] = ((i%per_row) * deg + a + .5) / length;
|
||||||
res[1] = ((i / per_row) + .5) / rows;
|
res[1] = ((i / per_row) + .5) / rows;
|
||||||
return res;
|
return res;
|
||||||
};
|
}
|
||||||
|
|
||||||
color_t color_out_of_range = 0x0F0800FF;
|
color_t color_out_of_range = 0x0F0800FF;
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ struct coord {
|
|||||||
|
|
||||||
char out = '-';
|
char out = '-';
|
||||||
|
|
||||||
char& fmap_at(coord c) { return c.x >= 0 && c.x < isize(fmap[0]) && c.y >= 0 && c.y < isize(fmap) ? fmap[c.y][c.x] : out; };
|
char& fmap_at(coord c) { return c.x >= 0 && c.x < isize(fmap[0]) && c.y >= 0 && c.y < isize(fmap) ? fmap[c.y][c.x] : out; }
|
||||||
|
|
||||||
ld vx[256][256], vy[256][256];
|
ld vx[256][256], vy[256][256];
|
||||||
|
|
||||||
@ -398,7 +398,7 @@ void changepoint(int x, int y, bool can_add) {
|
|||||||
|
|
||||||
for(int k=0; k<4; k++) if(!live[k]) fmap_at(cc+k) = '0';
|
for(int k=0; k<4; k++) if(!live[k]) fmap_at(cc+k) = '0';
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
bool showmenu = true;
|
bool showmenu = true;
|
||||||
|
|
||||||
|
@ -2474,7 +2474,7 @@ auto hooks =
|
|||||||
addHook(hooks_markers, 100, search_marker) +
|
addHook(hooks_markers, 100, search_marker) +
|
||||||
0;
|
0;
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
#include "kohonen.cpp"
|
#include "kohonen.cpp"
|
||||||
#include "staircase.cpp"
|
#include "staircase.cpp"
|
||||||
|
@ -192,7 +192,7 @@ bool flag_clamp_max(ld& coord, ld maxv) {
|
|||||||
|
|
||||||
bool flag_clamp(ld& coord, ld minv, ld maxv) {
|
bool flag_clamp(ld& coord, ld minv, ld maxv) {
|
||||||
return flag_clamp_min(coord, minv) & flag_clamp_max(coord, maxv);
|
return flag_clamp_min(coord, minv) & flag_clamp_max(coord, maxv);
|
||||||
};
|
}
|
||||||
|
|
||||||
bool flag_clamp_sym(ld& coord, ld v) {
|
bool flag_clamp_sym(ld& coord, ld v) {
|
||||||
return flag_clamp(coord, -v, v);
|
return flag_clamp(coord, -v, v);
|
||||||
|
@ -1572,5 +1572,5 @@ addHook(hooks_removecells, 0, [] () {
|
|||||||
eliminate_if(butterflies, [] (pair<cell*,int>& p) { return is_cell_removed(p.first); });
|
eliminate_if(butterflies, [] (pair<cell*,int>& p) { return is_cell_removed(p.first); });
|
||||||
for(int i=0; i<SHSIZE; i++) for(int p=0; p<MAXPLAYER; p++)
|
for(int i=0; i<SHSIZE; i++) for(int p=0; p<MAXPLAYER; p++)
|
||||||
set_if_removed(shpos[p][i], NULL);
|
set_if_removed(shpos[p][i], NULL);
|
||||||
});;
|
});
|
||||||
}
|
}
|
||||||
|
@ -1354,7 +1354,7 @@ EX namespace peace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto aNext = addHook(hooks_nextland, 100, getNext);
|
auto aNext = addHook(hooks_nextland, 100, getNext);
|
||||||
};
|
}
|
||||||
|
|
||||||
#if CAP_COMMANDLINE
|
#if CAP_COMMANDLINE
|
||||||
int read_mode_args() {
|
int read_mode_args() {
|
||||||
|
Loading…
Reference in New Issue
Block a user