From f546bba84a4f4f83b81d2c9b7128dd97775cc8e9 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 8 Feb 2019 16:52:44 +0100 Subject: [PATCH] fixes for mobile --- conformal.cpp | 1 + geom-exp.cpp | 3 +++ hyper.h | 6 ++++++ pattern2.cpp | 3 ++- polygons.cpp | 4 ++++ sysconfig.h | 4 ++++ 6 files changed, 20 insertions(+), 1 deletion(-) diff --git a/conformal.cpp b/conformal.cpp index e1c667b5..9c633f04 100644 --- a/conformal.cpp +++ b/conformal.cpp @@ -669,6 +669,7 @@ namespace conformal { dialog::init(XLAT("models of hyperbolic geometry")); for(int i=0; i +#if !ISSTEAM #include "hyper_function.h" +#endif namespace hr { @@ -16,7 +18,11 @@ void ignore(T&&) { // placate GCC's overzealous -Wunused-result } +#if USE_STDFUNCTION +using std::function; +#else template using function = hyper_function; +#endif // functions and types used from the standard library using std::vector; diff --git a/pattern2.cpp b/pattern2.cpp index f408a54a..0623a5e0 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1495,7 +1495,8 @@ namespace patterns { dialog::addSelItem(XLAT("sides"), "sides", 'B'); - dialog::addSelItem(XLAT("formula"), "formula", 'f'); + if(!ISMOBILE) + dialog::addSelItem(XLAT("formula"), "formula", 'f'); dialog::addBreak(100); dialog::addBoolItem(XLATN(winf[waInvisibleFloor].name), canvas_invisible, 'i'); diff --git a/polygons.cpp b/polygons.cpp index c0eb42f4..79052a97 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -767,10 +767,14 @@ void fixMercator(bool tinf) { unsigned char& part(color_t& col, int i) { unsigned char* c = (unsigned char*) &col; +#if ISMOBILE + return c[i]; +#else #if SDL_BYTEORDER == SDL_BIG_ENDIAN return c[sizeof(col) - 1 - i]; #else return c[i]; +#endif #endif } diff --git a/sysconfig.h b/sysconfig.h index 66c58e96..9ea6cebf 100644 --- a/sysconfig.h +++ b/sysconfig.h @@ -17,6 +17,10 @@ #define NOLICENSE #endif +#ifndef USE_STDFUNCTION +#define USE_STDFUNCTION ISSTEAM +#endif + #ifndef CAP_SHADER #define CAP_SHADER CAP_GL #endif