source: trunk/monsterz/monsterz.cpp @ 900

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

core: move platform-specific code to specific directories.

  • Property svn:keywords set to Id
File size: 1.5 KB
RevLine 
[100]1//
[221]2// Monsterz
[100]3//
[221]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//
[13]10
[100]11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
[218]15#if defined _WIN32
16#   include <direct.h>
17#endif
[98]18
[680]19#include "core.h"
[684]20#include "lolgl.h"
[696]21#include "loldebug.h"
[13]22
[758]23using namespace std;
[686]24using namespace lol;
25
[758]26#if defined __CELLOS_LV2__
[865]27#   include "platform/ps3/ps3app.h"
28#   include "platform/ps3/ps3input.h"
[758]29#elif defined HAVE_GLES_2X
[684]30#   include "eglapp.h"
31#else
[865]32#   include "platform/sdl/sdlapp.h"
33#   include "platform/sdl/sdlinput.h"
[684]34#endif
[331]35#include "interface.h"
[223]36
[622]37#if defined _WIN32
[680]38#   undef main /* FIXME: still needed? */
[622]39#endif
40
[38]41int main(int argc, char **argv)
42{
[758]43#if defined __CELLOS_LV2__
[863]44    Ps3App app("Monsterz", ivec2(640, 480), 60.0f);
[758]45#elif defined HAVE_GLES_2X
[863]46    EglApp app("Monsterz", ivec2(640, 480), 60.0f);
[684]47#else
[863]48    SdlApp app("Monsterz", ivec2(640, 480), 60.0f);
[684]49#endif
[108]50
[218]51#if defined _WIN32
52    _chdir(".."); /* Temporary Win32 hack */
53#endif
[13]54
[111]55    /* Register an input driver and some debug stuff */
[838]56#if defined __CELLOS_LV2__
57    new Ps3Input();
58#elif !defined HAVE_GLES_2X
[170]59    new SdlInput();
[684]60#endif
[331]61    new Interface();
[427]62    new DebugFps(20, 20);
[615]63    //new DebugRecord("monsterz.ogm", FPS);
[103]64
[680]65    app.Run();
[108]66
[18]67    return EXIT_SUCCESS;
[13]68}
69
Note: See TracBrowser for help on using the repository browser.