1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

moved more includes to sysconfig.h

This commit is contained in:
Zeno Rogue 2018-06-12 23:10:20 +02:00
parent 50eaba3efd
commit 56baba800b
10 changed files with 45 additions and 52 deletions

View File

@ -5,8 +5,6 @@
// Copyright (C) 2011-2018 Zeno Rogue, see 'hyper.cpp' for details
#include <map>
namespace hr {
namespace whirlwind {
@ -1543,8 +1541,6 @@ namespace hive {
}
}
#include <set>
bool fightspam(cell *c) {
return c->cpdist >= gamerange() ||
isMetalBeast(c->monst) || c->monst == moSkeleton ||

View File

@ -1,8 +1,6 @@
// Hyperbolic Rogue -- the conformal/history mode
// Copyright (C) 2011-2018 Zeno Rogue, see 'hyper.cpp' for details
#include <complex>
namespace hr {
#if ISMOBWEB

View File

@ -398,11 +398,6 @@ void showCheatMenu() {
};
}
#ifdef BACKTRACE
#include <execinfo.h>
#endif
void modalDebug(cell *c) {
viewctr.h = c->master;
if(noGUI) {

View File

@ -116,7 +116,6 @@ int playergender();
int princessgender();
int lang();
#include <set>
set<string> warnshown;
void basicrep(string& x) {

View File

@ -1,16 +1,6 @@
// HyperRogue map editor
// Copyright (C) 2011-2018 Zeno Rogue, see 'hyper.cpp' for details
#include <map>
#include <stdint.h>
#if ISWINDOWS
#include "direntx.h"
#include "direntx.c"
#else
#include <dirent.h>
#endif
namespace hr {
namespace mapeditor {

14
rug.cpp
View File

@ -1007,20 +1007,6 @@ void addNewPoints() {
if(qvalid != oqvalid) { Xprintf("adding new points %4d %4d %4d %.9lf %9d %9d\n", oqvalid, qvalid, size(points), dist, dt, queueiter); }
}
#if !CAP_SDL
#include <stdlib.h>
#include <sys/time.h>
long long getVa() {
struct timeval tval;
gettimeofday(&tval, NULL);
return tval.tv_sec * 1000000 + tval.tv_usec;
}
int SDL_GetTicks() {
return getVa() / 1000;
}
#endif
void physics() {
if(good_shape) return;

View File

@ -366,6 +366,7 @@ extern "C" {
#include <array>
#include <set>
#include <random>
#include <complex>
#ifdef USE_UNORDERED_MAP
#include <unordered_map>
@ -373,6 +374,36 @@ extern "C" {
#define unordered_map map
#endif
#include <stdint.h>
#if ISWINDOWS
#include "direntx.h"
#include "direntx.c"
#else
#include <dirent.h>
#endif
#if CAP_TEXTURE
#if CAP_SDL_IMG
#include <SDL/SDL_image.h>
#elif CAP_PNG
#include <png.h>
#endif
#endif
#if CAP_SAVE
#include <unistd.h>
#include <sys/types.h>
#endif
#if CAP_TIMEOFDAY
#include <sys/time.h>
#endif
#ifdef BACKTRACE
#include <execinfo.h>
#endif
#if CAP_SDL
union SDL_Event;
#endif

View File

@ -748,9 +748,6 @@ namespace anticheat {
long long saveposition = -1;
#include <unistd.h>
#include <sys/types.h>
void remove_emergency_save() {
#if !ISWINDOWS
if(saveposition >= 0) {

View File

@ -1,12 +1,6 @@
// Hyperbolic Rogue -- texture mode
// Copyright (C) 2011-2018 Zeno Rogue, see 'hyper.cpp' for details
#if CAP_SDL_IMG
#include <SDL/SDL_image.h>
#elif CAP_PNG
#include <png.h>
#endif
#if CAP_TEXTURE
namespace hr { namespace texture {

View File

@ -5,6 +5,20 @@
namespace hr {
#if CAP_TIMEOFDAY
long long getms() {
struct timeval tval;
gettimeofday(&tval, NULL);
return tval.tv_sec * 1000000 + tval.tv_usec;
}
#if !CAP_SDL
int SDL_GetTicks() {
return getms() / 1000;
}
#endif
#endif
long double sqr(long double x) { return x*x; }
string its(int i) { char buf[64]; sprintf(buf, "%d", i); return buf; }
string fts(float x) { char buf[64]; sprintf(buf, "%4.2f", x); return buf; }
@ -72,13 +86,6 @@ ld frac(ld x) {
#if CAP_PROFILING
#include <sys/time.h>
long long getms() {
struct timeval tval;
gettimeofday(&tval, NULL);
return tval.tv_sec * 1000000 + tval.tv_usec;
}
#define FRAMES 64
#define CATS 16