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

Last change on this file since 1858 was 1858, checked in by rez, 8 years ago

scrollable option list in setup

File size: 1.5 KB
Line 
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
30#include <time.h>
31#include <caca.h>
32
33#include "core.h"
34#include "loldebug.h"
35
36using namespace std;
37using namespace lol;
38
39#include "neercs.h"
40#include "video/render.h"
41
42extern "C"
43{
44#include "old/neercs.h"
45}
46
47Neercs::Neercs(int argc, char **argv)
48  : m_term(new Term(ivec2(80, 25))),
49    m_render(new Render(m_term->GetCaca())),
50    m_ready(false)
51{
52    Ticker::Ref(m_term);
53    Ticker::Ref(m_render);
54}
55
56void Neercs::TickGame(float seconds)
57{
58    WorldEntity::TickGame(seconds);
59}
60
61
62void Neercs::TickDraw(float seconds)
63{
64    WorldEntity::TickDraw(seconds);
65}
66
67Neercs::~Neercs()
68{
69    Ticker::Unref(m_term);
70    Ticker::Unref(m_render);
71}
72
73int main(int argc, char **argv)
74{
75    Application app("Neercs", ivec2(800, 600), 60.0f);
76
77#if defined _MSC_VER && !defined _XBOX
78    _chdir("..");
79#elif defined _WIN32 && !defined _XBOX
80    _chdir("../..");
81#endif
82
83    new Neercs(argc, argv);
84    new DebugFps(2, 2);
85    app.ShowPointer(false);
86
87    app.Run();
88
89    return EXIT_SUCCESS;
90}
Note: See TracBrowser for help on using the repository browser.