lua_Global.cpp 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020
  1. #include "ScriptController.h"
  2. #include "lua_Global.h"
  3. namespace gameplay
  4. {
  5. void luaRegister_lua_Global()
  6. {
  7. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Button");
  8. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "CheckBox");
  9. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Container");
  10. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Control");
  11. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Form");
  12. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "ImageControl");
  13. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Joint");
  14. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Joystick");
  15. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Label");
  16. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "MaterialParameter");
  17. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Node");
  18. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "RadioButton");
  19. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Slider");
  20. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "TextBox");
  21. gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Transform");
  22. gameplay::ScriptUtil::setGlobalHierarchyPair("Button", "CheckBox");
  23. gameplay::ScriptUtil::setGlobalHierarchyPair("Button", "RadioButton");
  24. gameplay::ScriptUtil::setGlobalHierarchyPair("Camera::Listener", "AudioListener");
  25. gameplay::ScriptUtil::setGlobalHierarchyPair("Camera::Listener", "TerrainPatch");
  26. gameplay::ScriptUtil::setGlobalHierarchyPair("Container", "Form");
  27. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Button");
  28. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "CheckBox");
  29. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Container");
  30. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Form");
  31. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "ImageControl");
  32. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Joystick");
  33. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Label");
  34. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "RadioButton");
  35. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Slider");
  36. gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "TextBox");
  37. gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "Button");
  38. gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "CheckBox");
  39. gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "RadioButton");
  40. gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "Slider");
  41. gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "TextBox");
  42. gameplay::ScriptUtil::setGlobalHierarchyPair("Layout", "AbsoluteLayout");
  43. gameplay::ScriptUtil::setGlobalHierarchyPair("Layout", "FlowLayout");
  44. gameplay::ScriptUtil::setGlobalHierarchyPair("Layout", "VerticalLayout");
  45. gameplay::ScriptUtil::setGlobalHierarchyPair("Node", "Joint");
  46. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsCharacter");
  47. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsGhostObject");
  48. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsRigidBody");
  49. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsVehicle");
  50. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsVehicleWheel");
  51. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsFixedConstraint");
  52. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsGenericConstraint");
  53. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsHingeConstraint");
  54. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsSocketConstraint");
  55. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsSpringConstraint");
  56. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsGenericConstraint", "PhysicsFixedConstraint");
  57. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsGenericConstraint", "PhysicsSpringConstraint");
  58. gameplay::ScriptUtil::setGlobalHierarchyPair("PhysicsGhostObject", "PhysicsCharacter");
  59. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "AIAgent");
  60. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "AIState");
  61. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "AbsoluteLayout");
  62. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Animation");
  63. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "AnimationClip");
  64. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "AudioBuffer");
  65. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "AudioSource");
  66. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Bundle");
  67. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Button");
  68. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Camera");
  69. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "CheckBox");
  70. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Container");
  71. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Control");
  72. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Curve");
  73. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "DepthStencilTarget");
  74. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Effect");
  75. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "FlowLayout");
  76. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Font");
  77. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Form");
  78. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "FrameBuffer");
  79. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "HeightField");
  80. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Image");
  81. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "ImageControl");
  82. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Joint");
  83. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Joystick");
  84. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Label");
  85. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Layout");
  86. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Light");
  87. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Material");
  88. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "MaterialParameter");
  89. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Mesh");
  90. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Model");
  91. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Node");
  92. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "ParticleEmitter");
  93. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Pass");
  94. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "PhysicsCollisionShape");
  95. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "RadioButton");
  96. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "RenderState");
  97. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "RenderState::StateBlock");
  98. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "RenderTarget");
  99. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Scene");
  100. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Slider");
  101. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Technique");
  102. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Terrain");
  103. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "TextBox");
  104. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Texture");
  105. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Texture::Sampler");
  106. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Theme");
  107. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Theme::ThemeImage");
  108. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "VertexAttributeBinding");
  109. gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "VerticalLayout");
  110. gameplay::ScriptUtil::setGlobalHierarchyPair("RenderState", "Material");
  111. gameplay::ScriptUtil::setGlobalHierarchyPair("RenderState", "Pass");
  112. gameplay::ScriptUtil::setGlobalHierarchyPair("RenderState", "Technique");
  113. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "AIAgent");
  114. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "AIState");
  115. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Button");
  116. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "CheckBox");
  117. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Container");
  118. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Control");
  119. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Form");
  120. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "ImageControl");
  121. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Joint");
  122. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Joystick");
  123. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Label");
  124. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Node");
  125. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "PhysicsController");
  126. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "RadioButton");
  127. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Slider");
  128. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "TextBox");
  129. gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Transform");
  130. gameplay::ScriptUtil::setGlobalHierarchyPair("Transform", "Joint");
  131. gameplay::ScriptUtil::setGlobalHierarchyPair("Transform", "Node");
  132. gameplay::ScriptUtil::setGlobalHierarchyPair("Transform::Listener", "AudioSource");
  133. gameplay::ScriptUtil::setGlobalHierarchyPair("Transform::Listener", "Camera");
  134. gameplay::ScriptUtil::setGlobalHierarchyPair("Transform::Listener", "MeshSkin");
  135. gameplay::ScriptUtil::setGlobalHierarchyPair("Transform::Listener", "PhysicsCharacter");
  136. gameplay::ScriptUtil::setGlobalHierarchyPair("Transform::Listener", "PhysicsGhostObject");
  137. gameplay::ScriptUtil::setGlobalHierarchyPair("Transform::Listener", "PhysicsRigidBody");
  138. gameplay::ScriptUtil::setGlobalHierarchyPair("Transform::Listener", "Terrain");
  139. gameplay::ScriptUtil::addStringFromEnumConversionFunction(&gameplay::lua_stringFromEnumGlobal);
  140. // Register enumeration AIMessage::ParameterType.
  141. {
  142. std::vector<std::string> scopePath;
  143. scopePath.push_back("AIMessage");
  144. gameplay::ScriptUtil::registerConstantString("UNDEFINED", "UNDEFINED", scopePath);
  145. gameplay::ScriptUtil::registerConstantString("INTEGER", "INTEGER", scopePath);
  146. gameplay::ScriptUtil::registerConstantString("LONG", "LONG", scopePath);
  147. gameplay::ScriptUtil::registerConstantString("FLOAT", "FLOAT", scopePath);
  148. gameplay::ScriptUtil::registerConstantString("DOUBLE", "DOUBLE", scopePath);
  149. gameplay::ScriptUtil::registerConstantString("BOOLEAN", "BOOLEAN", scopePath);
  150. gameplay::ScriptUtil::registerConstantString("STRING", "STRING", scopePath);
  151. }
  152. // Register enumeration AnimationClip::Listener::EventType.
  153. {
  154. std::vector<std::string> scopePath;
  155. scopePath.push_back("AnimationClip");
  156. scopePath.push_back("Listener");
  157. gameplay::ScriptUtil::registerConstantString("BEGIN", "BEGIN", scopePath);
  158. gameplay::ScriptUtil::registerConstantString("END", "END", scopePath);
  159. gameplay::ScriptUtil::registerConstantString("TIME", "TIME", scopePath);
  160. }
  161. // Register enumeration AudioSource::State.
  162. {
  163. std::vector<std::string> scopePath;
  164. scopePath.push_back("AudioSource");
  165. gameplay::ScriptUtil::registerConstantString("INITIAL", "INITIAL", scopePath);
  166. gameplay::ScriptUtil::registerConstantString("PLAYING", "PLAYING", scopePath);
  167. gameplay::ScriptUtil::registerConstantString("PAUSED", "PAUSED", scopePath);
  168. gameplay::ScriptUtil::registerConstantString("STOPPED", "STOPPED", scopePath);
  169. }
  170. // Register enumeration Camera::Type.
  171. {
  172. std::vector<std::string> scopePath;
  173. scopePath.push_back("Camera");
  174. gameplay::ScriptUtil::registerConstantString("PERSPECTIVE", "PERSPECTIVE", scopePath);
  175. gameplay::ScriptUtil::registerConstantString("ORTHOGRAPHIC", "ORTHOGRAPHIC", scopePath);
  176. }
  177. // Register enumeration Container::Scroll.
  178. {
  179. std::vector<std::string> scopePath;
  180. scopePath.push_back("Container");
  181. gameplay::ScriptUtil::registerConstantString("SCROLL_NONE", "SCROLL_NONE", scopePath);
  182. gameplay::ScriptUtil::registerConstantString("SCROLL_HORIZONTAL", "SCROLL_HORIZONTAL", scopePath);
  183. gameplay::ScriptUtil::registerConstantString("SCROLL_VERTICAL", "SCROLL_VERTICAL", scopePath);
  184. gameplay::ScriptUtil::registerConstantString("SCROLL_BOTH", "SCROLL_BOTH", scopePath);
  185. }
  186. // Register enumeration Control::Alignment.
  187. {
  188. std::vector<std::string> scopePath;
  189. scopePath.push_back("Control");
  190. gameplay::ScriptUtil::registerConstantString("ALIGN_LEFT", "ALIGN_LEFT", scopePath);
  191. gameplay::ScriptUtil::registerConstantString("ALIGN_HCENTER", "ALIGN_HCENTER", scopePath);
  192. gameplay::ScriptUtil::registerConstantString("ALIGN_RIGHT", "ALIGN_RIGHT", scopePath);
  193. gameplay::ScriptUtil::registerConstantString("ALIGN_TOP", "ALIGN_TOP", scopePath);
  194. gameplay::ScriptUtil::registerConstantString("ALIGN_VCENTER", "ALIGN_VCENTER", scopePath);
  195. gameplay::ScriptUtil::registerConstantString("ALIGN_BOTTOM", "ALIGN_BOTTOM", scopePath);
  196. gameplay::ScriptUtil::registerConstantString("ALIGN_TOP_LEFT", "ALIGN_TOP_LEFT", scopePath);
  197. gameplay::ScriptUtil::registerConstantString("ALIGN_VCENTER_LEFT", "ALIGN_VCENTER_LEFT", scopePath);
  198. gameplay::ScriptUtil::registerConstantString("ALIGN_BOTTOM_LEFT", "ALIGN_BOTTOM_LEFT", scopePath);
  199. gameplay::ScriptUtil::registerConstantString("ALIGN_TOP_HCENTER", "ALIGN_TOP_HCENTER", scopePath);
  200. gameplay::ScriptUtil::registerConstantString("ALIGN_VCENTER_HCENTER", "ALIGN_VCENTER_HCENTER", scopePath);
  201. gameplay::ScriptUtil::registerConstantString("ALIGN_BOTTOM_HCENTER", "ALIGN_BOTTOM_HCENTER", scopePath);
  202. gameplay::ScriptUtil::registerConstantString("ALIGN_TOP_RIGHT", "ALIGN_TOP_RIGHT", scopePath);
  203. gameplay::ScriptUtil::registerConstantString("ALIGN_VCENTER_RIGHT", "ALIGN_VCENTER_RIGHT", scopePath);
  204. gameplay::ScriptUtil::registerConstantString("ALIGN_BOTTOM_RIGHT", "ALIGN_BOTTOM_RIGHT", scopePath);
  205. }
  206. // Register enumeration Control::AutoSize.
  207. {
  208. std::vector<std::string> scopePath;
  209. scopePath.push_back("Control");
  210. gameplay::ScriptUtil::registerConstantString("AUTO_SIZE_NONE", "AUTO_SIZE_NONE", scopePath);
  211. gameplay::ScriptUtil::registerConstantString("AUTO_SIZE_STRETCH", "AUTO_SIZE_STRETCH", scopePath);
  212. gameplay::ScriptUtil::registerConstantString("AUTO_SIZE_FIT", "AUTO_SIZE_FIT", scopePath);
  213. }
  214. // Register enumeration Control::Listener::EventType.
  215. {
  216. std::vector<std::string> scopePath;
  217. scopePath.push_back("Control");
  218. scopePath.push_back("Listener");
  219. gameplay::ScriptUtil::registerConstantString("PRESS", "PRESS", scopePath);
  220. gameplay::ScriptUtil::registerConstantString("RELEASE", "RELEASE", scopePath);
  221. gameplay::ScriptUtil::registerConstantString("CLICK", "CLICK", scopePath);
  222. gameplay::ScriptUtil::registerConstantString("VALUE_CHANGED", "VALUE_CHANGED", scopePath);
  223. gameplay::ScriptUtil::registerConstantString("TEXT_CHANGED", "TEXT_CHANGED", scopePath);
  224. gameplay::ScriptUtil::registerConstantString("MIDDLE_CLICK", "MIDDLE_CLICK", scopePath);
  225. gameplay::ScriptUtil::registerConstantString("RIGHT_CLICK", "RIGHT_CLICK", scopePath);
  226. gameplay::ScriptUtil::registerConstantString("ENTER", "ENTER", scopePath);
  227. gameplay::ScriptUtil::registerConstantString("LEAVE", "LEAVE", scopePath);
  228. gameplay::ScriptUtil::registerConstantString("FOCUS_GAINED", "FOCUS_GAINED", scopePath);
  229. gameplay::ScriptUtil::registerConstantString("FOCUS_LOST", "FOCUS_LOST", scopePath);
  230. }
  231. // Register enumeration Control::State.
  232. {
  233. std::vector<std::string> scopePath;
  234. scopePath.push_back("Control");
  235. gameplay::ScriptUtil::registerConstantString("NORMAL", "NORMAL", scopePath);
  236. gameplay::ScriptUtil::registerConstantString("FOCUS", "FOCUS", scopePath);
  237. gameplay::ScriptUtil::registerConstantString("ACTIVE", "ACTIVE", scopePath);
  238. gameplay::ScriptUtil::registerConstantString("DISABLED", "DISABLED", scopePath);
  239. gameplay::ScriptUtil::registerConstantString("HOVER", "HOVER", scopePath);
  240. }
  241. // Register enumeration Curve::InterpolationType.
  242. {
  243. std::vector<std::string> scopePath;
  244. scopePath.push_back("Curve");
  245. gameplay::ScriptUtil::registerConstantString("BEZIER", "BEZIER", scopePath);
  246. gameplay::ScriptUtil::registerConstantString("BSPLINE", "BSPLINE", scopePath);
  247. gameplay::ScriptUtil::registerConstantString("FLAT", "FLAT", scopePath);
  248. gameplay::ScriptUtil::registerConstantString("HERMITE", "HERMITE", scopePath);
  249. gameplay::ScriptUtil::registerConstantString("LINEAR", "LINEAR", scopePath);
  250. gameplay::ScriptUtil::registerConstantString("SMOOTH", "SMOOTH", scopePath);
  251. gameplay::ScriptUtil::registerConstantString("STEP", "STEP", scopePath);
  252. gameplay::ScriptUtil::registerConstantString("QUADRATIC_IN", "QUADRATIC_IN", scopePath);
  253. gameplay::ScriptUtil::registerConstantString("QUADRATIC_OUT", "QUADRATIC_OUT", scopePath);
  254. gameplay::ScriptUtil::registerConstantString("QUADRATIC_IN_OUT", "QUADRATIC_IN_OUT", scopePath);
  255. gameplay::ScriptUtil::registerConstantString("QUADRATIC_OUT_IN", "QUADRATIC_OUT_IN", scopePath);
  256. gameplay::ScriptUtil::registerConstantString("CUBIC_IN", "CUBIC_IN", scopePath);
  257. gameplay::ScriptUtil::registerConstantString("CUBIC_OUT", "CUBIC_OUT", scopePath);
  258. gameplay::ScriptUtil::registerConstantString("CUBIC_IN_OUT", "CUBIC_IN_OUT", scopePath);
  259. gameplay::ScriptUtil::registerConstantString("CUBIC_OUT_IN", "CUBIC_OUT_IN", scopePath);
  260. gameplay::ScriptUtil::registerConstantString("QUARTIC_IN", "QUARTIC_IN", scopePath);
  261. gameplay::ScriptUtil::registerConstantString("QUARTIC_OUT", "QUARTIC_OUT", scopePath);
  262. gameplay::ScriptUtil::registerConstantString("QUARTIC_IN_OUT", "QUARTIC_IN_OUT", scopePath);
  263. gameplay::ScriptUtil::registerConstantString("QUARTIC_OUT_IN", "QUARTIC_OUT_IN", scopePath);
  264. gameplay::ScriptUtil::registerConstantString("QUINTIC_IN", "QUINTIC_IN", scopePath);
  265. gameplay::ScriptUtil::registerConstantString("QUINTIC_OUT", "QUINTIC_OUT", scopePath);
  266. gameplay::ScriptUtil::registerConstantString("QUINTIC_IN_OUT", "QUINTIC_IN_OUT", scopePath);
  267. gameplay::ScriptUtil::registerConstantString("QUINTIC_OUT_IN", "QUINTIC_OUT_IN", scopePath);
  268. gameplay::ScriptUtil::registerConstantString("SINE_IN", "SINE_IN", scopePath);
  269. gameplay::ScriptUtil::registerConstantString("SINE_OUT", "SINE_OUT", scopePath);
  270. gameplay::ScriptUtil::registerConstantString("SINE_IN_OUT", "SINE_IN_OUT", scopePath);
  271. gameplay::ScriptUtil::registerConstantString("SINE_OUT_IN", "SINE_OUT_IN", scopePath);
  272. gameplay::ScriptUtil::registerConstantString("EXPONENTIAL_IN", "EXPONENTIAL_IN", scopePath);
  273. gameplay::ScriptUtil::registerConstantString("EXPONENTIAL_OUT", "EXPONENTIAL_OUT", scopePath);
  274. gameplay::ScriptUtil::registerConstantString("EXPONENTIAL_IN_OUT", "EXPONENTIAL_IN_OUT", scopePath);
  275. gameplay::ScriptUtil::registerConstantString("EXPONENTIAL_OUT_IN", "EXPONENTIAL_OUT_IN", scopePath);
  276. gameplay::ScriptUtil::registerConstantString("CIRCULAR_IN", "CIRCULAR_IN", scopePath);
  277. gameplay::ScriptUtil::registerConstantString("CIRCULAR_OUT", "CIRCULAR_OUT", scopePath);
  278. gameplay::ScriptUtil::registerConstantString("CIRCULAR_IN_OUT", "CIRCULAR_IN_OUT", scopePath);
  279. gameplay::ScriptUtil::registerConstantString("CIRCULAR_OUT_IN", "CIRCULAR_OUT_IN", scopePath);
  280. gameplay::ScriptUtil::registerConstantString("ELASTIC_IN", "ELASTIC_IN", scopePath);
  281. gameplay::ScriptUtil::registerConstantString("ELASTIC_OUT", "ELASTIC_OUT", scopePath);
  282. gameplay::ScriptUtil::registerConstantString("ELASTIC_IN_OUT", "ELASTIC_IN_OUT", scopePath);
  283. gameplay::ScriptUtil::registerConstantString("ELASTIC_OUT_IN", "ELASTIC_OUT_IN", scopePath);
  284. gameplay::ScriptUtil::registerConstantString("OVERSHOOT_IN", "OVERSHOOT_IN", scopePath);
  285. gameplay::ScriptUtil::registerConstantString("OVERSHOOT_OUT", "OVERSHOOT_OUT", scopePath);
  286. gameplay::ScriptUtil::registerConstantString("OVERSHOOT_IN_OUT", "OVERSHOOT_IN_OUT", scopePath);
  287. gameplay::ScriptUtil::registerConstantString("OVERSHOOT_OUT_IN", "OVERSHOOT_OUT_IN", scopePath);
  288. gameplay::ScriptUtil::registerConstantString("BOUNCE_IN", "BOUNCE_IN", scopePath);
  289. gameplay::ScriptUtil::registerConstantString("BOUNCE_OUT", "BOUNCE_OUT", scopePath);
  290. gameplay::ScriptUtil::registerConstantString("BOUNCE_IN_OUT", "BOUNCE_IN_OUT", scopePath);
  291. gameplay::ScriptUtil::registerConstantString("BOUNCE_OUT_IN", "BOUNCE_OUT_IN", scopePath);
  292. }
  293. // Register enumeration DepthStencilTarget::Format.
  294. {
  295. std::vector<std::string> scopePath;
  296. scopePath.push_back("DepthStencilTarget");
  297. gameplay::ScriptUtil::registerConstantString("DEPTH", "DEPTH", scopePath);
  298. gameplay::ScriptUtil::registerConstantString("DEPTH_STENCIL", "DEPTH_STENCIL", scopePath);
  299. }
  300. // Register enumeration Font::Format.
  301. {
  302. std::vector<std::string> scopePath;
  303. scopePath.push_back("Font");
  304. gameplay::ScriptUtil::registerConstantString("BITMAP", "BITMAP", scopePath);
  305. gameplay::ScriptUtil::registerConstantString("DISTANCE_FIELD", "DISTANCE_FIELD", scopePath);
  306. }
  307. // Register enumeration Font::Justify.
  308. {
  309. std::vector<std::string> scopePath;
  310. scopePath.push_back("Font");
  311. gameplay::ScriptUtil::registerConstantString("ALIGN_LEFT", "ALIGN_LEFT", scopePath);
  312. gameplay::ScriptUtil::registerConstantString("ALIGN_HCENTER", "ALIGN_HCENTER", scopePath);
  313. gameplay::ScriptUtil::registerConstantString("ALIGN_RIGHT", "ALIGN_RIGHT", scopePath);
  314. gameplay::ScriptUtil::registerConstantString("ALIGN_TOP", "ALIGN_TOP", scopePath);
  315. gameplay::ScriptUtil::registerConstantString("ALIGN_VCENTER", "ALIGN_VCENTER", scopePath);
  316. gameplay::ScriptUtil::registerConstantString("ALIGN_BOTTOM", "ALIGN_BOTTOM", scopePath);
  317. gameplay::ScriptUtil::registerConstantString("ALIGN_TOP_LEFT", "ALIGN_TOP_LEFT", scopePath);
  318. gameplay::ScriptUtil::registerConstantString("ALIGN_VCENTER_LEFT", "ALIGN_VCENTER_LEFT", scopePath);
  319. gameplay::ScriptUtil::registerConstantString("ALIGN_BOTTOM_LEFT", "ALIGN_BOTTOM_LEFT", scopePath);
  320. gameplay::ScriptUtil::registerConstantString("ALIGN_TOP_HCENTER", "ALIGN_TOP_HCENTER", scopePath);
  321. gameplay::ScriptUtil::registerConstantString("ALIGN_VCENTER_HCENTER", "ALIGN_VCENTER_HCENTER", scopePath);
  322. gameplay::ScriptUtil::registerConstantString("ALIGN_BOTTOM_HCENTER", "ALIGN_BOTTOM_HCENTER", scopePath);
  323. gameplay::ScriptUtil::registerConstantString("ALIGN_TOP_RIGHT", "ALIGN_TOP_RIGHT", scopePath);
  324. gameplay::ScriptUtil::registerConstantString("ALIGN_VCENTER_RIGHT", "ALIGN_VCENTER_RIGHT", scopePath);
  325. gameplay::ScriptUtil::registerConstantString("ALIGN_BOTTOM_RIGHT", "ALIGN_BOTTOM_RIGHT", scopePath);
  326. }
  327. // Register enumeration Font::Style.
  328. {
  329. std::vector<std::string> scopePath;
  330. scopePath.push_back("Font");
  331. gameplay::ScriptUtil::registerConstantString("PLAIN", "PLAIN", scopePath);
  332. gameplay::ScriptUtil::registerConstantString("BOLD", "BOLD", scopePath);
  333. gameplay::ScriptUtil::registerConstantString("ITALIC", "ITALIC", scopePath);
  334. gameplay::ScriptUtil::registerConstantString("BOLD_ITALIC", "BOLD_ITALIC", scopePath);
  335. }
  336. // Register enumeration Game::ClearFlags.
  337. {
  338. std::vector<std::string> scopePath;
  339. scopePath.push_back("Game");
  340. gameplay::ScriptUtil::registerConstantString("CLEAR_COLOR", "CLEAR_COLOR", scopePath);
  341. gameplay::ScriptUtil::registerConstantString("CLEAR_DEPTH", "CLEAR_DEPTH", scopePath);
  342. gameplay::ScriptUtil::registerConstantString("CLEAR_STENCIL", "CLEAR_STENCIL", scopePath);
  343. gameplay::ScriptUtil::registerConstantString("CLEAR_COLOR_DEPTH", "CLEAR_COLOR_DEPTH", scopePath);
  344. gameplay::ScriptUtil::registerConstantString("CLEAR_COLOR_STENCIL", "CLEAR_COLOR_STENCIL", scopePath);
  345. gameplay::ScriptUtil::registerConstantString("CLEAR_DEPTH_STENCIL", "CLEAR_DEPTH_STENCIL", scopePath);
  346. gameplay::ScriptUtil::registerConstantString("CLEAR_COLOR_DEPTH_STENCIL", "CLEAR_COLOR_DEPTH_STENCIL", scopePath);
  347. }
  348. // Register enumeration Game::State.
  349. {
  350. std::vector<std::string> scopePath;
  351. scopePath.push_back("Game");
  352. gameplay::ScriptUtil::registerConstantString("UNINITIALIZED", "UNINITIALIZED", scopePath);
  353. gameplay::ScriptUtil::registerConstantString("RUNNING", "RUNNING", scopePath);
  354. gameplay::ScriptUtil::registerConstantString("PAUSED", "PAUSED", scopePath);
  355. }
  356. // Register enumeration Gamepad::ButtonMapping.
  357. {
  358. std::vector<std::string> scopePath;
  359. scopePath.push_back("Gamepad");
  360. gameplay::ScriptUtil::registerConstantString("BUTTON_A", "BUTTON_A", scopePath);
  361. gameplay::ScriptUtil::registerConstantString("BUTTON_B", "BUTTON_B", scopePath);
  362. gameplay::ScriptUtil::registerConstantString("BUTTON_C", "BUTTON_C", scopePath);
  363. gameplay::ScriptUtil::registerConstantString("BUTTON_X", "BUTTON_X", scopePath);
  364. gameplay::ScriptUtil::registerConstantString("BUTTON_Y", "BUTTON_Y", scopePath);
  365. gameplay::ScriptUtil::registerConstantString("BUTTON_Z", "BUTTON_Z", scopePath);
  366. gameplay::ScriptUtil::registerConstantString("BUTTON_MENU1", "BUTTON_MENU1", scopePath);
  367. gameplay::ScriptUtil::registerConstantString("BUTTON_MENU2", "BUTTON_MENU2", scopePath);
  368. gameplay::ScriptUtil::registerConstantString("BUTTON_MENU3", "BUTTON_MENU3", scopePath);
  369. gameplay::ScriptUtil::registerConstantString("BUTTON_MENU4", "BUTTON_MENU4", scopePath);
  370. gameplay::ScriptUtil::registerConstantString("BUTTON_L1", "BUTTON_L1", scopePath);
  371. gameplay::ScriptUtil::registerConstantString("BUTTON_L2", "BUTTON_L2", scopePath);
  372. gameplay::ScriptUtil::registerConstantString("BUTTON_L3", "BUTTON_L3", scopePath);
  373. gameplay::ScriptUtil::registerConstantString("BUTTON_R1", "BUTTON_R1", scopePath);
  374. gameplay::ScriptUtil::registerConstantString("BUTTON_R2", "BUTTON_R2", scopePath);
  375. gameplay::ScriptUtil::registerConstantString("BUTTON_R3", "BUTTON_R3", scopePath);
  376. gameplay::ScriptUtil::registerConstantString("BUTTON_UP", "BUTTON_UP", scopePath);
  377. gameplay::ScriptUtil::registerConstantString("BUTTON_DOWN", "BUTTON_DOWN", scopePath);
  378. gameplay::ScriptUtil::registerConstantString("BUTTON_LEFT", "BUTTON_LEFT", scopePath);
  379. gameplay::ScriptUtil::registerConstantString("BUTTON_RIGHT", "BUTTON_RIGHT", scopePath);
  380. }
  381. // Register enumeration Gamepad::GamepadEvent.
  382. {
  383. std::vector<std::string> scopePath;
  384. scopePath.push_back("Gamepad");
  385. gameplay::ScriptUtil::registerConstantString("CONNECTED_EVENT", "CONNECTED_EVENT", scopePath);
  386. gameplay::ScriptUtil::registerConstantString("DISCONNECTED_EVENT", "DISCONNECTED_EVENT", scopePath);
  387. gameplay::ScriptUtil::registerConstantString("BUTTON_EVENT", "BUTTON_EVENT", scopePath);
  388. gameplay::ScriptUtil::registerConstantString("JOYSTICK_EVENT", "JOYSTICK_EVENT", scopePath);
  389. gameplay::ScriptUtil::registerConstantString("TRIGGER_EVENT", "TRIGGER_EVENT", scopePath);
  390. }
  391. // Register enumeration Gesture::GestureEvent.
  392. {
  393. std::vector<std::string> scopePath;
  394. scopePath.push_back("Gesture");
  395. gameplay::ScriptUtil::registerConstantString("GESTURE_TAP", "GESTURE_TAP", scopePath);
  396. gameplay::ScriptUtil::registerConstantString("GESTURE_SWIPE", "GESTURE_SWIPE", scopePath);
  397. gameplay::ScriptUtil::registerConstantString("GESTURE_PINCH", "GESTURE_PINCH", scopePath);
  398. gameplay::ScriptUtil::registerConstantString("GESTURE_LONG_TAP", "GESTURE_LONG_TAP", scopePath);
  399. gameplay::ScriptUtil::registerConstantString("GESTURE_DRAG", "GESTURE_DRAG", scopePath);
  400. gameplay::ScriptUtil::registerConstantString("GESTURE_DROP", "GESTURE_DROP", scopePath);
  401. gameplay::ScriptUtil::registerConstantString("GESTURE_ANY_SUPPORTED", "GESTURE_ANY_SUPPORTED", scopePath);
  402. }
  403. // Register enumeration Image::Format.
  404. {
  405. std::vector<std::string> scopePath;
  406. scopePath.push_back("Image");
  407. gameplay::ScriptUtil::registerConstantString("RGB", "RGB", scopePath);
  408. gameplay::ScriptUtil::registerConstantString("RGBA", "RGBA", scopePath);
  409. }
  410. // Register enumeration Keyboard::Key.
  411. {
  412. std::vector<std::string> scopePath;
  413. scopePath.push_back("Keyboard");
  414. gameplay::ScriptUtil::registerConstantString("KEY_NONE", "KEY_NONE", scopePath);
  415. gameplay::ScriptUtil::registerConstantString("KEY_PAUSE", "KEY_PAUSE", scopePath);
  416. gameplay::ScriptUtil::registerConstantString("KEY_SCROLL_LOCK", "KEY_SCROLL_LOCK", scopePath);
  417. gameplay::ScriptUtil::registerConstantString("KEY_PRINT", "KEY_PRINT", scopePath);
  418. gameplay::ScriptUtil::registerConstantString("KEY_SYSREQ", "KEY_SYSREQ", scopePath);
  419. gameplay::ScriptUtil::registerConstantString("KEY_BREAK", "KEY_BREAK", scopePath);
  420. gameplay::ScriptUtil::registerConstantString("KEY_ESCAPE", "KEY_ESCAPE", scopePath);
  421. gameplay::ScriptUtil::registerConstantString("KEY_BACKSPACE", "KEY_BACKSPACE", scopePath);
  422. gameplay::ScriptUtil::registerConstantString("KEY_TAB", "KEY_TAB", scopePath);
  423. gameplay::ScriptUtil::registerConstantString("KEY_BACK_TAB", "KEY_BACK_TAB", scopePath);
  424. gameplay::ScriptUtil::registerConstantString("KEY_RETURN", "KEY_RETURN", scopePath);
  425. gameplay::ScriptUtil::registerConstantString("KEY_CAPS_LOCK", "KEY_CAPS_LOCK", scopePath);
  426. gameplay::ScriptUtil::registerConstantString("KEY_SHIFT", "KEY_SHIFT", scopePath);
  427. gameplay::ScriptUtil::registerConstantString("KEY_CTRL", "KEY_CTRL", scopePath);
  428. gameplay::ScriptUtil::registerConstantString("KEY_ALT", "KEY_ALT", scopePath);
  429. gameplay::ScriptUtil::registerConstantString("KEY_MENU", "KEY_MENU", scopePath);
  430. gameplay::ScriptUtil::registerConstantString("KEY_HYPER", "KEY_HYPER", scopePath);
  431. gameplay::ScriptUtil::registerConstantString("KEY_INSERT", "KEY_INSERT", scopePath);
  432. gameplay::ScriptUtil::registerConstantString("KEY_HOME", "KEY_HOME", scopePath);
  433. gameplay::ScriptUtil::registerConstantString("KEY_PG_UP", "KEY_PG_UP", scopePath);
  434. gameplay::ScriptUtil::registerConstantString("KEY_DELETE", "KEY_DELETE", scopePath);
  435. gameplay::ScriptUtil::registerConstantString("KEY_END", "KEY_END", scopePath);
  436. gameplay::ScriptUtil::registerConstantString("KEY_PG_DOWN", "KEY_PG_DOWN", scopePath);
  437. gameplay::ScriptUtil::registerConstantString("KEY_LEFT_ARROW", "KEY_LEFT_ARROW", scopePath);
  438. gameplay::ScriptUtil::registerConstantString("KEY_RIGHT_ARROW", "KEY_RIGHT_ARROW", scopePath);
  439. gameplay::ScriptUtil::registerConstantString("KEY_UP_ARROW", "KEY_UP_ARROW", scopePath);
  440. gameplay::ScriptUtil::registerConstantString("KEY_DOWN_ARROW", "KEY_DOWN_ARROW", scopePath);
  441. gameplay::ScriptUtil::registerConstantString("KEY_NUM_LOCK", "KEY_NUM_LOCK", scopePath);
  442. gameplay::ScriptUtil::registerConstantString("KEY_KP_PLUS", "KEY_KP_PLUS", scopePath);
  443. gameplay::ScriptUtil::registerConstantString("KEY_KP_MINUS", "KEY_KP_MINUS", scopePath);
  444. gameplay::ScriptUtil::registerConstantString("KEY_KP_MULTIPLY", "KEY_KP_MULTIPLY", scopePath);
  445. gameplay::ScriptUtil::registerConstantString("KEY_KP_DIVIDE", "KEY_KP_DIVIDE", scopePath);
  446. gameplay::ScriptUtil::registerConstantString("KEY_KP_ENTER", "KEY_KP_ENTER", scopePath);
  447. gameplay::ScriptUtil::registerConstantString("KEY_KP_HOME", "KEY_KP_HOME", scopePath);
  448. gameplay::ScriptUtil::registerConstantString("KEY_KP_UP", "KEY_KP_UP", scopePath);
  449. gameplay::ScriptUtil::registerConstantString("KEY_KP_PG_UP", "KEY_KP_PG_UP", scopePath);
  450. gameplay::ScriptUtil::registerConstantString("KEY_KP_LEFT", "KEY_KP_LEFT", scopePath);
  451. gameplay::ScriptUtil::registerConstantString("KEY_KP_FIVE", "KEY_KP_FIVE", scopePath);
  452. gameplay::ScriptUtil::registerConstantString("KEY_KP_RIGHT", "KEY_KP_RIGHT", scopePath);
  453. gameplay::ScriptUtil::registerConstantString("KEY_KP_END", "KEY_KP_END", scopePath);
  454. gameplay::ScriptUtil::registerConstantString("KEY_KP_DOWN", "KEY_KP_DOWN", scopePath);
  455. gameplay::ScriptUtil::registerConstantString("KEY_KP_PG_DOWN", "KEY_KP_PG_DOWN", scopePath);
  456. gameplay::ScriptUtil::registerConstantString("KEY_KP_INSERT", "KEY_KP_INSERT", scopePath);
  457. gameplay::ScriptUtil::registerConstantString("KEY_KP_DELETE", "KEY_KP_DELETE", scopePath);
  458. gameplay::ScriptUtil::registerConstantString("KEY_F1", "KEY_F1", scopePath);
  459. gameplay::ScriptUtil::registerConstantString("KEY_F2", "KEY_F2", scopePath);
  460. gameplay::ScriptUtil::registerConstantString("KEY_F3", "KEY_F3", scopePath);
  461. gameplay::ScriptUtil::registerConstantString("KEY_F4", "KEY_F4", scopePath);
  462. gameplay::ScriptUtil::registerConstantString("KEY_F5", "KEY_F5", scopePath);
  463. gameplay::ScriptUtil::registerConstantString("KEY_F6", "KEY_F6", scopePath);
  464. gameplay::ScriptUtil::registerConstantString("KEY_F7", "KEY_F7", scopePath);
  465. gameplay::ScriptUtil::registerConstantString("KEY_F8", "KEY_F8", scopePath);
  466. gameplay::ScriptUtil::registerConstantString("KEY_F9", "KEY_F9", scopePath);
  467. gameplay::ScriptUtil::registerConstantString("KEY_F10", "KEY_F10", scopePath);
  468. gameplay::ScriptUtil::registerConstantString("KEY_F11", "KEY_F11", scopePath);
  469. gameplay::ScriptUtil::registerConstantString("KEY_F12", "KEY_F12", scopePath);
  470. gameplay::ScriptUtil::registerConstantString("KEY_SPACE", "KEY_SPACE", scopePath);
  471. gameplay::ScriptUtil::registerConstantString("KEY_EXCLAM", "KEY_EXCLAM", scopePath);
  472. gameplay::ScriptUtil::registerConstantString("KEY_QUOTE", "KEY_QUOTE", scopePath);
  473. gameplay::ScriptUtil::registerConstantString("KEY_NUMBER", "KEY_NUMBER", scopePath);
  474. gameplay::ScriptUtil::registerConstantString("KEY_DOLLAR", "KEY_DOLLAR", scopePath);
  475. gameplay::ScriptUtil::registerConstantString("KEY_PERCENT", "KEY_PERCENT", scopePath);
  476. gameplay::ScriptUtil::registerConstantString("KEY_CIRCUMFLEX", "KEY_CIRCUMFLEX", scopePath);
  477. gameplay::ScriptUtil::registerConstantString("KEY_AMPERSAND", "KEY_AMPERSAND", scopePath);
  478. gameplay::ScriptUtil::registerConstantString("KEY_APOSTROPHE", "KEY_APOSTROPHE", scopePath);
  479. gameplay::ScriptUtil::registerConstantString("KEY_LEFT_PARENTHESIS", "KEY_LEFT_PARENTHESIS", scopePath);
  480. gameplay::ScriptUtil::registerConstantString("KEY_RIGHT_PARENTHESIS", "KEY_RIGHT_PARENTHESIS", scopePath);
  481. gameplay::ScriptUtil::registerConstantString("KEY_ASTERISK", "KEY_ASTERISK", scopePath);
  482. gameplay::ScriptUtil::registerConstantString("KEY_PLUS", "KEY_PLUS", scopePath);
  483. gameplay::ScriptUtil::registerConstantString("KEY_COMMA", "KEY_COMMA", scopePath);
  484. gameplay::ScriptUtil::registerConstantString("KEY_MINUS", "KEY_MINUS", scopePath);
  485. gameplay::ScriptUtil::registerConstantString("KEY_PERIOD", "KEY_PERIOD", scopePath);
  486. gameplay::ScriptUtil::registerConstantString("KEY_SLASH", "KEY_SLASH", scopePath);
  487. gameplay::ScriptUtil::registerConstantString("KEY_ZERO", "KEY_ZERO", scopePath);
  488. gameplay::ScriptUtil::registerConstantString("KEY_ONE", "KEY_ONE", scopePath);
  489. gameplay::ScriptUtil::registerConstantString("KEY_TWO", "KEY_TWO", scopePath);
  490. gameplay::ScriptUtil::registerConstantString("KEY_THREE", "KEY_THREE", scopePath);
  491. gameplay::ScriptUtil::registerConstantString("KEY_FOUR", "KEY_FOUR", scopePath);
  492. gameplay::ScriptUtil::registerConstantString("KEY_FIVE", "KEY_FIVE", scopePath);
  493. gameplay::ScriptUtil::registerConstantString("KEY_SIX", "KEY_SIX", scopePath);
  494. gameplay::ScriptUtil::registerConstantString("KEY_SEVEN", "KEY_SEVEN", scopePath);
  495. gameplay::ScriptUtil::registerConstantString("KEY_EIGHT", "KEY_EIGHT", scopePath);
  496. gameplay::ScriptUtil::registerConstantString("KEY_NINE", "KEY_NINE", scopePath);
  497. gameplay::ScriptUtil::registerConstantString("KEY_COLON", "KEY_COLON", scopePath);
  498. gameplay::ScriptUtil::registerConstantString("KEY_SEMICOLON", "KEY_SEMICOLON", scopePath);
  499. gameplay::ScriptUtil::registerConstantString("KEY_LESS_THAN", "KEY_LESS_THAN", scopePath);
  500. gameplay::ScriptUtil::registerConstantString("KEY_EQUAL", "KEY_EQUAL", scopePath);
  501. gameplay::ScriptUtil::registerConstantString("KEY_GREATER_THAN", "KEY_GREATER_THAN", scopePath);
  502. gameplay::ScriptUtil::registerConstantString("KEY_QUESTION", "KEY_QUESTION", scopePath);
  503. gameplay::ScriptUtil::registerConstantString("KEY_AT", "KEY_AT", scopePath);
  504. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_A", "KEY_CAPITAL_A", scopePath);
  505. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_B", "KEY_CAPITAL_B", scopePath);
  506. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_C", "KEY_CAPITAL_C", scopePath);
  507. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_D", "KEY_CAPITAL_D", scopePath);
  508. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_E", "KEY_CAPITAL_E", scopePath);
  509. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_F", "KEY_CAPITAL_F", scopePath);
  510. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_G", "KEY_CAPITAL_G", scopePath);
  511. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_H", "KEY_CAPITAL_H", scopePath);
  512. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_I", "KEY_CAPITAL_I", scopePath);
  513. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_J", "KEY_CAPITAL_J", scopePath);
  514. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_K", "KEY_CAPITAL_K", scopePath);
  515. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_L", "KEY_CAPITAL_L", scopePath);
  516. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_M", "KEY_CAPITAL_M", scopePath);
  517. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_N", "KEY_CAPITAL_N", scopePath);
  518. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_O", "KEY_CAPITAL_O", scopePath);
  519. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_P", "KEY_CAPITAL_P", scopePath);
  520. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_Q", "KEY_CAPITAL_Q", scopePath);
  521. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_R", "KEY_CAPITAL_R", scopePath);
  522. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_S", "KEY_CAPITAL_S", scopePath);
  523. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_T", "KEY_CAPITAL_T", scopePath);
  524. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_U", "KEY_CAPITAL_U", scopePath);
  525. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_V", "KEY_CAPITAL_V", scopePath);
  526. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_W", "KEY_CAPITAL_W", scopePath);
  527. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_X", "KEY_CAPITAL_X", scopePath);
  528. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_Y", "KEY_CAPITAL_Y", scopePath);
  529. gameplay::ScriptUtil::registerConstantString("KEY_CAPITAL_Z", "KEY_CAPITAL_Z", scopePath);
  530. gameplay::ScriptUtil::registerConstantString("KEY_LEFT_BRACKET", "KEY_LEFT_BRACKET", scopePath);
  531. gameplay::ScriptUtil::registerConstantString("KEY_BACK_SLASH", "KEY_BACK_SLASH", scopePath);
  532. gameplay::ScriptUtil::registerConstantString("KEY_RIGHT_BRACKET", "KEY_RIGHT_BRACKET", scopePath);
  533. gameplay::ScriptUtil::registerConstantString("KEY_UNDERSCORE", "KEY_UNDERSCORE", scopePath);
  534. gameplay::ScriptUtil::registerConstantString("KEY_GRAVE", "KEY_GRAVE", scopePath);
  535. gameplay::ScriptUtil::registerConstantString("KEY_A", "KEY_A", scopePath);
  536. gameplay::ScriptUtil::registerConstantString("KEY_B", "KEY_B", scopePath);
  537. gameplay::ScriptUtil::registerConstantString("KEY_C", "KEY_C", scopePath);
  538. gameplay::ScriptUtil::registerConstantString("KEY_D", "KEY_D", scopePath);
  539. gameplay::ScriptUtil::registerConstantString("KEY_E", "KEY_E", scopePath);
  540. gameplay::ScriptUtil::registerConstantString("KEY_F", "KEY_F", scopePath);
  541. gameplay::ScriptUtil::registerConstantString("KEY_G", "KEY_G", scopePath);
  542. gameplay::ScriptUtil::registerConstantString("KEY_H", "KEY_H", scopePath);
  543. gameplay::ScriptUtil::registerConstantString("KEY_I", "KEY_I", scopePath);
  544. gameplay::ScriptUtil::registerConstantString("KEY_J", "KEY_J", scopePath);
  545. gameplay::ScriptUtil::registerConstantString("KEY_K", "KEY_K", scopePath);
  546. gameplay::ScriptUtil::registerConstantString("KEY_L", "KEY_L", scopePath);
  547. gameplay::ScriptUtil::registerConstantString("KEY_M", "KEY_M", scopePath);
  548. gameplay::ScriptUtil::registerConstantString("KEY_N", "KEY_N", scopePath);
  549. gameplay::ScriptUtil::registerConstantString("KEY_O", "KEY_O", scopePath);
  550. gameplay::ScriptUtil::registerConstantString("KEY_P", "KEY_P", scopePath);
  551. gameplay::ScriptUtil::registerConstantString("KEY_Q", "KEY_Q", scopePath);
  552. gameplay::ScriptUtil::registerConstantString("KEY_R", "KEY_R", scopePath);
  553. gameplay::ScriptUtil::registerConstantString("KEY_S", "KEY_S", scopePath);
  554. gameplay::ScriptUtil::registerConstantString("KEY_T", "KEY_T", scopePath);
  555. gameplay::ScriptUtil::registerConstantString("KEY_U", "KEY_U", scopePath);
  556. gameplay::ScriptUtil::registerConstantString("KEY_V", "KEY_V", scopePath);
  557. gameplay::ScriptUtil::registerConstantString("KEY_W", "KEY_W", scopePath);
  558. gameplay::ScriptUtil::registerConstantString("KEY_X", "KEY_X", scopePath);
  559. gameplay::ScriptUtil::registerConstantString("KEY_Y", "KEY_Y", scopePath);
  560. gameplay::ScriptUtil::registerConstantString("KEY_Z", "KEY_Z", scopePath);
  561. gameplay::ScriptUtil::registerConstantString("KEY_LEFT_BRACE", "KEY_LEFT_BRACE", scopePath);
  562. gameplay::ScriptUtil::registerConstantString("KEY_BAR", "KEY_BAR", scopePath);
  563. gameplay::ScriptUtil::registerConstantString("KEY_RIGHT_BRACE", "KEY_RIGHT_BRACE", scopePath);
  564. gameplay::ScriptUtil::registerConstantString("KEY_TILDE", "KEY_TILDE", scopePath);
  565. gameplay::ScriptUtil::registerConstantString("KEY_EURO", "KEY_EURO", scopePath);
  566. gameplay::ScriptUtil::registerConstantString("KEY_POUND", "KEY_POUND", scopePath);
  567. gameplay::ScriptUtil::registerConstantString("KEY_YEN", "KEY_YEN", scopePath);
  568. gameplay::ScriptUtil::registerConstantString("KEY_MIDDLE_DOT", "KEY_MIDDLE_DOT", scopePath);
  569. gameplay::ScriptUtil::registerConstantString("KEY_SEARCH", "KEY_SEARCH", scopePath);
  570. }
  571. // Register enumeration Keyboard::KeyEvent.
  572. {
  573. std::vector<std::string> scopePath;
  574. scopePath.push_back("Keyboard");
  575. gameplay::ScriptUtil::registerConstantString("KEY_PRESS", "KEY_PRESS", scopePath);
  576. gameplay::ScriptUtil::registerConstantString("KEY_RELEASE", "KEY_RELEASE", scopePath);
  577. gameplay::ScriptUtil::registerConstantString("KEY_CHAR", "KEY_CHAR", scopePath);
  578. }
  579. // Register enumeration Layout::Type.
  580. {
  581. std::vector<std::string> scopePath;
  582. scopePath.push_back("Layout");
  583. gameplay::ScriptUtil::registerConstantString("LAYOUT_FLOW", "LAYOUT_FLOW", scopePath);
  584. gameplay::ScriptUtil::registerConstantString("LAYOUT_VERTICAL", "LAYOUT_VERTICAL", scopePath);
  585. gameplay::ScriptUtil::registerConstantString("LAYOUT_ABSOLUTE", "LAYOUT_ABSOLUTE", scopePath);
  586. }
  587. // Register enumeration Light::Type.
  588. {
  589. std::vector<std::string> scopePath;
  590. scopePath.push_back("Light");
  591. gameplay::ScriptUtil::registerConstantString("DIRECTIONAL", "DIRECTIONAL", scopePath);
  592. gameplay::ScriptUtil::registerConstantString("POINT", "POINT", scopePath);
  593. gameplay::ScriptUtil::registerConstantString("SPOT", "SPOT", scopePath);
  594. }
  595. // Register enumeration Logger::Level.
  596. {
  597. std::vector<std::string> scopePath;
  598. scopePath.push_back("Logger");
  599. gameplay::ScriptUtil::registerConstantString("LEVEL_INFO", "LEVEL_INFO", scopePath);
  600. gameplay::ScriptUtil::registerConstantString("LEVEL_WARN", "LEVEL_WARN", scopePath);
  601. gameplay::ScriptUtil::registerConstantString("LEVEL_ERROR", "LEVEL_ERROR", scopePath);
  602. }
  603. // Register enumeration Mesh::IndexFormat.
  604. {
  605. std::vector<std::string> scopePath;
  606. scopePath.push_back("Mesh");
  607. gameplay::ScriptUtil::registerConstantString("INDEX8", "INDEX8", scopePath);
  608. gameplay::ScriptUtil::registerConstantString("INDEX16", "INDEX16", scopePath);
  609. gameplay::ScriptUtil::registerConstantString("INDEX32", "INDEX32", scopePath);
  610. }
  611. // Register enumeration Mesh::PrimitiveType.
  612. {
  613. std::vector<std::string> scopePath;
  614. scopePath.push_back("Mesh");
  615. gameplay::ScriptUtil::registerConstantString("TRIANGLES", "TRIANGLES", scopePath);
  616. gameplay::ScriptUtil::registerConstantString("TRIANGLE_STRIP", "TRIANGLE_STRIP", scopePath);
  617. gameplay::ScriptUtil::registerConstantString("LINES", "LINES", scopePath);
  618. gameplay::ScriptUtil::registerConstantString("LINE_STRIP", "LINE_STRIP", scopePath);
  619. gameplay::ScriptUtil::registerConstantString("POINTS", "POINTS", scopePath);
  620. }
  621. // Register enumeration Mouse::MouseEvent.
  622. {
  623. std::vector<std::string> scopePath;
  624. scopePath.push_back("Mouse");
  625. gameplay::ScriptUtil::registerConstantString("MOUSE_PRESS_LEFT_BUTTON", "MOUSE_PRESS_LEFT_BUTTON", scopePath);
  626. gameplay::ScriptUtil::registerConstantString("MOUSE_RELEASE_LEFT_BUTTON", "MOUSE_RELEASE_LEFT_BUTTON", scopePath);
  627. gameplay::ScriptUtil::registerConstantString("MOUSE_PRESS_MIDDLE_BUTTON", "MOUSE_PRESS_MIDDLE_BUTTON", scopePath);
  628. gameplay::ScriptUtil::registerConstantString("MOUSE_RELEASE_MIDDLE_BUTTON", "MOUSE_RELEASE_MIDDLE_BUTTON", scopePath);
  629. gameplay::ScriptUtil::registerConstantString("MOUSE_PRESS_RIGHT_BUTTON", "MOUSE_PRESS_RIGHT_BUTTON", scopePath);
  630. gameplay::ScriptUtil::registerConstantString("MOUSE_RELEASE_RIGHT_BUTTON", "MOUSE_RELEASE_RIGHT_BUTTON", scopePath);
  631. gameplay::ScriptUtil::registerConstantString("MOUSE_MOVE", "MOUSE_MOVE", scopePath);
  632. gameplay::ScriptUtil::registerConstantString("MOUSE_WHEEL", "MOUSE_WHEEL", scopePath);
  633. }
  634. // Register enumeration Node::Type.
  635. {
  636. std::vector<std::string> scopePath;
  637. scopePath.push_back("Node");
  638. gameplay::ScriptUtil::registerConstantString("NODE", "NODE", scopePath);
  639. gameplay::ScriptUtil::registerConstantString("JOINT", "JOINT", scopePath);
  640. }
  641. // Register enumeration ParticleEmitter::TextureBlending.
  642. {
  643. std::vector<std::string> scopePath;
  644. scopePath.push_back("ParticleEmitter");
  645. gameplay::ScriptUtil::registerConstantString("BLEND_OPAQUE", "BLEND_OPAQUE", scopePath);
  646. gameplay::ScriptUtil::registerConstantString("BLEND_TRANSPARENT", "BLEND_TRANSPARENT", scopePath);
  647. gameplay::ScriptUtil::registerConstantString("BLEND_ADDITIVE", "BLEND_ADDITIVE", scopePath);
  648. gameplay::ScriptUtil::registerConstantString("BLEND_MULTIPLIED", "BLEND_MULTIPLIED", scopePath);
  649. }
  650. // Register enumeration PhysicsCollisionObject::CollisionListener::EventType.
  651. {
  652. std::vector<std::string> scopePath;
  653. scopePath.push_back("PhysicsCollisionObject");
  654. scopePath.push_back("CollisionListener");
  655. gameplay::ScriptUtil::registerConstantString("COLLIDING", "COLLIDING", scopePath);
  656. gameplay::ScriptUtil::registerConstantString("NOT_COLLIDING", "NOT_COLLIDING", scopePath);
  657. }
  658. // Register enumeration PhysicsCollisionObject::Type.
  659. {
  660. std::vector<std::string> scopePath;
  661. scopePath.push_back("PhysicsCollisionObject");
  662. gameplay::ScriptUtil::registerConstantString("RIGID_BODY", "RIGID_BODY", scopePath);
  663. gameplay::ScriptUtil::registerConstantString("CHARACTER", "CHARACTER", scopePath);
  664. gameplay::ScriptUtil::registerConstantString("GHOST_OBJECT", "GHOST_OBJECT", scopePath);
  665. gameplay::ScriptUtil::registerConstantString("VEHICLE", "VEHICLE", scopePath);
  666. gameplay::ScriptUtil::registerConstantString("VEHICLE_WHEEL", "VEHICLE_WHEEL", scopePath);
  667. gameplay::ScriptUtil::registerConstantString("NONE", "NONE", scopePath);
  668. }
  669. // Register enumeration PhysicsCollisionShape::Type.
  670. {
  671. std::vector<std::string> scopePath;
  672. scopePath.push_back("PhysicsCollisionShape");
  673. gameplay::ScriptUtil::registerConstantString("SHAPE_NONE", "SHAPE_NONE", scopePath);
  674. gameplay::ScriptUtil::registerConstantString("SHAPE_BOX", "SHAPE_BOX", scopePath);
  675. gameplay::ScriptUtil::registerConstantString("SHAPE_SPHERE", "SHAPE_SPHERE", scopePath);
  676. gameplay::ScriptUtil::registerConstantString("SHAPE_CAPSULE", "SHAPE_CAPSULE", scopePath);
  677. gameplay::ScriptUtil::registerConstantString("SHAPE_MESH", "SHAPE_MESH", scopePath);
  678. gameplay::ScriptUtil::registerConstantString("SHAPE_HEIGHTFIELD", "SHAPE_HEIGHTFIELD", scopePath);
  679. }
  680. // Register enumeration PhysicsController::Listener::EventType.
  681. {
  682. std::vector<std::string> scopePath;
  683. scopePath.push_back("PhysicsController");
  684. scopePath.push_back("Listener");
  685. gameplay::ScriptUtil::registerConstantString("ACTIVATED", "ACTIVATED", scopePath);
  686. gameplay::ScriptUtil::registerConstantString("DEACTIVATED", "DEACTIVATED", scopePath);
  687. }
  688. // Register enumeration Properties::Type.
  689. {
  690. std::vector<std::string> scopePath;
  691. scopePath.push_back("Properties");
  692. gameplay::ScriptUtil::registerConstantString("NONE", "NONE", scopePath);
  693. gameplay::ScriptUtil::registerConstantString("STRING", "STRING", scopePath);
  694. gameplay::ScriptUtil::registerConstantString("NUMBER", "NUMBER", scopePath);
  695. gameplay::ScriptUtil::registerConstantString("VECTOR2", "VECTOR2", scopePath);
  696. gameplay::ScriptUtil::registerConstantString("VECTOR3", "VECTOR3", scopePath);
  697. gameplay::ScriptUtil::registerConstantString("VECTOR4", "VECTOR4", scopePath);
  698. gameplay::ScriptUtil::registerConstantString("MATRIX", "MATRIX", scopePath);
  699. }
  700. // Register enumeration RenderState::AutoBinding.
  701. {
  702. std::vector<std::string> scopePath;
  703. scopePath.push_back("RenderState");
  704. gameplay::ScriptUtil::registerConstantString("NONE", "NONE", scopePath);
  705. gameplay::ScriptUtil::registerConstantString("WORLD_MATRIX", "WORLD_MATRIX", scopePath);
  706. gameplay::ScriptUtil::registerConstantString("VIEW_MATRIX", "VIEW_MATRIX", scopePath);
  707. gameplay::ScriptUtil::registerConstantString("PROJECTION_MATRIX", "PROJECTION_MATRIX", scopePath);
  708. gameplay::ScriptUtil::registerConstantString("WORLD_VIEW_MATRIX", "WORLD_VIEW_MATRIX", scopePath);
  709. gameplay::ScriptUtil::registerConstantString("VIEW_PROJECTION_MATRIX", "VIEW_PROJECTION_MATRIX", scopePath);
  710. gameplay::ScriptUtil::registerConstantString("WORLD_VIEW_PROJECTION_MATRIX", "WORLD_VIEW_PROJECTION_MATRIX", scopePath);
  711. gameplay::ScriptUtil::registerConstantString("INVERSE_TRANSPOSE_WORLD_MATRIX", "INVERSE_TRANSPOSE_WORLD_MATRIX", scopePath);
  712. gameplay::ScriptUtil::registerConstantString("INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX", "INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX", scopePath);
  713. gameplay::ScriptUtil::registerConstantString("CAMERA_WORLD_POSITION", "CAMERA_WORLD_POSITION", scopePath);
  714. gameplay::ScriptUtil::registerConstantString("CAMERA_VIEW_POSITION", "CAMERA_VIEW_POSITION", scopePath);
  715. gameplay::ScriptUtil::registerConstantString("MATRIX_PALETTE", "MATRIX_PALETTE", scopePath);
  716. gameplay::ScriptUtil::registerConstantString("SCENE_AMBIENT_COLOR", "SCENE_AMBIENT_COLOR", scopePath);
  717. }
  718. // Register enumeration RenderState::Blend.
  719. {
  720. std::vector<std::string> scopePath;
  721. scopePath.push_back("RenderState");
  722. gameplay::ScriptUtil::registerConstantString("BLEND_ZERO", "BLEND_ZERO", scopePath);
  723. gameplay::ScriptUtil::registerConstantString("BLEND_ONE", "BLEND_ONE", scopePath);
  724. gameplay::ScriptUtil::registerConstantString("BLEND_SRC_COLOR", "BLEND_SRC_COLOR", scopePath);
  725. gameplay::ScriptUtil::registerConstantString("BLEND_ONE_MINUS_SRC_COLOR", "BLEND_ONE_MINUS_SRC_COLOR", scopePath);
  726. gameplay::ScriptUtil::registerConstantString("BLEND_DST_COLOR", "BLEND_DST_COLOR", scopePath);
  727. gameplay::ScriptUtil::registerConstantString("BLEND_ONE_MINUS_DST_COLOR", "BLEND_ONE_MINUS_DST_COLOR", scopePath);
  728. gameplay::ScriptUtil::registerConstantString("BLEND_SRC_ALPHA", "BLEND_SRC_ALPHA", scopePath);
  729. gameplay::ScriptUtil::registerConstantString("BLEND_ONE_MINUS_SRC_ALPHA", "BLEND_ONE_MINUS_SRC_ALPHA", scopePath);
  730. gameplay::ScriptUtil::registerConstantString("BLEND_DST_ALPHA", "BLEND_DST_ALPHA", scopePath);
  731. gameplay::ScriptUtil::registerConstantString("BLEND_ONE_MINUS_DST_ALPHA", "BLEND_ONE_MINUS_DST_ALPHA", scopePath);
  732. gameplay::ScriptUtil::registerConstantString("BLEND_CONSTANT_ALPHA", "BLEND_CONSTANT_ALPHA", scopePath);
  733. gameplay::ScriptUtil::registerConstantString("BLEND_ONE_MINUS_CONSTANT_ALPHA", "BLEND_ONE_MINUS_CONSTANT_ALPHA", scopePath);
  734. gameplay::ScriptUtil::registerConstantString("BLEND_SRC_ALPHA_SATURATE", "BLEND_SRC_ALPHA_SATURATE", scopePath);
  735. }
  736. // Register enumeration RenderState::CullFaceSide.
  737. {
  738. std::vector<std::string> scopePath;
  739. scopePath.push_back("RenderState");
  740. gameplay::ScriptUtil::registerConstantString("CULL_FACE_SIDE_BACK", "CULL_FACE_SIDE_BACK", scopePath);
  741. gameplay::ScriptUtil::registerConstantString("CULL_FACE_SIDE_FRONT", "CULL_FACE_SIDE_FRONT", scopePath);
  742. gameplay::ScriptUtil::registerConstantString("CULL_FACE_SIDE_FRONT_AND_BACK", "CULL_FACE_SIDE_FRONT_AND_BACK", scopePath);
  743. }
  744. // Register enumeration RenderState::DepthFunction.
  745. {
  746. std::vector<std::string> scopePath;
  747. scopePath.push_back("RenderState");
  748. gameplay::ScriptUtil::registerConstantString("DEPTH_NEVER", "DEPTH_NEVER", scopePath);
  749. gameplay::ScriptUtil::registerConstantString("DEPTH_LESS", "DEPTH_LESS", scopePath);
  750. gameplay::ScriptUtil::registerConstantString("DEPTH_EQUAL", "DEPTH_EQUAL", scopePath);
  751. gameplay::ScriptUtil::registerConstantString("DEPTH_LEQUAL", "DEPTH_LEQUAL", scopePath);
  752. gameplay::ScriptUtil::registerConstantString("DEPTH_GREATER", "DEPTH_GREATER", scopePath);
  753. gameplay::ScriptUtil::registerConstantString("DEPTH_NOTEQUAL", "DEPTH_NOTEQUAL", scopePath);
  754. gameplay::ScriptUtil::registerConstantString("DEPTH_GEQUAL", "DEPTH_GEQUAL", scopePath);
  755. gameplay::ScriptUtil::registerConstantString("DEPTH_ALWAYS", "DEPTH_ALWAYS", scopePath);
  756. }
  757. // Register enumeration RenderState::FrontFace.
  758. {
  759. std::vector<std::string> scopePath;
  760. scopePath.push_back("RenderState");
  761. gameplay::ScriptUtil::registerConstantString("FRONT_FACE_CW", "FRONT_FACE_CW", scopePath);
  762. gameplay::ScriptUtil::registerConstantString("FRONT_FACE_CCW", "FRONT_FACE_CCW", scopePath);
  763. }
  764. // Register enumeration RenderState::StencilFunction.
  765. {
  766. std::vector<std::string> scopePath;
  767. scopePath.push_back("RenderState");
  768. gameplay::ScriptUtil::registerConstantString("STENCIL_NEVER", "STENCIL_NEVER", scopePath);
  769. gameplay::ScriptUtil::registerConstantString("STENCIL_ALWAYS", "STENCIL_ALWAYS", scopePath);
  770. gameplay::ScriptUtil::registerConstantString("STENCIL_LESS", "STENCIL_LESS", scopePath);
  771. gameplay::ScriptUtil::registerConstantString("STENCIL_LEQUAL", "STENCIL_LEQUAL", scopePath);
  772. gameplay::ScriptUtil::registerConstantString("STENCIL_EQUAL", "STENCIL_EQUAL", scopePath);
  773. gameplay::ScriptUtil::registerConstantString("STENCIL_GREATER", "STENCIL_GREATER", scopePath);
  774. gameplay::ScriptUtil::registerConstantString("STENCIL_GEQUAL", "STENCIL_GEQUAL", scopePath);
  775. gameplay::ScriptUtil::registerConstantString("STENCIL_NOTEQUAL", "STENCIL_NOTEQUAL", scopePath);
  776. }
  777. // Register enumeration RenderState::StencilOperation.
  778. {
  779. std::vector<std::string> scopePath;
  780. scopePath.push_back("RenderState");
  781. gameplay::ScriptUtil::registerConstantString("STENCIL_OP_KEEP", "STENCIL_OP_KEEP", scopePath);
  782. gameplay::ScriptUtil::registerConstantString("STENCIL_OP_ZERO", "STENCIL_OP_ZERO", scopePath);
  783. gameplay::ScriptUtil::registerConstantString("STENCIL_OP_REPLACE", "STENCIL_OP_REPLACE", scopePath);
  784. gameplay::ScriptUtil::registerConstantString("STENCIL_OP_INCR", "STENCIL_OP_INCR", scopePath);
  785. gameplay::ScriptUtil::registerConstantString("STENCIL_OP_DECR", "STENCIL_OP_DECR", scopePath);
  786. gameplay::ScriptUtil::registerConstantString("STENCIL_OP_INVERT", "STENCIL_OP_INVERT", scopePath);
  787. gameplay::ScriptUtil::registerConstantString("STENCIL_OP_INCR_WRAP", "STENCIL_OP_INCR_WRAP", scopePath);
  788. gameplay::ScriptUtil::registerConstantString("STENCIL_OP_DECR_WRAP", "STENCIL_OP_DECR_WRAP", scopePath);
  789. }
  790. // Register enumeration Terrain::Flags.
  791. {
  792. std::vector<std::string> scopePath;
  793. scopePath.push_back("Terrain");
  794. gameplay::ScriptUtil::registerConstantString("DEBUG_PATCHES", "DEBUG_PATCHES", scopePath);
  795. gameplay::ScriptUtil::registerConstantString("FRUSTUM_CULLING", "FRUSTUM_CULLING", scopePath);
  796. gameplay::ScriptUtil::registerConstantString("LEVEL_OF_DETAIL", "LEVEL_OF_DETAIL", scopePath);
  797. }
  798. // Register enumeration TextBox::InputMode.
  799. {
  800. std::vector<std::string> scopePath;
  801. scopePath.push_back("TextBox");
  802. gameplay::ScriptUtil::registerConstantString("TEXT", "TEXT", scopePath);
  803. gameplay::ScriptUtil::registerConstantString("PASSWORD", "PASSWORD", scopePath);
  804. }
  805. // Register enumeration Texture::Filter.
  806. {
  807. std::vector<std::string> scopePath;
  808. scopePath.push_back("Texture");
  809. gameplay::ScriptUtil::registerConstantString("NEAREST", "NEAREST", scopePath);
  810. gameplay::ScriptUtil::registerConstantString("LINEAR", "LINEAR", scopePath);
  811. gameplay::ScriptUtil::registerConstantString("NEAREST_MIPMAP_NEAREST", "NEAREST_MIPMAP_NEAREST", scopePath);
  812. gameplay::ScriptUtil::registerConstantString("LINEAR_MIPMAP_NEAREST", "LINEAR_MIPMAP_NEAREST", scopePath);
  813. gameplay::ScriptUtil::registerConstantString("NEAREST_MIPMAP_LINEAR", "NEAREST_MIPMAP_LINEAR", scopePath);
  814. gameplay::ScriptUtil::registerConstantString("LINEAR_MIPMAP_LINEAR", "LINEAR_MIPMAP_LINEAR", scopePath);
  815. }
  816. // Register enumeration Texture::Format.
  817. {
  818. std::vector<std::string> scopePath;
  819. scopePath.push_back("Texture");
  820. gameplay::ScriptUtil::registerConstantString("UNKNOWN", "UNKNOWN", scopePath);
  821. gameplay::ScriptUtil::registerConstantString("RGB", "RGB", scopePath);
  822. gameplay::ScriptUtil::registerConstantString("RGBA", "RGBA", scopePath);
  823. gameplay::ScriptUtil::registerConstantString("ALPHA", "ALPHA", scopePath);
  824. }
  825. // Register enumeration Texture::Wrap.
  826. {
  827. std::vector<std::string> scopePath;
  828. scopePath.push_back("Texture");
  829. gameplay::ScriptUtil::registerConstantString("REPEAT", "REPEAT", scopePath);
  830. gameplay::ScriptUtil::registerConstantString("CLAMP", "CLAMP", scopePath);
  831. }
  832. // Register enumeration Touch::TouchEvent.
  833. {
  834. std::vector<std::string> scopePath;
  835. scopePath.push_back("Touch");
  836. gameplay::ScriptUtil::registerConstantString("TOUCH_PRESS", "TOUCH_PRESS", scopePath);
  837. gameplay::ScriptUtil::registerConstantString("TOUCH_RELEASE", "TOUCH_RELEASE", scopePath);
  838. gameplay::ScriptUtil::registerConstantString("TOUCH_MOVE", "TOUCH_MOVE", scopePath);
  839. }
  840. // Register enumeration VertexFormat::Usage.
  841. {
  842. std::vector<std::string> scopePath;
  843. scopePath.push_back("VertexFormat");
  844. gameplay::ScriptUtil::registerConstantString("POSITION", "POSITION", scopePath);
  845. gameplay::ScriptUtil::registerConstantString("NORMAL", "NORMAL", scopePath);
  846. gameplay::ScriptUtil::registerConstantString("COLOR", "COLOR", scopePath);
  847. gameplay::ScriptUtil::registerConstantString("TANGENT", "TANGENT", scopePath);
  848. gameplay::ScriptUtil::registerConstantString("BINORMAL", "BINORMAL", scopePath);
  849. gameplay::ScriptUtil::registerConstantString("BLENDWEIGHTS", "BLENDWEIGHTS", scopePath);
  850. gameplay::ScriptUtil::registerConstantString("BLENDINDICES", "BLENDINDICES", scopePath);
  851. gameplay::ScriptUtil::registerConstantString("TEXCOORD0", "TEXCOORD0", scopePath);
  852. gameplay::ScriptUtil::registerConstantString("TEXCOORD1", "TEXCOORD1", scopePath);
  853. gameplay::ScriptUtil::registerConstantString("TEXCOORD2", "TEXCOORD2", scopePath);
  854. gameplay::ScriptUtil::registerConstantString("TEXCOORD3", "TEXCOORD3", scopePath);
  855. gameplay::ScriptUtil::registerConstantString("TEXCOORD4", "TEXCOORD4", scopePath);
  856. gameplay::ScriptUtil::registerConstantString("TEXCOORD5", "TEXCOORD5", scopePath);
  857. gameplay::ScriptUtil::registerConstantString("TEXCOORD6", "TEXCOORD6", scopePath);
  858. gameplay::ScriptUtil::registerConstantString("TEXCOORD7", "TEXCOORD7", scopePath);
  859. }
  860. }
  861. static const char* enumStringEmpty = "";
  862. const char* lua_stringFromEnumGlobal(std::string& enumname, unsigned int value)
  863. {
  864. if (enumname == "AIMessage::ParameterType")
  865. return lua_stringFromEnum_AIMessageParameterType((AIMessage::ParameterType)value);
  866. if (enumname == "AnimationClip::Listener::EventType")
  867. return lua_stringFromEnum_AnimationClipListenerEventType((AnimationClip::Listener::EventType)value);
  868. if (enumname == "AudioSource::State")
  869. return lua_stringFromEnum_AudioSourceState((AudioSource::State)value);
  870. if (enumname == "Camera::Type")
  871. return lua_stringFromEnum_CameraType((Camera::Type)value);
  872. if (enumname == "Container::Scroll")
  873. return lua_stringFromEnum_ContainerScroll((Container::Scroll)value);
  874. if (enumname == "Control::Alignment")
  875. return lua_stringFromEnum_ControlAlignment((Control::Alignment)value);
  876. if (enumname == "Control::AutoSize")
  877. return lua_stringFromEnum_ControlAutoSize((Control::AutoSize)value);
  878. if (enumname == "Control::Listener::EventType")
  879. return lua_stringFromEnum_ControlListenerEventType((Control::Listener::EventType)value);
  880. if (enumname == "Control::State")
  881. return lua_stringFromEnum_ControlState((Control::State)value);
  882. if (enumname == "Curve::InterpolationType")
  883. return lua_stringFromEnum_CurveInterpolationType((Curve::InterpolationType)value);
  884. if (enumname == "DepthStencilTarget::Format")
  885. return lua_stringFromEnum_DepthStencilTargetFormat((DepthStencilTarget::Format)value);
  886. if (enumname == "Font::Format")
  887. return lua_stringFromEnum_FontFormat((Font::Format)value);
  888. if (enumname == "Font::Justify")
  889. return lua_stringFromEnum_FontJustify((Font::Justify)value);
  890. if (enumname == "Font::Style")
  891. return lua_stringFromEnum_FontStyle((Font::Style)value);
  892. if (enumname == "Game::ClearFlags")
  893. return lua_stringFromEnum_GameClearFlags((Game::ClearFlags)value);
  894. if (enumname == "Game::State")
  895. return lua_stringFromEnum_GameState((Game::State)value);
  896. if (enumname == "Gamepad::ButtonMapping")
  897. return lua_stringFromEnum_GamepadButtonMapping((Gamepad::ButtonMapping)value);
  898. if (enumname == "Gamepad::GamepadEvent")
  899. return lua_stringFromEnum_GamepadGamepadEvent((Gamepad::GamepadEvent)value);
  900. if (enumname == "Gesture::GestureEvent")
  901. return lua_stringFromEnum_GestureGestureEvent((Gesture::GestureEvent)value);
  902. if (enumname == "Image::Format")
  903. return lua_stringFromEnum_ImageFormat((Image::Format)value);
  904. if (enumname == "Keyboard::Key")
  905. return lua_stringFromEnum_KeyboardKey((Keyboard::Key)value);
  906. if (enumname == "Keyboard::KeyEvent")
  907. return lua_stringFromEnum_KeyboardKeyEvent((Keyboard::KeyEvent)value);
  908. if (enumname == "Layout::Type")
  909. return lua_stringFromEnum_LayoutType((Layout::Type)value);
  910. if (enumname == "Light::Type")
  911. return lua_stringFromEnum_LightType((Light::Type)value);
  912. if (enumname == "Logger::Level")
  913. return lua_stringFromEnum_LoggerLevel((Logger::Level)value);
  914. if (enumname == "Mesh::IndexFormat")
  915. return lua_stringFromEnum_MeshIndexFormat((Mesh::IndexFormat)value);
  916. if (enumname == "Mesh::PrimitiveType")
  917. return lua_stringFromEnum_MeshPrimitiveType((Mesh::PrimitiveType)value);
  918. if (enumname == "Mouse::MouseEvent")
  919. return lua_stringFromEnum_MouseMouseEvent((Mouse::MouseEvent)value);
  920. if (enumname == "Node::Type")
  921. return lua_stringFromEnum_NodeType((Node::Type)value);
  922. if (enumname == "ParticleEmitter::TextureBlending")
  923. return lua_stringFromEnum_ParticleEmitterTextureBlending((ParticleEmitter::TextureBlending)value);
  924. if (enumname == "PhysicsCollisionObject::CollisionListener::EventType")
  925. return lua_stringFromEnum_PhysicsCollisionObjectCollisionListenerEventType((PhysicsCollisionObject::CollisionListener::EventType)value);
  926. if (enumname == "PhysicsCollisionObject::Type")
  927. return lua_stringFromEnum_PhysicsCollisionObjectType((PhysicsCollisionObject::Type)value);
  928. if (enumname == "PhysicsCollisionShape::Type")
  929. return lua_stringFromEnum_PhysicsCollisionShapeType((PhysicsCollisionShape::Type)value);
  930. if (enumname == "PhysicsController::Listener::EventType")
  931. return lua_stringFromEnum_PhysicsControllerListenerEventType((PhysicsController::Listener::EventType)value);
  932. if (enumname == "Properties::Type")
  933. return lua_stringFromEnum_PropertiesType((Properties::Type)value);
  934. if (enumname == "RenderState::AutoBinding")
  935. return lua_stringFromEnum_RenderStateAutoBinding((RenderState::AutoBinding)value);
  936. if (enumname == "RenderState::Blend")
  937. return lua_stringFromEnum_RenderStateBlend((RenderState::Blend)value);
  938. if (enumname == "RenderState::CullFaceSide")
  939. return lua_stringFromEnum_RenderStateCullFaceSide((RenderState::CullFaceSide)value);
  940. if (enumname == "RenderState::DepthFunction")
  941. return lua_stringFromEnum_RenderStateDepthFunction((RenderState::DepthFunction)value);
  942. if (enumname == "RenderState::FrontFace")
  943. return lua_stringFromEnum_RenderStateFrontFace((RenderState::FrontFace)value);
  944. if (enumname == "RenderState::StencilFunction")
  945. return lua_stringFromEnum_RenderStateStencilFunction((RenderState::StencilFunction)value);
  946. if (enumname == "RenderState::StencilOperation")
  947. return lua_stringFromEnum_RenderStateStencilOperation((RenderState::StencilOperation)value);
  948. if (enumname == "Terrain::Flags")
  949. return lua_stringFromEnum_TerrainFlags((Terrain::Flags)value);
  950. if (enumname == "TextBox::InputMode")
  951. return lua_stringFromEnum_TextBoxInputMode((TextBox::InputMode)value);
  952. if (enumname == "Texture::Filter")
  953. return lua_stringFromEnum_TextureFilter((Texture::Filter)value);
  954. if (enumname == "Texture::Format")
  955. return lua_stringFromEnum_TextureFormat((Texture::Format)value);
  956. if (enumname == "Texture::Wrap")
  957. return lua_stringFromEnum_TextureWrap((Texture::Wrap)value);
  958. if (enumname == "Touch::TouchEvent")
  959. return lua_stringFromEnum_TouchTouchEvent((Touch::TouchEvent)value);
  960. if (enumname == "VertexFormat::Usage")
  961. return lua_stringFromEnum_VertexFormatUsage((VertexFormat::Usage)value);
  962. GP_ERROR("Unrecognized enumeration type '%s'.", enumname.c_str());
  963. return enumStringEmpty;
  964. }
  965. }