mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 13:07:16 +00:00
added some missing CAP_* guards
This commit is contained in:
parent
7777c7b415
commit
b71e436cb6
@ -1602,6 +1602,7 @@ void celldrawer::draw_features() {
|
||||
poly_outline = OUTLINE_DEFAULT;
|
||||
}
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
else if(isDie(c->wall)) {
|
||||
color_t col = darkena(winf[c->wall].color, 0, 0xFF);
|
||||
|
||||
@ -1616,6 +1617,7 @@ void celldrawer::draw_features() {
|
||||
die_target = V;
|
||||
dice::draw_die(c, Vboat, 1, col);
|
||||
}
|
||||
#endif
|
||||
|
||||
else if(c->wall == waExplosiveBarrel) {
|
||||
if(GDIM == 3 && qfi.fshape) {
|
||||
|
4
game.cpp
4
game.cpp
@ -381,6 +381,7 @@ EX void pushThumper(const movei& mi) {
|
||||
cto->wall = waCrateOnTarget;
|
||||
th->wall = waCrateTarget;
|
||||
}
|
||||
#if CAP_COMPLEX2
|
||||
else if(isDie(w)) {
|
||||
th->wall = waNone;
|
||||
cto->wall = w;
|
||||
@ -405,6 +406,7 @@ EX void pushThumper(const movei& mi) {
|
||||
else
|
||||
animateMovement(mi, LAYER_BOAT);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
cto->wall = w;
|
||||
if(explode) cto->wall = waFireTrap, cto->wparam = explode;
|
||||
@ -415,8 +417,10 @@ EX void pushThumper(const movei& mi) {
|
||||
EX bool canPushThumperOn(movei mi, cell *player) {
|
||||
cell *thumper = mi.s;
|
||||
cell *tgt = mi.t;
|
||||
#if CAP_COMPLEX2
|
||||
if(dice::on(thumper) && !dice::can_roll(mi))
|
||||
return false;
|
||||
#endif
|
||||
if(tgt->wall == waBoat || tgt->wall == waStrandedBoat) return false;
|
||||
if(isReptile(tgt->wall)) return false;
|
||||
if(isWatery(tgt) && !tgt->monst)
|
||||
|
@ -2252,6 +2252,7 @@ EX bool drawMonsterType(eMonster m, cell *where, const shiftmatrix& V1, color_t
|
||||
return true;
|
||||
}
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
case moAnimatedDie: case moAngryDie: {
|
||||
if(where)
|
||||
dice::draw_die(where, V, 1, darkena(col, 0, 0xFF));
|
||||
@ -2259,6 +2260,7 @@ EX bool drawMonsterType(eMonster m, cell *where, const shiftmatrix& V1, color_t
|
||||
queuepoly(V, cgi.shDodeca, darkena(col, 0, 0xFF));
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
default: ;
|
||||
}
|
||||
|
@ -527,10 +527,12 @@ EX namespace history {
|
||||
}
|
||||
|
||||
EX void open_filedialog_to_create_image(bool ds) {
|
||||
#if CAP_SHOT && CAP_SDL
|
||||
dialog::openFileDialog(band_format_now, XLAT("rendered band ($ID=segment, $DATE=date)"), ".png", [ds] () {
|
||||
createImage(band_format_now, ds);
|
||||
return true;
|
||||
});
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -691,7 +693,7 @@ EX namespace history {
|
||||
}
|
||||
|
||||
EX void renderAutoband() {
|
||||
#if CAP_SDL
|
||||
#if CAP_SDL && CAP_SHOT
|
||||
if(!cwt.at || celldist(cwt.at) <= 7) return;
|
||||
if(!autoband) return;
|
||||
eModel spm = pmodel;
|
||||
|
@ -2586,8 +2586,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
|
||||
case laDice: {
|
||||
#if CAP_COMPLEX2
|
||||
if(fargen)
|
||||
dice::generate_full(c, items[itDice] + yendor::hardness());
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -431,10 +431,12 @@ EX bool makeflame(cell *c, int timeout, bool checkonly) {
|
||||
EX bool makeshallow(cell *c, int timeout, bool checkonly) {
|
||||
changes.ccell(c);
|
||||
if(!checkonly) destroyTrapsOn(c);
|
||||
#if CAP_COMPLEX2
|
||||
if(c->land == laBrownian) {
|
||||
if(checkonly) return true;
|
||||
brownian::dissolve(c, 1);
|
||||
}
|
||||
#endif
|
||||
if(c->wall == waChasm || c->wall == waOpenGate || c->wall == waRed2 || c->wall == waRed3 ||
|
||||
c->wall == waTower)
|
||||
return false;
|
||||
|
@ -103,8 +103,10 @@ EX void moveEffect(const movei& mi, eMonster m) {
|
||||
tortoise::move_baby(cf, ct);
|
||||
}
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
if(isDie(m) && mi.proper())
|
||||
dice::roll(mi);
|
||||
#endif
|
||||
}
|
||||
|
||||
EX void moveMonster(const movei& mi) {
|
||||
|
4
orbs.cpp
4
orbs.cpp
@ -1104,6 +1104,7 @@ void blowoff(const movei& mi) {
|
||||
if(ct->item) ct->item = itNone;
|
||||
moveItem(cf, ct, true);
|
||||
}
|
||||
#if CAP_COMPLEX2
|
||||
if(ct->monst == moAnimatedDie && dice::data[ct].happy() > 0) {
|
||||
ct->monst = moNone;
|
||||
ct->wall = waHappyDie;
|
||||
@ -1123,6 +1124,7 @@ void blowoff(const movei& mi) {
|
||||
ct->stuntime = 5;
|
||||
addMessage(XLAT("You have made a Happy Die angry!"));
|
||||
}
|
||||
#endif
|
||||
items[itOrbAir]--;
|
||||
createNoise(2);
|
||||
bfs();
|
||||
@ -1157,8 +1159,10 @@ EX movei blowoff_destination(cell *c, int& di) {
|
||||
if(d<c->type) for(int e=d; e<d+c->type; e++) {
|
||||
int di = e % c->type;
|
||||
cell *c2 = c->move(di);
|
||||
#if CAP_COMPLEX2
|
||||
if(dice::on(c) && !dice::can_roll(movei(c, di)))
|
||||
continue;
|
||||
#endif
|
||||
if(c2 && c2->cpdist > c->cpdist && passable(c2, c, P_BLOW)) return movei(c, c2, di);
|
||||
}
|
||||
return movei(c, c, NO_SPACE);
|
||||
|
@ -540,6 +540,7 @@ EX bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) {
|
||||
}
|
||||
return !pseudohept(w) && passable(w, from, extra);
|
||||
}
|
||||
#if CAP_COMPLEX2
|
||||
if(m == moAnimatedDie) {
|
||||
if(extra & P_ONPLAYER) {
|
||||
if(isPlayerOn(w)) return true;
|
||||
@ -559,6 +560,7 @@ EX bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) {
|
||||
else
|
||||
return passable(w, from, extra);
|
||||
}
|
||||
#endif
|
||||
if(m == moFrog) {
|
||||
return isNeighbor1(from, w) ? passable(w, from, extra) : check_jump(from, w, extra, dummy) == 3;
|
||||
}
|
||||
|
@ -629,6 +629,7 @@ bool pcmove::actual_move() {
|
||||
return after_instant(false);
|
||||
}
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
if(c2->monst == moAnimatedDie) {
|
||||
mip = determinePush(cwt, subdir, [] (movei mi) { return canPushThumperOn(mi, cwt.at); });
|
||||
if(mip.proper()) {
|
||||
@ -640,6 +641,7 @@ bool pcmove::actual_move() {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(isPushable(c2->wall) && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) {
|
||||
mip = determinePush(cwt, subdir, [] (movei mi) { return canPushThumperOn(mi, cwt.at); });
|
||||
|
4
reg3.cpp
4
reg3.cpp
@ -1076,15 +1076,19 @@ EX namespace reg3 {
|
||||
|
||||
if(geometry == gSpace535)
|
||||
quotient_map = new seifert_weber::hrmap_seifert_cover();
|
||||
#if CAP_CRYSTAL
|
||||
else if(geometry == gSpace344)
|
||||
quotient_map = new hrmap_from_crystal;
|
||||
#endif
|
||||
else
|
||||
quotient_map = new hrmap_field3(&fp);
|
||||
|
||||
if(geometry == gSpace535)
|
||||
emerald_map = new seifert_weber::hrmap_seifert_cover();
|
||||
#if CAP_CRYSTAL
|
||||
else if(geometry == gSpace344)
|
||||
emerald_map = new hrmap_from_crystal;
|
||||
#endif
|
||||
else
|
||||
emerald_map = new hrmap_field3(&currfp);
|
||||
h.emeraldval = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user