93 rader
2.0 KiB

  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. //
  11. // The main header
  12. // ---------------
  13. //
  14. #if !defined __LOL_CORE_H__
  15. #define __LOL_CORE_H__
  16. // CPU features
  17. #undef LOL_FEATURE_CHEAP_BRANCHES
  18. #undef LOL_FEATURE_VERY_CHEAP_BRANCHES
  19. #if !defined __CELLOS_LV2__
  20. # define LOL_FEATURE_CHEAP_BRANCHES
  21. #endif
  22. // Optimisation helpers
  23. #if defined __GNUC__
  24. # define __likely(x) __builtin_expect(!!(x), 1)
  25. # define __unlikely(x) __builtin_expect(!!(x), 0)
  26. # define INLINEATTR __attribute__((always_inline))
  27. # if defined __CELLOS_LV2__
  28. # define FP_USE(x) __asm__("" : "+f" (x))
  29. # elif defined __x86_64__
  30. # define FP_USE(x) __asm__("" : "+x" (x))
  31. # elif defined _WIN32 /* FIXME: this isn't good */
  32. # define FP_USE(x) __asm__("" : "+m" (x))
  33. # elif defined __i386__
  34. # define FP_USE(x) __asm__("" : "+t" (x))
  35. # endif
  36. #else
  37. # define __likely(x) x
  38. # define __unlikely(x) x
  39. # define INLINEATTR
  40. # define FP_USE(x) (void)(x)
  41. #endif
  42. // Base types
  43. #include "trig.h"
  44. #include "half.h"
  45. #include "matrix.h"
  46. #include "numeric.h"
  47. #include "timer.h"
  48. // Static classes
  49. #include "log.h"
  50. #include "platform.h"
  51. #include "video.h"
  52. #include "audio.h"
  53. #include "scene.h"
  54. #include "input.h"
  55. #include "profiler.h"
  56. // Entities
  57. #include "entity.h"
  58. #include "worldentity.h"
  59. #include "emitter.h"
  60. #include "font.h"
  61. #include "gradient.h"
  62. #include "sample.h"
  63. #include "sprite.h"
  64. #include "text.h"
  65. #include "tileset.h"
  66. #include "world.h"
  67. // Other objects
  68. #include "hash.h"
  69. #include "dict.h"
  70. #include "map.h"
  71. #include "layer.h"
  72. #include "shader/shader.h"
  73. #include "image/image.h"
  74. // Managers
  75. #include "ticker.h"
  76. #include "forge.h"
  77. #include "tiler.h"
  78. #include "sampler.h"
  79. #endif // __LOL_CORE_H__