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

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

build: fix the WTFPL site URL in all code comments.

  • Property svn:keywords set to Id
File size: 1.2 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://www.wtfpl.net/ 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#include "xolotl.h"
23
24class Xolotl : public WorldEntity
25{
26public:
27    Xolotl()
28    {
29        for(int i = 0; i < 2000; i++) {
30          float x = (i - 1000.0) / 100.0;
31          graph[i].x = x;
32          graph[i].y = lol::sin(x * 10.0) / (1.0 + x * x);
33        }
34    }
35
36    virtual ~Xolotl()
37    {
38
39    }
40
41    virtual char const *GetName() { return "Xolotl"; }
42
43    virtual void TickGame(float seconds)
44    {
45
46    }
47
48    virtual void TickDraw(float seconds)
49    {
50
51    }
52
53private:
54    vec2 graph[2000];
55};
56
57int main(int argc, char **argv)
58{
59    Application app("Xolotl", ivec2(640, 480), 60.0f);
60
61    /* Register some debug stuff */
62    new DebugFps(5, 5);
63
64    Cell<3> c;
65    app.Run();
66
67    return EXIT_SUCCESS;
68}
69
Note: See TracBrowser for help on using the repository browser.