source: trunk/src/test-map.cpp @ 106

Last change on this file since 106 was 106, checked in by sam, 11 years ago

Make the Game class an asset like the others.

  • Property svn:keywords set to Id
File size: 715 bytes
Line 
1//
2// Deus Hax (working title)
3// Copyright (c) 2010 Sam Hocevar <sam@hocevar.net>
4//
5
6#if defined HAVE_CONFIG_H
7#   include "config.h"
8#endif
9
10#include <cstdio>
11#include <cmath>
12
13#include <SDL.h>
14
15#include "sdlvideo.h"
16#include "sdlinput.h"
17#include "game.h"
18#include "ticker.h"
19
20int main(int argc, char **argv)
21{
22    SdlVideo *video = new SdlVideo("Deus Hax", 640, 480);
23    Game *game = new Game("maps/testmap.tmx");
24
25    /* Register the input driver */
26    new SdlInput(game);
27
28    while (!game->Finished())
29    {
30        Ticker::TickGame(33.33333f);
31
32        video->PreRender();
33        Ticker::TickRender(33.33333f);
34        video->PostRender(33.33333f);
35    }
36
37    delete video;
38
39    return EXIT_SUCCESS;
40}
41
Note: See TracBrowser for help on using the repository browser.