1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 09:00:34 +00:00

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(c->barleft == NOWALLSEP) {
#if MAXMDIM >= 4
if(WDIM == 3) extend3D(c); if(WDIM == 3) extend3D(c);
else extendNowall(c); else
#endif
extendNowall(c);
return; return;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,11 +6,11 @@
*/ */
#include "hyper.h" #include "hyper.h"
#if CAP_RACING
namespace hr { namespace hr {
EX namespace racing { EX namespace racing {
#if CAP_RACING
void set_race_configurer(); void set_race_configurer();
EX bool guiding = false; EX bool guiding = false;
@ -1370,8 +1370,11 @@ EX void add_debug(cell *c) {
dialog::addSelItem("completion", its(r.completion), 0); 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); for(auto& s: to_free) chunks.erase(s);
} }
#else
EX void resetmusic() {}
#endif #endif
#if CAP_COMMANDLINE #if CAP_COMMANDLINE
@ -280,4 +278,9 @@ auto ah_sound = addHook(hooks_args, 0, read_sound_args) + addHook(hooks_clear_ca
#endif #endif
#if !CAP_SDLAUDIO
EX void playSound(cell *c, const string& fname, int vol IS(100)) { }
EX void resetmusic() { }
#endif
} }