From 1eaaac4d77a847470f030e6f3e37398ad937ef70 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 14 Jun 2018 00:06:54 +0200 Subject: [PATCH] made the web version compile --- changelog.txt | 3 ++- commandline.cpp | 2 ++ compileunits.h | 3 +-- hyperweb.cpp | 5 ++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index b69a882f..0fd9e65a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2469,8 +2469,9 @@ non-game: - Strange Challenge should exit correctly. - rules are described better in other geometries -2018.06.12 XX:XX Update 10.4b: +2018.06.13 01:32 Update 10.4b: - Orb of Love does not give the 30$$$ bonus in the Strange Challenge -- this is now made clearer (the displayed score no longer includes this 30$$$, and a help text for Orb of Love is added). +- Strange Challenge should reset OSM and Chaos mode correctly - a flat torus can be embedded in S^3 -- HyperRogue now knows about this when rendering torus in the Hypersian Rug mode in the spherical native geometry - it was possible to get another chance in the Strange Challenge by pressing ESC in specific circumstances -- this should be fixed. - fixed some issues with adjacency taken into account incorrectly with Hedgehogs/Flailguards/Pikemen and Warp/halfvines diff --git a/commandline.cpp b/commandline.cpp index 9d43a267..ce6c42ee 100644 --- a/commandline.cpp +++ b/commandline.cpp @@ -98,7 +98,9 @@ int arg::readCommon() { else if(argis("-s")) { PHASE(1); shift(); scorefile = argcs(); } else if(argis("-m")) { PHASE(1); shift(); musicfile = argcs(); } else if(argis("-nogui")) { PHASE(1); noGUI = true; } +#ifndef EMSCRIPTEN else if(argis("-font")) { PHASE(1); shift(); fontpath = args(); } +#endif #if CAP_SDLAUDIO else if(argis("-se")) { PHASE(1); shift(); wheresounds = args(); } #endif diff --git a/compileunits.h b/compileunits.h index a72e783b..7ec79b2d 100644 --- a/compileunits.h +++ b/compileunits.h @@ -50,8 +50,7 @@ #if CAP_INV #include "inventory.cpp" #else -bool inv::on; -bool inv::activating; +namespace hr { namespace inv { bool on, activating; } } #endif #include "system.cpp" #include "debug.cpp" diff --git a/hyperweb.cpp b/hyperweb.cpp index 30454dc5..5b9635a2 100644 --- a/hyperweb.cpp +++ b/hyperweb.cpp @@ -26,6 +26,8 @@ template void emscripten_set_main_loop(A a, B b, C c) #include #endif +#include + namespace hr { void initweb(); void emscripten_get_commandline(); @@ -35,6 +37,8 @@ namespace hr { const char *wheresounds; } +#include "hyper.cpp" + namespace hr { // -- demo -- @@ -196,4 +200,3 @@ void emscripten_get_commandline() { } } -#include "hyper.cpp"