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