source: trunk/monsterz/monsterz.cpp @ 680

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

Create the SdlApp class to avoid code duplication. Ensure USE_SDL is
tested wherever relevant.

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