source: trunk/monsterz/monsterz.cpp @ 958

Last change on this file since 958 was 958, checked in by sam, 10 years ago

osx: automake does not support .mm files yet, so rename ios-image.mm back
to ios-image.cpp, but disable it on OS X because UIKit isn't available.

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1//
2// Monsterz
3//
4// Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
15#if defined _WIN32
16#   include <direct.h>
17#endif
18
19#include "core.h"
20#include "lolgl.h"
21#include "loldebug.h"
22
23using namespace std;
24using namespace lol;
25
26#if defined __CELLOS_LV2__
27#   include "platform/ps3/ps3app.h"
28#   include "platform/ps3/ps3input.h"
29#elif defined HAVE_GLES_2X
30#   include "eglapp.h"
31#else
32#   include "platform/sdl/sdlapp.h"
33#   include "platform/sdl/sdlinput.h"
34#endif
35#include "interface.h"
36
37#if USE_SDL
38#   include <SDL_main.h>
39#endif
40
41#if defined _WIN32
42#   undef main /* FIXME: still needed? */
43#endif
44
45int main(int argc, char **argv)
46{
47#if defined __CELLOS_LV2__
48    Ps3App app("Monsterz", ivec2(640, 480), 60.0f);
49#elif defined HAVE_GLES_2X
50    EglApp app("Monsterz", ivec2(640, 480), 60.0f);
51#else
52    SdlApp app("Monsterz", ivec2(640, 480), 60.0f);
53#endif
54
55#if defined _WIN32
56    _chdir(".."); /* Temporary Win32 hack */
57#endif
58
59    /* Register an input driver and some debug stuff */
60#if defined __CELLOS_LV2__
61    new Ps3Input();
62#elif !defined HAVE_GLES_2X
63    new SdlInput();
64#endif
65    new Interface();
66    new DebugFps(20, 20);
67    //new DebugRecord("monsterz.ogm", FPS);
68
69    app.Run();
70
71    return EXIT_SUCCESS;
72}
73
Note: See TracBrowser for help on using the repository browser.