source: trunk/test/xolotl/xolotl.cpp @ 1645

Last change on this file since 1645 was 1645, checked in by sam, 9 years ago

core: switch the Win32/x64 binaries to the Windows subsystem so that they
do not open a console at startup.

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1//
2// Lol Engine - Xolotl algorithm test
3//
4// Copyright: (c) 2011 Soren Renner
5//            (c) 2011-2012 Sam Hocevar <sam@hocevar.net>
6//   This program is free software; you can redistribute it and/or
7//   modify it under the terms of the Do What The Fuck You Want To
8//   Public License, Version 2, as published by Sam Hocevar. See
9//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
10//
11
12#if defined HAVE_CONFIG_H
13#   include "config.h"
14#endif
15
16#include "core.h"
17#include "lolgl.h"
18#include "loldebug.h"
19
20using namespace lol;
21
22#if USE_SDL
23#   include <SDL_main.h>
24#endif
25
26#include "xolotl.h"
27
28class Xolotl : public WorldEntity
29{
30public:
31    Xolotl()
32    {
33        for(int i = 0; i < 2000; i++) {
34          float x = (i - 1000.0) / 100.0;
35          graph[i].x = x;
36          graph[i].y = lol::sin(x * 10.0) / (1.0 + x * x);
37        }
38    }
39
40    virtual ~Xolotl()
41    {
42
43    }
44
45    virtual char const *GetName() { return "Xolotl"; }
46
47    virtual void TickGame(float seconds)
48    {
49
50    }
51
52    virtual void TickDraw(float seconds)
53    {
54
55    }
56
57private:
58    vec2 graph[2000];
59};
60
61int main(int argc, char **argv)
62{
63    Application app("Xolotl", ivec2(640, 480), 60.0f);
64
65    /* Register some debug stuff */
66    new DebugFps(5, 5);
67
68    Cell<3> c;
69    app.Run();
70
71    return EXIT_SUCCESS;
72}
73
Note: See TracBrowser for help on using the repository browser.