1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 09:27:40 +00:00

polara50 and polarb50 now consistently return bool, not int.

MSVC complains about constructions such as

    bool polara50(int);
    int polara50(cell *c) {
        // ...
        return polara50(someint);
    }
This commit is contained in:
Arthur O'Dwyer
2018-09-05 06:37:07 -07:00
parent 2d5d5a1966
commit f84975d1d1
4 changed files with 14 additions and 13 deletions

View File

@@ -211,7 +211,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
if(d == 9) {
cell *c2 = NONSTDVAR ? c->master->c7 : c;
if(cdist50(c2) == 3 && polarb50(c2) == 1)
if(cdist50(c2) == 3 && polarb50(c2))
c->wall = waPalace;
}
@@ -272,12 +272,12 @@ void giantLandSwitch(cell *c, int d, cell *from) {
break;
}
}
else if(cdist50(c) == 3 && polarb50(c) == 1 && !ishept(c)) {
else if(cdist50(c) == 3 && polarb50(c) && !ishept(c)) {
if(GOLDBERG) ;
else {
int q = 0, s = 0;
if(!ishept(c)) for(int i=0; i<c->type; i++)
if(cdist50(c->move(i)) == 3 && polarb50(c->move(i)) == 1 && !ishept(c->move(i)))
if(cdist50(c->move(i)) == 3 && polarb50(c->move(i)) && !ishept(c->move(i)))
q++, s += i;
if(q == 1 && c->move(s)->land == laPalace) {
switch(princess::generating ? 0 : hrand(2)) {