lua_TextureCubeFace.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #include "Base.h"
  2. #include "lua_TextureCubeFace.h"
  3. namespace gameplay
  4. {
  5. static const char* enumStringEmpty = "";
  6. static const char* luaEnumString_TextureCubeFace_POSITIVE_X = "POSITIVE_X";
  7. static const char* luaEnumString_TextureCubeFace_NEGATIVE_X = "NEGATIVE_X";
  8. static const char* luaEnumString_TextureCubeFace_POSITIVE_Y = "POSITIVE_Y";
  9. static const char* luaEnumString_TextureCubeFace_NEGATIVE_Y = "NEGATIVE_Y";
  10. static const char* luaEnumString_TextureCubeFace_POSITIVE_Z = "POSITIVE_Z";
  11. static const char* luaEnumString_TextureCubeFace_NEGATIVE_Z = "NEGATIVE_Z";
  12. Texture::CubeFace lua_enumFromString_TextureCubeFace(const char* s)
  13. {
  14. if (strcmp(s, luaEnumString_TextureCubeFace_POSITIVE_X) == 0)
  15. return Texture::POSITIVE_X;
  16. if (strcmp(s, luaEnumString_TextureCubeFace_NEGATIVE_X) == 0)
  17. return Texture::NEGATIVE_X;
  18. if (strcmp(s, luaEnumString_TextureCubeFace_POSITIVE_Y) == 0)
  19. return Texture::POSITIVE_Y;
  20. if (strcmp(s, luaEnumString_TextureCubeFace_NEGATIVE_Y) == 0)
  21. return Texture::NEGATIVE_Y;
  22. if (strcmp(s, luaEnumString_TextureCubeFace_POSITIVE_Z) == 0)
  23. return Texture::POSITIVE_Z;
  24. if (strcmp(s, luaEnumString_TextureCubeFace_NEGATIVE_Z) == 0)
  25. return Texture::NEGATIVE_Z;
  26. return Texture::POSITIVE_X;
  27. }
  28. const char* lua_stringFromEnum_TextureCubeFace(Texture::CubeFace e)
  29. {
  30. if (e == Texture::POSITIVE_X)
  31. return luaEnumString_TextureCubeFace_POSITIVE_X;
  32. if (e == Texture::NEGATIVE_X)
  33. return luaEnumString_TextureCubeFace_NEGATIVE_X;
  34. if (e == Texture::POSITIVE_Y)
  35. return luaEnumString_TextureCubeFace_POSITIVE_Y;
  36. if (e == Texture::NEGATIVE_Y)
  37. return luaEnumString_TextureCubeFace_NEGATIVE_Y;
  38. if (e == Texture::POSITIVE_Z)
  39. return luaEnumString_TextureCubeFace_POSITIVE_Z;
  40. if (e == Texture::NEGATIVE_Z)
  41. return luaEnumString_TextureCubeFace_NEGATIVE_Z;
  42. return enumStringEmpty;
  43. }
  44. }