fixed the compilation without CAP_COMMANDLINE or without CAP_SVG or fakemobile

This commit is contained in:
Zeno Rogue 2018-07-22 12:50:03 +02:00
parent 4d2f79ba95
commit 329a2fa783
7 changed files with 26 additions and 16 deletions

View File

@ -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;

View File

@ -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"));

View File

@ -8,23 +8,20 @@
#include <string>
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 <SDL/SDL.h>
#include "init.cpp"
using namespace hr;
#include <SDL/SDL_ttf.h>
#include <SDL/SDL_gfxPrimitives.h>
#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");
}

View File

@ -379,7 +379,8 @@ void drawStats() {
dynamicval<eModel> pm(pmodel, mdDisk);
dynamicval<videopar> v(vid, vid);
vid.alpha = vid.scale = 1;
calcparam(); set_projection(0);
calcparam();
stereo::set_projection(0);
if(haveMobileCompass()) {
initquickqueue();

View File

@ -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<heptagon*, 3> 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);

View File

@ -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(); }

View File

@ -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: