diff --git a/barriers.cpp b/barriers.cpp index 515c02c2..26970ce9 100644 --- a/barriers.cpp +++ b/barriers.cpp @@ -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; } diff --git a/config.cpp b/config.cpp index a1aad336..ccf2b15d 100644 --- a/config.cpp +++ b/config.cpp @@ -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); diff --git a/control.cpp b/control.cpp index b7243855..e0cdb10a 100644 --- a/control.cpp +++ b/control.cpp @@ -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 diff --git a/hyper.h b/hyper.h index 959906a9..6702df92 100644 --- a/hyper.h +++ b/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 diff --git a/inventory.cpp b/inventory.cpp index f0b97115..d0702d23 100644 --- a/inventory.cpp +++ b/inventory.cpp @@ -672,7 +672,11 @@ EX namespace inv { } } -#else -always_false on, activating; #endif - }} + +#if !CAP_INV +EX always_false on, activating; +#endif +EX } + +} diff --git a/langen.cpp b/langen.cpp index ec62dca2..f67a58cb 100644 --- a/langen.cpp +++ b/langen.cpp @@ -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()); diff --git a/racing.cpp b/racing.cpp index eb73f95d..5e33d838 100644 --- a/racing.cpp +++ b/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 diff --git a/sound.cpp b/sound.cpp index 6379c0a1..d1cf88e5 100644 --- a/sound.cpp +++ b/sound.cpp @@ -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 + }