mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-30 02:44:51 +00:00
added some guards
This commit is contained in:
parent
628f19a0a0
commit
1c24daea77
@ -1791,7 +1791,9 @@ EX void convert() {
|
|||||||
sh.cycle_length = id.modval;
|
sh.cycle_length = id.modval;
|
||||||
sh.repeat_value = t / id.modval;
|
sh.repeat_value = t / id.modval;
|
||||||
sh.flags = hr::pseudohept(s) ? arcm::sfPH : 0;
|
sh.flags = hr::pseudohept(s) ? arcm::sfPH : 0;
|
||||||
|
#if CAP_ARCM
|
||||||
if(arcm::in() && arcm::linespattern(s)) { sh.flags |= arcm::sfLINE; ac.have_line = true; }
|
if(arcm::in() && arcm::linespattern(s)) { sh.flags |= arcm::sfLINE; ac.have_line = true; }
|
||||||
|
#endif
|
||||||
for(int j=0; j<t; j++) {
|
for(int j=0; j<t; j++) {
|
||||||
auto co = currentmap->get_corner(s, j);
|
auto co = currentmap->get_corner(s, j);
|
||||||
sh.vertices.push_back(co);
|
sh.vertices.push_back(co);
|
||||||
|
@ -814,11 +814,11 @@ EX void applyBoxes() {
|
|||||||
addinv(itOrbMirror);
|
addinv(itOrbMirror);
|
||||||
addinv(itGreenStone);
|
addinv(itGreenStone);
|
||||||
list_invorb();
|
list_invorb();
|
||||||
applyBoxBool(inv::on, "inventory"); // 306
|
|
||||||
#if CAP_INV
|
#if CAP_INV
|
||||||
|
applyBoxBool(inv::on, "inventory"); // 306
|
||||||
applyBoxNum(inv::rseed, "@inv-rseed");
|
applyBoxNum(inv::rseed, "@inv-rseed");
|
||||||
#else
|
#else
|
||||||
{ int u; applyBoxNum(u); }
|
{ int u; applyBoxNum(u); applyBoxNum(u); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// 10.1:
|
// 10.1:
|
||||||
@ -949,7 +949,9 @@ modecode_t fill_modecode() {
|
|||||||
dynamicval<eVariation> sp5(variation, (eVariation) save.box[186]);
|
dynamicval<eVariation> sp5(variation, (eVariation) save.box[186]);
|
||||||
dynamicval<int> sp7(gp::param.first, save.box[342]);
|
dynamicval<int> sp7(gp::param.first, save.box[342]);
|
||||||
dynamicval<int> sp8(gp::param.second, save.box[343]);
|
dynamicval<int> sp8(gp::param.second, save.box[343]);
|
||||||
|
#if CAP_INV
|
||||||
dynamicval<bool> spinv(inv::on, save.box[306]);
|
dynamicval<bool> spinv(inv::on, save.box[306]);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(save.box[238]) geometry = gSphere;
|
if(save.box[238]) geometry = gSphere;
|
||||||
if(save.box[239]) geometry = gElliptic;
|
if(save.box[239]) geometry = gElliptic;
|
||||||
@ -1301,12 +1303,14 @@ EX void load_last_save() {
|
|||||||
|
|
||||||
loadBox();
|
loadBox();
|
||||||
// printf("boxid = %d\n", boxid);
|
// printf("boxid = %d\n", boxid);
|
||||||
|
#if CAP_COMPLEX2
|
||||||
if(items[itHolyGrail]) {
|
if(items[itHolyGrail]) {
|
||||||
items[itHolyGrail]--;
|
items[itHolyGrail]--;
|
||||||
camelot::knighted = newRoundTableRadius();
|
camelot::knighted = newRoundTableRadius();
|
||||||
items[itHolyGrail]++;
|
items[itHolyGrail]++;
|
||||||
}
|
}
|
||||||
else camelot::knighted = 0;
|
else camelot::knighted = 0;
|
||||||
|
#endif
|
||||||
safety = true;
|
safety = true;
|
||||||
if(items[itSavedPrincess] < 0) items[itSavedPrincess] = 0;
|
if(items[itSavedPrincess] < 0) items[itSavedPrincess] = 0;
|
||||||
addMessage(XLAT("Game loaded."));
|
addMessage(XLAT("Game loaded."));
|
||||||
|
Loading…
Reference in New Issue
Block a user