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

Last change on this file since 2278 was 2241, checked in by sam, 7 years ago

core: pass the project directory to the binary build and get rid of
that 2-year old "temporary Win32 hack".

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