more adjustments to disabled CAP_*

This commit is contained in:
Zeno Rogue 2019-09-13 03:10:26 +02:00
parent 9a0507ba58
commit a3d9711ec2
8 changed files with 34 additions and 13 deletions

View File

@ -363,8 +363,11 @@ EX void extendBarrier(cell *c) {
}
if(c->barleft == NOWALLSEP) {
#if MAXMDIM >= 4
if(WDIM == 3) extend3D(c);
else extendNowall(c);
else
#endif
extendNowall(c);
return;
}

View File

@ -1194,10 +1194,12 @@ EX void configureInterface() {
gamescreen(3);
dialog::init(XLAT("interface"));
#if CAP_TRANS
if(CAP_TRANS) {
dialog::addSelItem(XLAT("language"), XLAT("EN"), 'l');
dialog::add_action_push(selectLanguageScreen);
}
#endif
dialog::addSelItem(XLAT("player character"), numplayers() > 1 ? "" : csname(vid.cs), 'g');
dialog::add_action_push(showCustomizeChar);

View File

@ -1090,6 +1090,10 @@ EX bool handleCompass() {
return false;
}
#if CAP_ORIENTATION
EX transmatrix getOrientation();
#endif
// orientation sensitivity
EX namespace ors {
@ -1100,10 +1104,10 @@ int when_enabled;
transmatrix last_orientation;
transmatrix relative_matrix = Id;
string choices[3] = {"OFF", "relative", "absolute"};
EX string choices[3] = {"OFF", "relative", "absolute"};
#if CAP_ORIENTATION
transmatrix getOrientation() {
EX transmatrix getOrientation() {
return MirrorX * hr::getOrientation() * MirrorX;
}
#endif

View File

@ -26,7 +26,7 @@ namespace hr {
struct always_false {
operator bool() const { return false; };
void operator = (bool b) const {};
bool operator = (bool b) const { return b; };
};
template<class T>

View File

@ -672,7 +672,11 @@ EX namespace inv {
}
}
#else
always_false on, activating;
#endif
}}
#if !CAP_INV
EX always_false on, activating;
#endif
EX }
}

View File

@ -321,12 +321,14 @@ int main() {
}
printf("\n");
printf("#if HDR\n");
printf("#if CAP_TRANS\n");
printf("#define NUMEXTRA %d\n", isize(vchars));
printf("#define NATCHARS {");
for(auto&& elt : vchars) printf("\"%s\",", elt.c_str());
printf("};\n");
printf("extern const char* natchars[NUMEXTRA];\n");
printf("#endif\n");
printf("#endif\n");
printf("const char* natchars[NUMEXTRA] = NATCHARS;\n");
printf("//javastring = \"%s\";\n", javastring.c_str());

View File

@ -6,11 +6,11 @@
*/
#include "hyper.h"
#if CAP_RACING
namespace hr {
EX namespace racing {
#if CAP_RACING
void set_race_configurer();
EX bool guiding = false;
@ -1370,8 +1370,11 @@ EX void add_debug(cell *c) {
dialog::addSelItem("completion", its(r.completion), 0);
}
}
#endif
#if !CAP_RACING
EX always_false on;
#endif
EX }
}
EX }
#endif

View File

@ -258,8 +258,6 @@ EX void reuse_music_memory() {
for(auto& s: to_free) chunks.erase(s);
}
#else
EX void resetmusic() {}
#endif
#if CAP_COMMANDLINE
@ -280,4 +278,9 @@ auto ah_sound = addHook(hooks_args, 0, read_sound_args) + addHook(hooks_clear_ca
#endif
#if !CAP_SDLAUDIO
EX void playSound(cell *c, const string& fname, int vol IS(100)) { }
EX void resetmusic() { }
#endif
}