1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-24 18:37:39 +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,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