diff --git a/complex.cpp b/complex.cpp index c681d97a..a2dc7b58 100644 --- a/complex.cpp +++ b/complex.cpp @@ -2986,9 +2986,9 @@ namespace ca { carule[nei][livedead] = s; return 0; } -#endif auto ah = addHook(hooks_args, 0, readArg); +#endif void simulate() { if(cwt.c->land != laCA) return; diff --git a/control.cpp b/control.cpp index 6f037531..f9066392 100644 --- a/control.cpp +++ b/control.cpp @@ -27,6 +27,8 @@ bool mousepressed = false; bool mousemoved = false; bool actonrelease = false; +int timetowait; + #if CAP_SDLJOY int joyx, joyy, panjoyx, panjoyy; movedir joydir; @@ -473,8 +475,6 @@ void resize_screen_to(int x, int y) { setvideomode(); } -int timetowait; - void mainloopiter() { DEBB(DF_GRAPH, (debugfile,"main loop\n")); diff --git a/fake-mobile.cpp b/fake-mobile.cpp index 518448d3..55318943 100644 --- a/fake-mobile.cpp +++ b/fake-mobile.cpp @@ -8,23 +8,20 @@ #include namespace hr { - const char *scorefile = "fakemobile_score.txt"; - const char *conffile = "fakemobile_config.txt"; - - std::string levelfile = "fakemobile_level.txt"; - std::string picfile = "fakemobile_pic.txt"; + const char *scorefile = "fakemobile_score.txt"; } #include #include "init.cpp" -using namespace hr; #include #include #undef main +namespace hr { + transmatrix getOrientation() { return Id; } void playSound(cell *c, const string& fname, int vol) { @@ -101,6 +98,14 @@ void shareScore(int) { printf("share\n"); } +void openURL() { + printf("< openURL > \n"); + } + +} + +using namespace hr; + int main(int argc, char **argv) { initAll(); @@ -240,6 +245,3 @@ int main(int argc, char **argv) { clearMemory(); } -void openURL() { - printf("< openURL > \n"); - } diff --git a/hud.cpp b/hud.cpp index 0a5b1e48..26beda2a 100644 --- a/hud.cpp +++ b/hud.cpp @@ -379,7 +379,8 @@ void drawStats() { dynamicval pm(pmodel, mdDisk); dynamicval v(vid, vid); vid.alpha = vid.scale = 1; - calcparam(); set_projection(0); + calcparam(); + stereo::set_projection(0); if(haveMobileCompass()) { initquickqueue(); diff --git a/irregular.cpp b/irregular.cpp index c78b4b5a..5019a2de 100644 --- a/irregular.cpp +++ b/irregular.cpp @@ -850,7 +850,8 @@ void auto_creator() { while(runlevel < 10) step(1000); start_game_on_created_map(); } - + +#if CAP_COMMANDLINE int readArgs() { using namespace arg; @@ -874,6 +875,7 @@ int readArgs() { else return 1; return 0; } +#endif unsigned char density_code() { if(cellcount < 128) return cellcount; @@ -904,7 +906,9 @@ array get_masters(cell *c) { } auto hook = +#if CAP_COMMANDLINE addHook(hooks_args, 100, readArgs) + +#endif addHook(hooks_drawcell, 100, draw_cell_schematics) + addHook(shmup::hooks_turn, 100, step); diff --git a/mapeditor.cpp b/mapeditor.cpp index 6a485a48..e6a06804 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -780,7 +780,7 @@ namespace mapeditor { else if(doexiton(sym, uni)) popScreen(); }; } - + void handleKeyMap(int sym, int uni) { handlePanning(sym, uni); @@ -1795,11 +1795,12 @@ namespace mapeditor { } #if CAP_EDIT -#if CAP_COMMANDLINE string levelfile = "hyperrogue.lev"; const char *loadlevel = NULL; string picfile = "hyperrogue.pic"; +#if CAP_COMMANDLINE + int read_editor_args() { using namespace arg; if(argis("-lev")) { shift(); levelfile = args(); } diff --git a/polygons.cpp b/polygons.cpp index f7b65711..9e9e987f 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -834,7 +834,9 @@ void drawqueueitem(polytodraw& ptd) { switch(ptd.kind) { case pkLink: + #if CAP_SVG svg::link = ptd.u.link.link; + #endif break; case pkSpecial: