From 7ac883c1c2b5dca8e647be935c19565ea74a697c Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 11 Feb 2018 21:39:08 +0100 Subject: [PATCH] compile without CAP_INV --- basegraph.cpp | 2 +- commandline.cpp | 2 ++ compileunits.h | 1 + help.cpp | 10 ++++++++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/basegraph.cpp b/basegraph.cpp index 26390ae0..c90a8b7c 100644 --- a/basegraph.cpp +++ b/basegraph.cpp @@ -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 '?'; } diff --git a/commandline.cpp b/commandline.cpp index f53ffc91..ebe7843d 100644 --- a/commandline.cpp +++ b/commandline.cpp @@ -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 diff --git a/compileunits.h b/compileunits.h index d87df004..bc0b750d 100644 --- a/compileunits.h +++ b/compileunits.h @@ -45,6 +45,7 @@ #include "inventory.cpp" #else bool inv::on; +bool inv::activating; #endif #include "system.cpp" #include "debug.cpp" diff --git a/help.cpp b/help.cpp index ec5ee7d5..4c843de7 100644 --- a/help.cpp +++ b/help.cpp @@ -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