| @@ -66,7 +66,7 @@ if test "x${cross_compiling}" != xyes -a "x${ac_cv_my_have_sdl}" = xno; then | |||||
| ac_cv_my_have_sdl="yes" | ac_cv_my_have_sdl="yes" | ||||
| SDL_CFLAGS="${SDL_CFLAGS} `${SDL_CONFIG} --cflags`" | SDL_CFLAGS="${SDL_CFLAGS} `${SDL_CONFIG} --cflags`" | ||||
| SDL_LIBS="${SDL_LIBS} `${SDL_CONFIG} --libs`" | SDL_LIBS="${SDL_LIBS} `${SDL_CONFIG} --libs`" | ||||
| AC_DEFINE(HAVE_SDL_H, 1, Define to 1 to use SDL.h), | |||||
| AC_DEFINE(HAVE_SDL_H, 1, Define to 1 to use SDL.h) | |||||
| fi | fi | ||||
| fi | fi | ||||
| @@ -240,7 +240,7 @@ configure() | |||||
| ;; | ;; | ||||
| emscripten-*) | emscripten-*) | ||||
| EM_HOME=$HOME/emscripten | EM_HOME=$HOME/emscripten | ||||
| ./configure CC=$EM_HOME/emcc CXX=$EM_HOME/em++ AR=$EM_HOME/emar RANLIB=$EM_HOME/emranlib PKG_CONFIG=false ac_cv_exeext=".${platform##emscripten-}" | |||||
| ./configure CC=$EM_HOME/emcc CXX=$EM_HOME/em++ AR=$EM_HOME/emar RANLIB=$EM_HOME/emranlib PKG_CONFIG=/bin/false SDL_CONFIG=/bin/false ac_cv_exeext=".${platform##emscripten-}" | |||||
| ;; | ;; | ||||
| *) | *) | ||||
| PATH="$PATH" ./configure CFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS" | PATH="$PATH" ./configure CFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS" | ||||
| @@ -77,7 +77,7 @@ AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h getopt.h) | |||||
| AC_CHECK_HEADERS(fastmath.h pthread.h libutil.h util.h pty.h glob.h unistd.h) | AC_CHECK_HEADERS(fastmath.h pthread.h libutil.h util.h pty.h glob.h unistd.h) | ||||
| AC_CHECK_HEADERS(execinfo.h) | AC_CHECK_HEADERS(execinfo.h) | ||||
| AC_CHECK_HEADERS(sys/ioctl.h sys/ptrace.h sys/stat.h sys/syscall.h sys/user.h) | AC_CHECK_HEADERS(sys/ioctl.h sys/ptrace.h sys/stat.h sys/syscall.h sys/user.h) | ||||
| AC_CHECK_HEADERS(sys/wait.h) | |||||
| AC_CHECK_HEADERS(sys/wait.h sys/time.h) | |||||
| AC_CHECK_HEADERS(linux/kdev_t.h linux/major.h) | AC_CHECK_HEADERS(linux/kdev_t.h linux/major.h) | ||||
| AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h) | AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h) | ||||
| AC_CHECK_HEADERS(pam/pam_appl.h pam/pam_misc.h) | AC_CHECK_HEADERS(pam/pam_appl.h pam/pam_misc.h) | ||||
| @@ -89,6 +89,7 @@ AC_LANG_POP(C++) | |||||
| dnl Common C functions | dnl Common C functions | ||||
| AC_CHECK_FUNCS(getenv system tmpfile tmpnam getcwd _getcwd backtrace_symbols) | AC_CHECK_FUNCS(getenv system tmpfile tmpnam getcwd _getcwd backtrace_symbols) | ||||
| AC_CHECK_FUNCS(gettimeofday usleep) | |||||
| if test "${enable_debug}" = "yes"; then | if test "${enable_debug}" = "yes"; then | ||||
| @@ -24,11 +24,11 @@ | |||||
| # include "platform/nacl/nacl-app.h" | # include "platform/nacl/nacl-app.h" | ||||
| #elif defined __ANDROID__ | #elif defined __ANDROID__ | ||||
| # include "platform/android/androidapp.h" | # include "platform/android/androidapp.h" | ||||
| #elif defined HAVE_GLES_2X | |||||
| # include "eglapp.h" | |||||
| #else | |||||
| #elif defined USE_SDL | |||||
| # include "platform/sdl/sdlapp.h" | # include "platform/sdl/sdlapp.h" | ||||
| # include "platform/sdl/sdlinput.h" | # include "platform/sdl/sdlinput.h" | ||||
| #elif defined HAVE_GLES_2X | |||||
| # include "eglapp.h" | |||||
| #endif | #endif | ||||
| using namespace std; | using namespace std; | ||||
| @@ -52,11 +52,11 @@ class ApplicationData | |||||
| NaClApp app; | NaClApp app; | ||||
| #elif defined __ANDROID__ | #elif defined __ANDROID__ | ||||
| AndroidApp app; | AndroidApp app; | ||||
| #elif defined USE_SDL | |||||
| SdlApp app; | |||||
| #elif defined HAVE_GLES_2X | #elif defined HAVE_GLES_2X | ||||
| /* FIXME: this macro is only deactivated if we include "lolgl.h" */ | /* FIXME: this macro is only deactivated if we include "lolgl.h" */ | ||||
| EglApp app; | EglApp app; | ||||
| #elif defined USE_SDL | |||||
| SdlApp app; | |||||
| #else | #else | ||||
| # error No application class available on this platform | # error No application class available on this platform | ||||
| #endif | #endif | ||||
| @@ -8,29 +8,30 @@ | |||||
| // http://www.wtfpl.net/ for more details. | // http://www.wtfpl.net/ for more details. | ||||
| // | // | ||||
| #if defined HAVE_CONFIG_H | |||||
| #if HAVE_CONFIG_H | |||||
| # include "config.h" | # include "config.h" | ||||
| #endif | #endif | ||||
| #include <cstdlib> | #include <cstdlib> | ||||
| #include <stdint.h> | #include <stdint.h> | ||||
| #if defined __linux__ || defined __native_client__ || defined __APPLE__ | |||||
| #if __linux__ || __native_client__ || __APPLE__ \ | |||||
| || (HAVE_GETTIMEOFDAY && HAVE_USLEEP && HAVE_SYS_TIME_H && HAVE_UNISTD_H) | |||||
| # include <sys/time.h> | # include <sys/time.h> | ||||
| # include <unistd.h> | # include <unistd.h> | ||||
| #elif defined _XBOX | |||||
| #elif _XBOX | |||||
| # include <xtl.h> | # include <xtl.h> | ||||
| # undef near /* Fuck Microsoft */ | # undef near /* Fuck Microsoft */ | ||||
| # undef far /* Fuck Microsoft again */ | # undef far /* Fuck Microsoft again */ | ||||
| # include <xbox.h> | # include <xbox.h> | ||||
| #elif defined _WIN32 | |||||
| #elif _WIN32 | |||||
| # define WIN32_LEAN_AND_MEAN | # define WIN32_LEAN_AND_MEAN | ||||
| # include <windows.h> | # include <windows.h> | ||||
| #elif defined __CELLOS_LV2__ | |||||
| #elif __CELLOS_LV2__ | |||||
| # include <sys/sys_time.h> | # include <sys/sys_time.h> | ||||
| # include <sys/timer.h> | # include <sys/timer.h> | ||||
| # include <sys/time_util.h> | # include <sys/time_util.h> | ||||
| #elif defined HAVE_SDL_SDL_H | |||||
| #elif HAVE_SDL_SDL_H | |||||
| # include <SDL/SDL.h> | # include <SDL/SDL.h> | ||||
| #else | #else | ||||
| # include <SDL.h> | # include <SDL.h> | ||||
| @@ -55,7 +56,8 @@ private: | |||||
| (void)GetSeconds(true); | (void)GetSeconds(true); | ||||
| } | } | ||||
| #if defined __linux__ || defined __native_client__ || defined __APPLE__ | |||||
| #if __linux__ || __native_client__ || __APPLE__ \ | |||||
| || (HAVE_GETTIMEOFDAY && HAVE_USLEEP) | |||||
| float GetSeconds(bool reset) | float GetSeconds(bool reset) | ||||
| { | { | ||||
| struct timeval tv, tv0 = m_tv; | struct timeval tv, tv0 = m_tv; | ||||
| @@ -73,7 +75,7 @@ private: | |||||
| struct timeval m_tv; | struct timeval m_tv; | ||||
| #elif defined _WIN32 | |||||
| #elif _WIN32 | |||||
| float GetSeconds(bool reset) | float GetSeconds(bool reset) | ||||
| { | { | ||||
| static float secs_per_cycle = GetSecondsPerCycle(); | static float secs_per_cycle = GetSecondsPerCycle(); | ||||
| @@ -99,7 +101,7 @@ private: | |||||
| LARGE_INTEGER m_cycles; | LARGE_INTEGER m_cycles; | ||||
| #elif defined __CELLOS_LV2__ | |||||
| #elif __CELLOS_LV2__ | |||||
| float GetSeconds(bool reset) | float GetSeconds(bool reset) | ||||
| { | { | ||||
| static float secs_per_cycle = GetSecondsPerCycle(); | static float secs_per_cycle = GetSecondsPerCycle(); | ||||
| @@ -422,6 +422,11 @@ void TickerData::DrawThreadTick() | |||||
| Profiler::Stop(Profiler::STAT_TICK_DRAW); | Profiler::Stop(Profiler::STAT_TICK_DRAW); | ||||
| } | } | ||||
| void TickerData::DiskThreadTick() | |||||
| { | |||||
| ; | |||||
| } | |||||
| void Ticker::SetState(Entity * /* entity */, uint32_t /* state */) | void Ticker::SetState(Entity * /* entity */, uint32_t /* state */) | ||||
| { | { | ||||