mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-10 15:59:53 +00:00
more adjustments to disabled CAP_*
This commit is contained in:
parent
9a0507ba58
commit
a3d9711ec2
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
2
hyper.h
2
hyper.h
@ -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>
|
||||
|
@ -672,7 +672,11 @@ EX namespace inv {
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
always_false on, activating;
|
||||
#endif
|
||||
}}
|
||||
|
||||
#if !CAP_INV
|
||||
EX always_false on, activating;
|
||||
#endif
|
||||
EX }
|
||||
|
||||
}
|
||||
|
@ -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());
|
||||
|
||||
|
11
racing.cpp
11
racing.cpp
@ -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
|
||||
|
@ -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
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user