compile without CAP_INV

This commit is contained in:
Zeno Rogue 2018-02-11 21:39:08 +01:00
parent cab8a0a38f
commit 7ac883c1c2
4 changed files with 12 additions and 3 deletions

View File

@ -49,7 +49,7 @@ int getnext(const char* s, int& i) {
if(eqs(s+i, natchars[k])) {
i += siz; return 128+k;
}
printf("Unknown character in: '%s'\n", s);
printf("Unknown character in: '%s' at position %d\n", s, i);
i ++; return '?';
}

View File

@ -142,6 +142,7 @@ int arg::readCommon() {
PHASE(2);
shift(); stereo::mode = stereo::eStereo(argi());
}
#if CAP_INV
else if(argis("-IU")) {
PHASE(3) cheater++; timerghost = false;
shift(); eItem i = readItem(args());
@ -154,6 +155,7 @@ int arg::readCommon() {
shift(); inv::extra_orbs[i] += argi();
inv::compute();
}
#endif
else if(argis("-ambush")) {
// make all ambushes use the given number of dogs
// example: hyper -W Hunt -IP Shield 1 -ambush 60

View File

@ -45,6 +45,7 @@
#include "inventory.cpp"
#else
bool inv::on;
bool inv::activating;
#endif
#include "system.cpp"
#include "debug.cpp"

View File

@ -37,12 +37,14 @@ string buildHelpText() {
"The monster could also kill you by moving into your location, but the game "
"automatically cancels all moves which result in that.\n\n"
);
#if CAP_INV
if(inv::on)
h += XLAT(
inv::helptext
);
else
#endif
h += XLAT(
"There are many lands in HyperRogue. Collect 10 treasure "
"in the given land type to complete it; this enables you to "
@ -237,7 +239,8 @@ string generateHelpForItem(eItem it) {
}
}
}
#if CAP_INV
if(inv::on) {
if(it == itOrbYendor || it == itHell) {
help += XLAT(
@ -296,6 +299,7 @@ string generateHelpForItem(eItem it) {
if(inv::orbinfoline != "") help += "\n\n" + inv::orbinfoline;
if(inv::extra != "") help += "\n\nExtras:" + inv::extra;
}
#endif
if(itemclass(it) == IC_ORB || it == itGreenStone || it == itOrbYendor) {
for(int i=0; i<ORBLINES; i++) {
@ -320,8 +324,10 @@ string generateHelpForItem(eItem it) {
}
}
#if CAP_INV
if(inv::on && it == itInventory)
help += "\n\n" + XLAT(inv::helptext);
#endif
return help;
}