You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // Lol Engine - Xolotl algorithm test
  3. //
  4. // Copyright: (c) 2011 Soren Renner
  5. // (c) 2011 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. #if defined HAVE_CONFIG_H
  12. # include "config.h"
  13. #endif
  14. #include "core.h"
  15. #include "lolgl.h"
  16. #include "loldebug.h"
  17. using namespace std;
  18. using namespace lol;
  19. #if USE_SDL && defined __APPLE__
  20. # include <SDL_main.h>
  21. #endif
  22. #if defined _WIN32
  23. # undef main /* FIXME: still needed? */
  24. #endif
  25. #include "xolotl.h"
  26. class Xolotl : public WorldEntity
  27. {
  28. public:
  29. Xolotl()
  30. {
  31. for(int i = 0; i < 2000; i++) {
  32. float x = (i - 1000.0) / 100.0;
  33. graph[i].x = x;
  34. graph[i].y = sin(x * 10.0) / (1.0 + x * x);
  35. }
  36. }
  37. virtual ~Xolotl()
  38. {
  39. }
  40. virtual char const *GetName() { return "Xolotl"; }
  41. virtual void TickGame(float deltams)
  42. {
  43. }
  44. virtual void TickDraw(float deltams)
  45. {
  46. }
  47. private:
  48. vec2 graph[2000];
  49. };
  50. int main(int argc, char **argv)
  51. {
  52. Application app("Xolotl", ivec2(640, 480), 60.0f);
  53. /* Register some debug stuff */
  54. new DebugFps(5, 5);
  55. Cell<3> c;
  56. app.Run();
  57. return EXIT_SUCCESS;
  58. }