source: trunk/tools/neercs/neercs.cpp @ 2139

Last change on this file since 2139 was 2000, checked in by sam, 8 years ago

neercs: add missing "loldebug.h" include.

File size: 1.5 KB
RevLine 
[1447]1//
2// Neercs
3//
4// Copyright: (c) 2012 Sam Hocevar <sam@hocevar.net>
5//
6
7#if defined HAVE_CONFIG_H
8#   include "config.h"
9#endif
10
11#if defined _WIN32
12#   include <direct.h>
13#endif
14
15#if defined _XBOX
16#   define _USE_MATH_DEFINES /* for M_PI */
17#   include <xtl.h>
18#   undef near /* Fuck Microsoft */
19#   undef far /* Fuck Microsoft again */
20#elif defined _WIN32
21#   define _USE_MATH_DEFINES /* for M_PI */
22#   define WIN32_LEAN_AND_MEAN
23#   include <windows.h>
24#   undef near /* Fuck Microsoft */
25#   undef far /* Fuck Microsoft again */
26#else
27#   include <cmath>
28#endif
29
[1486]30#include <time.h>
[1462]31#include <caca.h>
32
[1447]33#include "core.h"
34
35using namespace std;
36using namespace lol;
37
38#include "neercs.h"
[1456]39#include "video/render.h"
[1447]40
[1642]41extern "C"
42{
43#include "old/neercs.h"
44}
45
46Neercs::Neercs(int argc, char **argv)
[1866]47  : m_term(new Term(ivec2(45, 16))),
[1856]48    m_render(new Render(m_term->GetCaca())),
49    m_ready(false)
[1447]50{
[1856]51    Ticker::Ref(m_term);
[1462]52    Ticker::Ref(m_render);
[1447]53}
54
55void Neercs::TickGame(float seconds)
56{
57    WorldEntity::TickGame(seconds);
58}
59
60void Neercs::TickDraw(float seconds)
61{
62    WorldEntity::TickDraw(seconds);
63}
64
65Neercs::~Neercs()
66{
[1856]67    Ticker::Unref(m_term);
[1462]68    Ticker::Unref(m_render);
[1447]69}
70
71int main(int argc, char **argv)
72{
[1456]73    Application app("Neercs", ivec2(800, 600), 60.0f);
[1447]74
75#if defined _MSC_VER && !defined _XBOX
[1990]76    _chdir("../..");
[1447]77#elif defined _WIN32 && !defined _XBOX
78    _chdir("../..");
79#endif
80
[1642]81    new Neercs(argc, argv);
[1447]82    app.ShowPointer(false);
83
84    app.Run();
85
86    return EXIT_SUCCESS;
[1866]87}
Note: See TracBrowser for help on using the repository browser.