lua_Global.cpp 69 KB

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