Last change
on this file since 2345 was
2297,
checked in by sam, 10 years ago
|
base: implement UNUSED() macro and put it here and there.
|
-
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 | |
---|
20 | using namespace lol; |
---|
21 | |
---|
22 | #include "xolotl.h" |
---|
23 | |
---|
24 | class Xolotl : public WorldEntity |
---|
25 | { |
---|
26 | public: |
---|
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 | |
---|
53 | private: |
---|
54 | vec2 graph[2000]; |
---|
55 | }; |
---|
56 | |
---|
57 | int main(int argc, char **argv) |
---|
58 | { |
---|
59 | System::Init(argc, argv); |
---|
60 | |
---|
61 | Application app("Xolotl", ivec2(640, 480), 60.0f); |
---|
62 | |
---|
63 | /* Register some debug stuff */ |
---|
64 | new DebugFps(5, 5); |
---|
65 | |
---|
66 | Cell<3> c; |
---|
67 | app.Run(); |
---|
68 | |
---|
69 | return EXIT_SUCCESS; |
---|
70 | } |
---|
71 | |
---|
Note: See
TracBrowser
for help on using the repository browser.