source: trunk/monsterz/monsterz.cpp @ 686

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

Put everything in the "lol" namespace. Better late than never.

  • Property svn:keywords set to Id
File size: 1.2 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
22using namespace lol;
23
24#if defined HAVE_GLES_2X
25#   include "eglapp.h"
26#else
27#   include "sdlapp.h"
28#   include "sdlinput.h"
29#endif
30#include "interface.h"
31
32#include "debugfps.h"
33#include "debugrecord.h"
34
35#if defined _WIN32
36#   undef main /* FIXME: still needed? */
37#endif
38
39int main(int argc, char **argv)
40{
41#if defined HAVE_GLES_2X
42    EglApp app("Monsterz", vec2i(640, 480), 60.0f);
43#else
44    SdlApp app("Monsterz", vec2i(640, 480), 60.0f);
45#endif
46
47#if defined _WIN32
48    _chdir(".."); /* Temporary Win32 hack */
49#endif
50
51    /* Register an input driver and some debug stuff */
52#if !defined HAVE_GLES_2X
53    new SdlInput();
54#endif
55    new Interface();
56    new DebugFps(20, 20);
57    //new DebugRecord("monsterz.ogm", FPS);
58
59    app.Run();
60
61    return EXIT_SUCCESS;
62}
63
Note: See TracBrowser for help on using the repository browser.