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.

преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://sam.zoy.org/projects/COPYING.WTFPL for more details.
  9. //
  10. #if defined HAVE_CONFIG_H
  11. # include "config.h"
  12. #endif
  13. #include <cstring>
  14. #include <cstdlib>
  15. #include <ctype.h>
  16. #include "core.h"
  17. namespace lol
  18. {
  19. /*
  20. * World implementation class
  21. */
  22. class WorldData
  23. {
  24. friend class World;
  25. private:
  26. int width, height;
  27. };
  28. /*
  29. * Public World class
  30. */
  31. World::World()
  32. : data(new WorldData())
  33. {
  34. data->width = 0;
  35. data->height = 0;
  36. m_drawgroup = DRAWGROUP_BEFORE;
  37. }
  38. World::~World()
  39. {
  40. delete data;
  41. }
  42. char const *World::GetName()
  43. {
  44. return "<world>";
  45. }
  46. void World::TickGame(float seconds)
  47. {
  48. Entity::TickGame(seconds);
  49. }
  50. void World::TickDraw(float seconds)
  51. {
  52. Entity::TickDraw(seconds);
  53. }
  54. int World::GetWidth()
  55. {
  56. return data->width * 32;
  57. }
  58. int World::GetHeight()
  59. {
  60. return data->height * 32;
  61. }
  62. } /* namespace lol */