source: trunk/deushax/deushax.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: 985 bytes
Line 
1//
2// Deus Hax (working title)
3// Copyright (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
4//
5
6#if defined HAVE_CONFIG_H
7#   include "config.h"
8#endif
9
10#if defined _WIN32
11#   include <direct.h>
12#endif
13
14#include "core.h"
15
16#include "game.h"
17#include "sdlapp.h"
18#include "sdlinput.h"
19#include "debugfps.h"
20#include "debugsprite.h"
21#include "debugsphere.h"
22#include "debugrecord.h"
23#include "debugstats.h"
24
25#if defined _WIN32
26#   undef main /* FIXME: still needed? */
27#endif
28
29int main(int argc, char **argv)
30{
31    SdlApp app("Map Test (SDL)", vec2i(640, 480), 30.0f);
32
33#if defined _WIN32
34    _chdir(".."); /* Temporary Win32 hack */
35#endif
36    Game *game = new Game("maps/testmap.tmx");
37    game->SetMouse(160, 96);
38
39    /* Register an input driver and some debug stuff */
40    new SdlInput();
41    new DebugFps(10, 10);
42    new DebugSprite(game);
43    new DebugSphere();
44    //new DebugRecord("lolengine.ogm", FPS);
45    new DebugStats("stats.txt");
46
47    app.Run();
48
49    return EXIT_SUCCESS;
50}
51
Note: See TracBrowser for help on using the repository browser.