diff --git a/config.cpp b/config.cpp index b05209c7..43bf5f69 100644 --- a/config.cpp +++ b/config.cpp @@ -1696,10 +1696,12 @@ EX void show3D() { }); } + #if CAP_RAY if(GDIM == 3) { dialog::addItem(XLAT("configure raycasting"), 'A'); dialog::add_action_push(ray::configure); } + #endif edit_levellines('L'); diff --git a/raycaster.cpp b/raycaster.cpp index 88404c7d..5af5f95f 100644 --- a/raycaster.cpp +++ b/raycaster.cpp @@ -11,7 +11,7 @@ namespace hr { EX namespace ray { -#if MAXMDIM >= 4 +#if CAP_RAY /** texture IDs */ GLuint txConnections = 0, txWallcolor = 0, txTextureMap = 0; @@ -1234,7 +1234,7 @@ auto hookc = addHook(hooks_configfile, 100, addconfig); #endif -#if MAXMDIM == 3 +#if !CAP_RAY EX always_false in_use; EX always_false comparison_mode; EX void reset_raycaster() { } diff --git a/sysconfig.h b/sysconfig.h index 5657fe21..ae2c51cc 100644 --- a/sysconfig.h +++ b/sysconfig.h @@ -538,6 +538,10 @@ union SDL_Event; #define CAP_FIELD (!(ISMINI)) #endif +#ifndef CAP_RAY +#define CAP_RAY (MAXMDIM >= 4 && !ISWEB && !ISMOBILE) +#endif + #ifndef CAP_MEMORY_RESERVE #define CAP_MEMORY_RESERVE (!ISMOBILE && !ISWEB) #endif