64 řádky
937 B

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2011 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 <cstdlib>
  14. #include <cmath>
  15. #include <SDL.h>
  16. #include "core.h"
  17. /*
  18. * Sample implementation class
  19. */
  20. class SampleData
  21. {
  22. friend class Sample;
  23. private:
  24. char *name;
  25. };
  26. /*
  27. * Public Sample class
  28. */
  29. Sample::Sample(char const *path)
  30. {
  31. data = new SampleData();
  32. data->name = strdup(path);
  33. }
  34. Sample::~Sample()
  35. {
  36. free(data->name);
  37. delete data;
  38. }
  39. void Sample::TickGame(float deltams)
  40. {
  41. Entity::TickGame(deltams);
  42. }
  43. char const *Sample::GetName()
  44. {
  45. return data->name;
  46. }
  47. void Sample::Play()
  48. {
  49. }