lua_ParticleEmitter.cpp 101 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105
  1. #include "Base.h"
  2. #include "ScriptController.h"
  3. #include "lua_ParticleEmitter.h"
  4. #include "Base.h"
  5. #include "Game.h"
  6. #include "Node.h"
  7. #include "ParticleEmitter.h"
  8. #include "Properties.h"
  9. #include "Quaternion.h"
  10. #include "Ref.h"
  11. #include "Scene.h"
  12. #include "lua_ParticleEmitterTextureBlending.h"
  13. namespace gameplay
  14. {
  15. void luaRegister_ParticleEmitter()
  16. {
  17. const luaL_Reg lua_members[] =
  18. {
  19. {"addRef", lua_ParticleEmitter_addRef},
  20. {"clone", lua_ParticleEmitter_clone},
  21. {"draw", lua_ParticleEmitter_draw},
  22. {"emitOnce", lua_ParticleEmitter_emitOnce},
  23. {"getAcceleration", lua_ParticleEmitter_getAcceleration},
  24. {"getAccelerationVariance", lua_ParticleEmitter_getAccelerationVariance},
  25. {"getColorEnd", lua_ParticleEmitter_getColorEnd},
  26. {"getColorEndVariance", lua_ParticleEmitter_getColorEndVariance},
  27. {"getColorStart", lua_ParticleEmitter_getColorStart},
  28. {"getColorStartVariance", lua_ParticleEmitter_getColorStartVariance},
  29. {"getEmissionRate", lua_ParticleEmitter_getEmissionRate},
  30. {"getEnergyMax", lua_ParticleEmitter_getEnergyMax},
  31. {"getEnergyMin", lua_ParticleEmitter_getEnergyMin},
  32. {"getNode", lua_ParticleEmitter_getNode},
  33. {"getOrbitAcceleration", lua_ParticleEmitter_getOrbitAcceleration},
  34. {"getOrbitPosition", lua_ParticleEmitter_getOrbitPosition},
  35. {"getOrbitVelocity", lua_ParticleEmitter_getOrbitVelocity},
  36. {"getParticleCountMax", lua_ParticleEmitter_getParticleCountMax},
  37. {"getParticlesCount", lua_ParticleEmitter_getParticlesCount},
  38. {"getPosition", lua_ParticleEmitter_getPosition},
  39. {"getPositionVariance", lua_ParticleEmitter_getPositionVariance},
  40. {"getRefCount", lua_ParticleEmitter_getRefCount},
  41. {"getRotationAxis", lua_ParticleEmitter_getRotationAxis},
  42. {"getRotationAxisVariance", lua_ParticleEmitter_getRotationAxisVariance},
  43. {"getRotationPerParticleSpeedMax", lua_ParticleEmitter_getRotationPerParticleSpeedMax},
  44. {"getRotationPerParticleSpeedMin", lua_ParticleEmitter_getRotationPerParticleSpeedMin},
  45. {"getRotationSpeedMax", lua_ParticleEmitter_getRotationSpeedMax},
  46. {"getRotationSpeedMin", lua_ParticleEmitter_getRotationSpeedMin},
  47. {"getSizeEndMax", lua_ParticleEmitter_getSizeEndMax},
  48. {"getSizeEndMin", lua_ParticleEmitter_getSizeEndMin},
  49. {"getSizeStartMax", lua_ParticleEmitter_getSizeStartMax},
  50. {"getSizeStartMin", lua_ParticleEmitter_getSizeStartMin},
  51. {"getSpriteFrameCount", lua_ParticleEmitter_getSpriteFrameCount},
  52. {"getSpriteFrameDuration", lua_ParticleEmitter_getSpriteFrameDuration},
  53. {"getSpriteFrameRandomOffset", lua_ParticleEmitter_getSpriteFrameRandomOffset},
  54. {"getSpriteHeight", lua_ParticleEmitter_getSpriteHeight},
  55. {"getSpriteWidth", lua_ParticleEmitter_getSpriteWidth},
  56. {"getTexture", lua_ParticleEmitter_getTexture},
  57. {"getTextureBlending", lua_ParticleEmitter_getTextureBlending},
  58. {"getVelocity", lua_ParticleEmitter_getVelocity},
  59. {"getVelocityVariance", lua_ParticleEmitter_getVelocityVariance},
  60. {"isActive", lua_ParticleEmitter_isActive},
  61. {"isEllipsoid", lua_ParticleEmitter_isEllipsoid},
  62. {"isSpriteAnimated", lua_ParticleEmitter_isSpriteAnimated},
  63. {"isSpriteLooped", lua_ParticleEmitter_isSpriteLooped},
  64. {"isStarted", lua_ParticleEmitter_isStarted},
  65. {"release", lua_ParticleEmitter_release},
  66. {"setAcceleration", lua_ParticleEmitter_setAcceleration},
  67. {"setColor", lua_ParticleEmitter_setColor},
  68. {"setEllipsoid", lua_ParticleEmitter_setEllipsoid},
  69. {"setEmissionRate", lua_ParticleEmitter_setEmissionRate},
  70. {"setEnergy", lua_ParticleEmitter_setEnergy},
  71. {"setOrbit", lua_ParticleEmitter_setOrbit},
  72. {"setParticleCountMax", lua_ParticleEmitter_setParticleCountMax},
  73. {"setPosition", lua_ParticleEmitter_setPosition},
  74. {"setRotation", lua_ParticleEmitter_setRotation},
  75. {"setRotationPerParticle", lua_ParticleEmitter_setRotationPerParticle},
  76. {"setSize", lua_ParticleEmitter_setSize},
  77. {"setSpriteAnimated", lua_ParticleEmitter_setSpriteAnimated},
  78. {"setSpriteFrameCoords", lua_ParticleEmitter_setSpriteFrameCoords},
  79. {"setSpriteFrameDuration", lua_ParticleEmitter_setSpriteFrameDuration},
  80. {"setSpriteFrameRandomOffset", lua_ParticleEmitter_setSpriteFrameRandomOffset},
  81. {"setSpriteLooped", lua_ParticleEmitter_setSpriteLooped},
  82. {"setSpriteTexCoords", lua_ParticleEmitter_setSpriteTexCoords},
  83. {"setTexture", lua_ParticleEmitter_setTexture},
  84. {"setTextureBlending", lua_ParticleEmitter_setTextureBlending},
  85. {"setVelocity", lua_ParticleEmitter_setVelocity},
  86. {"start", lua_ParticleEmitter_start},
  87. {"stop", lua_ParticleEmitter_stop},
  88. {"update", lua_ParticleEmitter_update},
  89. {NULL, NULL}
  90. };
  91. const luaL_Reg lua_statics[] =
  92. {
  93. {"create", lua_ParticleEmitter_static_create},
  94. {"getTextureBlendingFromString", lua_ParticleEmitter_static_getTextureBlendingFromString},
  95. {NULL, NULL}
  96. };
  97. std::vector<std::string> scopePath;
  98. gameplay::ScriptUtil::registerClass("ParticleEmitter", lua_members, NULL, lua_ParticleEmitter__gc, lua_statics, scopePath);
  99. }
  100. static ParticleEmitter* getInstance(lua_State* state)
  101. {
  102. void* userdata = luaL_checkudata(state, 1, "ParticleEmitter");
  103. luaL_argcheck(state, userdata != NULL, 1, "'ParticleEmitter' expected.");
  104. return (ParticleEmitter*)((gameplay::ScriptUtil::LuaObject*)userdata)->instance;
  105. }
  106. int lua_ParticleEmitter__gc(lua_State* state)
  107. {
  108. // Get the number of parameters.
  109. int paramCount = lua_gettop(state);
  110. // Attempt to match the parameters to a valid binding.
  111. switch (paramCount)
  112. {
  113. case 1:
  114. {
  115. if ((lua_type(state, 1) == LUA_TUSERDATA))
  116. {
  117. void* userdata = luaL_checkudata(state, 1, "ParticleEmitter");
  118. luaL_argcheck(state, userdata != NULL, 1, "'ParticleEmitter' expected.");
  119. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)userdata;
  120. if (object->owns)
  121. {
  122. ParticleEmitter* instance = (ParticleEmitter*)object->instance;
  123. SAFE_RELEASE(instance);
  124. }
  125. return 0;
  126. }
  127. lua_pushstring(state, "lua_ParticleEmitter__gc - Failed to match the given parameters to a valid function signature.");
  128. lua_error(state);
  129. break;
  130. }
  131. default:
  132. {
  133. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  134. lua_error(state);
  135. break;
  136. }
  137. }
  138. return 0;
  139. }
  140. int lua_ParticleEmitter_addRef(lua_State* state)
  141. {
  142. // Get the number of parameters.
  143. int paramCount = lua_gettop(state);
  144. // Attempt to match the parameters to a valid binding.
  145. switch (paramCount)
  146. {
  147. case 1:
  148. {
  149. if ((lua_type(state, 1) == LUA_TUSERDATA))
  150. {
  151. ParticleEmitter* instance = getInstance(state);
  152. instance->addRef();
  153. return 0;
  154. }
  155. lua_pushstring(state, "lua_ParticleEmitter_addRef - Failed to match the given parameters to a valid function signature.");
  156. lua_error(state);
  157. break;
  158. }
  159. default:
  160. {
  161. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  162. lua_error(state);
  163. break;
  164. }
  165. }
  166. return 0;
  167. }
  168. int lua_ParticleEmitter_clone(lua_State* state)
  169. {
  170. // Get the number of parameters.
  171. int paramCount = lua_gettop(state);
  172. // Attempt to match the parameters to a valid binding.
  173. switch (paramCount)
  174. {
  175. case 1:
  176. {
  177. if ((lua_type(state, 1) == LUA_TUSERDATA))
  178. {
  179. ParticleEmitter* instance = getInstance(state);
  180. void* returnPtr = (void*)instance->clone();
  181. if (returnPtr)
  182. {
  183. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  184. object->instance = returnPtr;
  185. object->owns = false;
  186. luaL_getmetatable(state, "ParticleEmitter");
  187. lua_setmetatable(state, -2);
  188. }
  189. else
  190. {
  191. lua_pushnil(state);
  192. }
  193. return 1;
  194. }
  195. lua_pushstring(state, "lua_ParticleEmitter_clone - Failed to match the given parameters to a valid function signature.");
  196. lua_error(state);
  197. break;
  198. }
  199. default:
  200. {
  201. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  202. lua_error(state);
  203. break;
  204. }
  205. }
  206. return 0;
  207. }
  208. int lua_ParticleEmitter_draw(lua_State* state)
  209. {
  210. // Get the number of parameters.
  211. int paramCount = lua_gettop(state);
  212. // Attempt to match the parameters to a valid binding.
  213. switch (paramCount)
  214. {
  215. case 1:
  216. {
  217. if ((lua_type(state, 1) == LUA_TUSERDATA))
  218. {
  219. ParticleEmitter* instance = getInstance(state);
  220. unsigned int result = instance->draw();
  221. // Push the return value onto the stack.
  222. lua_pushunsigned(state, result);
  223. return 1;
  224. }
  225. lua_pushstring(state, "lua_ParticleEmitter_draw - Failed to match the given parameters to a valid function signature.");
  226. lua_error(state);
  227. break;
  228. }
  229. default:
  230. {
  231. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  232. lua_error(state);
  233. break;
  234. }
  235. }
  236. return 0;
  237. }
  238. int lua_ParticleEmitter_emitOnce(lua_State* state)
  239. {
  240. // Get the number of parameters.
  241. int paramCount = lua_gettop(state);
  242. // Attempt to match the parameters to a valid binding.
  243. switch (paramCount)
  244. {
  245. case 2:
  246. {
  247. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  248. lua_type(state, 2) == LUA_TNUMBER)
  249. {
  250. // Get parameter 1 off the stack.
  251. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  252. ParticleEmitter* instance = getInstance(state);
  253. instance->emitOnce(param1);
  254. return 0;
  255. }
  256. lua_pushstring(state, "lua_ParticleEmitter_emitOnce - Failed to match the given parameters to a valid function signature.");
  257. lua_error(state);
  258. break;
  259. }
  260. default:
  261. {
  262. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  263. lua_error(state);
  264. break;
  265. }
  266. }
  267. return 0;
  268. }
  269. int lua_ParticleEmitter_getAcceleration(lua_State* state)
  270. {
  271. // Get the number of parameters.
  272. int paramCount = lua_gettop(state);
  273. // Attempt to match the parameters to a valid binding.
  274. switch (paramCount)
  275. {
  276. case 1:
  277. {
  278. if ((lua_type(state, 1) == LUA_TUSERDATA))
  279. {
  280. ParticleEmitter* instance = getInstance(state);
  281. void* returnPtr = (void*)&(instance->getAcceleration());
  282. if (returnPtr)
  283. {
  284. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  285. object->instance = returnPtr;
  286. object->owns = false;
  287. luaL_getmetatable(state, "Vector3");
  288. lua_setmetatable(state, -2);
  289. }
  290. else
  291. {
  292. lua_pushnil(state);
  293. }
  294. return 1;
  295. }
  296. lua_pushstring(state, "lua_ParticleEmitter_getAcceleration - Failed to match the given parameters to a valid function signature.");
  297. lua_error(state);
  298. break;
  299. }
  300. default:
  301. {
  302. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  303. lua_error(state);
  304. break;
  305. }
  306. }
  307. return 0;
  308. }
  309. int lua_ParticleEmitter_getAccelerationVariance(lua_State* state)
  310. {
  311. // Get the number of parameters.
  312. int paramCount = lua_gettop(state);
  313. // Attempt to match the parameters to a valid binding.
  314. switch (paramCount)
  315. {
  316. case 1:
  317. {
  318. if ((lua_type(state, 1) == LUA_TUSERDATA))
  319. {
  320. ParticleEmitter* instance = getInstance(state);
  321. void* returnPtr = (void*)&(instance->getAccelerationVariance());
  322. if (returnPtr)
  323. {
  324. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  325. object->instance = returnPtr;
  326. object->owns = false;
  327. luaL_getmetatable(state, "Vector3");
  328. lua_setmetatable(state, -2);
  329. }
  330. else
  331. {
  332. lua_pushnil(state);
  333. }
  334. return 1;
  335. }
  336. lua_pushstring(state, "lua_ParticleEmitter_getAccelerationVariance - Failed to match the given parameters to a valid function signature.");
  337. lua_error(state);
  338. break;
  339. }
  340. default:
  341. {
  342. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  343. lua_error(state);
  344. break;
  345. }
  346. }
  347. return 0;
  348. }
  349. int lua_ParticleEmitter_getColorEnd(lua_State* state)
  350. {
  351. // Get the number of parameters.
  352. int paramCount = lua_gettop(state);
  353. // Attempt to match the parameters to a valid binding.
  354. switch (paramCount)
  355. {
  356. case 1:
  357. {
  358. if ((lua_type(state, 1) == LUA_TUSERDATA))
  359. {
  360. ParticleEmitter* instance = getInstance(state);
  361. void* returnPtr = (void*)&(instance->getColorEnd());
  362. if (returnPtr)
  363. {
  364. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  365. object->instance = returnPtr;
  366. object->owns = false;
  367. luaL_getmetatable(state, "Vector4");
  368. lua_setmetatable(state, -2);
  369. }
  370. else
  371. {
  372. lua_pushnil(state);
  373. }
  374. return 1;
  375. }
  376. lua_pushstring(state, "lua_ParticleEmitter_getColorEnd - Failed to match the given parameters to a valid function signature.");
  377. lua_error(state);
  378. break;
  379. }
  380. default:
  381. {
  382. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  383. lua_error(state);
  384. break;
  385. }
  386. }
  387. return 0;
  388. }
  389. int lua_ParticleEmitter_getColorEndVariance(lua_State* state)
  390. {
  391. // Get the number of parameters.
  392. int paramCount = lua_gettop(state);
  393. // Attempt to match the parameters to a valid binding.
  394. switch (paramCount)
  395. {
  396. case 1:
  397. {
  398. if ((lua_type(state, 1) == LUA_TUSERDATA))
  399. {
  400. ParticleEmitter* instance = getInstance(state);
  401. void* returnPtr = (void*)&(instance->getColorEndVariance());
  402. if (returnPtr)
  403. {
  404. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  405. object->instance = returnPtr;
  406. object->owns = false;
  407. luaL_getmetatable(state, "Vector4");
  408. lua_setmetatable(state, -2);
  409. }
  410. else
  411. {
  412. lua_pushnil(state);
  413. }
  414. return 1;
  415. }
  416. lua_pushstring(state, "lua_ParticleEmitter_getColorEndVariance - Failed to match the given parameters to a valid function signature.");
  417. lua_error(state);
  418. break;
  419. }
  420. default:
  421. {
  422. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  423. lua_error(state);
  424. break;
  425. }
  426. }
  427. return 0;
  428. }
  429. int lua_ParticleEmitter_getColorStart(lua_State* state)
  430. {
  431. // Get the number of parameters.
  432. int paramCount = lua_gettop(state);
  433. // Attempt to match the parameters to a valid binding.
  434. switch (paramCount)
  435. {
  436. case 1:
  437. {
  438. if ((lua_type(state, 1) == LUA_TUSERDATA))
  439. {
  440. ParticleEmitter* instance = getInstance(state);
  441. void* returnPtr = (void*)&(instance->getColorStart());
  442. if (returnPtr)
  443. {
  444. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  445. object->instance = returnPtr;
  446. object->owns = false;
  447. luaL_getmetatable(state, "Vector4");
  448. lua_setmetatable(state, -2);
  449. }
  450. else
  451. {
  452. lua_pushnil(state);
  453. }
  454. return 1;
  455. }
  456. lua_pushstring(state, "lua_ParticleEmitter_getColorStart - Failed to match the given parameters to a valid function signature.");
  457. lua_error(state);
  458. break;
  459. }
  460. default:
  461. {
  462. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  463. lua_error(state);
  464. break;
  465. }
  466. }
  467. return 0;
  468. }
  469. int lua_ParticleEmitter_getColorStartVariance(lua_State* state)
  470. {
  471. // Get the number of parameters.
  472. int paramCount = lua_gettop(state);
  473. // Attempt to match the parameters to a valid binding.
  474. switch (paramCount)
  475. {
  476. case 1:
  477. {
  478. if ((lua_type(state, 1) == LUA_TUSERDATA))
  479. {
  480. ParticleEmitter* instance = getInstance(state);
  481. void* returnPtr = (void*)&(instance->getColorStartVariance());
  482. if (returnPtr)
  483. {
  484. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  485. object->instance = returnPtr;
  486. object->owns = false;
  487. luaL_getmetatable(state, "Vector4");
  488. lua_setmetatable(state, -2);
  489. }
  490. else
  491. {
  492. lua_pushnil(state);
  493. }
  494. return 1;
  495. }
  496. lua_pushstring(state, "lua_ParticleEmitter_getColorStartVariance - Failed to match the given parameters to a valid function signature.");
  497. lua_error(state);
  498. break;
  499. }
  500. default:
  501. {
  502. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  503. lua_error(state);
  504. break;
  505. }
  506. }
  507. return 0;
  508. }
  509. int lua_ParticleEmitter_getEmissionRate(lua_State* state)
  510. {
  511. // Get the number of parameters.
  512. int paramCount = lua_gettop(state);
  513. // Attempt to match the parameters to a valid binding.
  514. switch (paramCount)
  515. {
  516. case 1:
  517. {
  518. if ((lua_type(state, 1) == LUA_TUSERDATA))
  519. {
  520. ParticleEmitter* instance = getInstance(state);
  521. unsigned int result = instance->getEmissionRate();
  522. // Push the return value onto the stack.
  523. lua_pushunsigned(state, result);
  524. return 1;
  525. }
  526. lua_pushstring(state, "lua_ParticleEmitter_getEmissionRate - Failed to match the given parameters to a valid function signature.");
  527. lua_error(state);
  528. break;
  529. }
  530. default:
  531. {
  532. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  533. lua_error(state);
  534. break;
  535. }
  536. }
  537. return 0;
  538. }
  539. int lua_ParticleEmitter_getEnergyMax(lua_State* state)
  540. {
  541. // Get the number of parameters.
  542. int paramCount = lua_gettop(state);
  543. // Attempt to match the parameters to a valid binding.
  544. switch (paramCount)
  545. {
  546. case 1:
  547. {
  548. if ((lua_type(state, 1) == LUA_TUSERDATA))
  549. {
  550. ParticleEmitter* instance = getInstance(state);
  551. long result = instance->getEnergyMax();
  552. // Push the return value onto the stack.
  553. lua_pushinteger(state, result);
  554. return 1;
  555. }
  556. lua_pushstring(state, "lua_ParticleEmitter_getEnergyMax - Failed to match the given parameters to a valid function signature.");
  557. lua_error(state);
  558. break;
  559. }
  560. default:
  561. {
  562. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  563. lua_error(state);
  564. break;
  565. }
  566. }
  567. return 0;
  568. }
  569. int lua_ParticleEmitter_getEnergyMin(lua_State* state)
  570. {
  571. // Get the number of parameters.
  572. int paramCount = lua_gettop(state);
  573. // Attempt to match the parameters to a valid binding.
  574. switch (paramCount)
  575. {
  576. case 1:
  577. {
  578. if ((lua_type(state, 1) == LUA_TUSERDATA))
  579. {
  580. ParticleEmitter* instance = getInstance(state);
  581. long result = instance->getEnergyMin();
  582. // Push the return value onto the stack.
  583. lua_pushinteger(state, result);
  584. return 1;
  585. }
  586. lua_pushstring(state, "lua_ParticleEmitter_getEnergyMin - Failed to match the given parameters to a valid function signature.");
  587. lua_error(state);
  588. break;
  589. }
  590. default:
  591. {
  592. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  593. lua_error(state);
  594. break;
  595. }
  596. }
  597. return 0;
  598. }
  599. int lua_ParticleEmitter_getNode(lua_State* state)
  600. {
  601. // Get the number of parameters.
  602. int paramCount = lua_gettop(state);
  603. // Attempt to match the parameters to a valid binding.
  604. switch (paramCount)
  605. {
  606. case 1:
  607. {
  608. if ((lua_type(state, 1) == LUA_TUSERDATA))
  609. {
  610. ParticleEmitter* instance = getInstance(state);
  611. void* returnPtr = (void*)instance->getNode();
  612. if (returnPtr)
  613. {
  614. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  615. object->instance = returnPtr;
  616. object->owns = false;
  617. luaL_getmetatable(state, "Node");
  618. lua_setmetatable(state, -2);
  619. }
  620. else
  621. {
  622. lua_pushnil(state);
  623. }
  624. return 1;
  625. }
  626. lua_pushstring(state, "lua_ParticleEmitter_getNode - Failed to match the given parameters to a valid function signature.");
  627. lua_error(state);
  628. break;
  629. }
  630. default:
  631. {
  632. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  633. lua_error(state);
  634. break;
  635. }
  636. }
  637. return 0;
  638. }
  639. int lua_ParticleEmitter_getOrbitAcceleration(lua_State* state)
  640. {
  641. // Get the number of parameters.
  642. int paramCount = lua_gettop(state);
  643. // Attempt to match the parameters to a valid binding.
  644. switch (paramCount)
  645. {
  646. case 1:
  647. {
  648. if ((lua_type(state, 1) == LUA_TUSERDATA))
  649. {
  650. ParticleEmitter* instance = getInstance(state);
  651. bool result = instance->getOrbitAcceleration();
  652. // Push the return value onto the stack.
  653. lua_pushboolean(state, result);
  654. return 1;
  655. }
  656. lua_pushstring(state, "lua_ParticleEmitter_getOrbitAcceleration - Failed to match the given parameters to a valid function signature.");
  657. lua_error(state);
  658. break;
  659. }
  660. default:
  661. {
  662. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  663. lua_error(state);
  664. break;
  665. }
  666. }
  667. return 0;
  668. }
  669. int lua_ParticleEmitter_getOrbitPosition(lua_State* state)
  670. {
  671. // Get the number of parameters.
  672. int paramCount = lua_gettop(state);
  673. // Attempt to match the parameters to a valid binding.
  674. switch (paramCount)
  675. {
  676. case 1:
  677. {
  678. if ((lua_type(state, 1) == LUA_TUSERDATA))
  679. {
  680. ParticleEmitter* instance = getInstance(state);
  681. bool result = instance->getOrbitPosition();
  682. // Push the return value onto the stack.
  683. lua_pushboolean(state, result);
  684. return 1;
  685. }
  686. lua_pushstring(state, "lua_ParticleEmitter_getOrbitPosition - Failed to match the given parameters to a valid function signature.");
  687. lua_error(state);
  688. break;
  689. }
  690. default:
  691. {
  692. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  693. lua_error(state);
  694. break;
  695. }
  696. }
  697. return 0;
  698. }
  699. int lua_ParticleEmitter_getOrbitVelocity(lua_State* state)
  700. {
  701. // Get the number of parameters.
  702. int paramCount = lua_gettop(state);
  703. // Attempt to match the parameters to a valid binding.
  704. switch (paramCount)
  705. {
  706. case 1:
  707. {
  708. if ((lua_type(state, 1) == LUA_TUSERDATA))
  709. {
  710. ParticleEmitter* instance = getInstance(state);
  711. bool result = instance->getOrbitVelocity();
  712. // Push the return value onto the stack.
  713. lua_pushboolean(state, result);
  714. return 1;
  715. }
  716. lua_pushstring(state, "lua_ParticleEmitter_getOrbitVelocity - Failed to match the given parameters to a valid function signature.");
  717. lua_error(state);
  718. break;
  719. }
  720. default:
  721. {
  722. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  723. lua_error(state);
  724. break;
  725. }
  726. }
  727. return 0;
  728. }
  729. int lua_ParticleEmitter_getParticleCountMax(lua_State* state)
  730. {
  731. // Get the number of parameters.
  732. int paramCount = lua_gettop(state);
  733. // Attempt to match the parameters to a valid binding.
  734. switch (paramCount)
  735. {
  736. case 1:
  737. {
  738. if ((lua_type(state, 1) == LUA_TUSERDATA))
  739. {
  740. ParticleEmitter* instance = getInstance(state);
  741. unsigned int result = instance->getParticleCountMax();
  742. // Push the return value onto the stack.
  743. lua_pushunsigned(state, result);
  744. return 1;
  745. }
  746. lua_pushstring(state, "lua_ParticleEmitter_getParticleCountMax - Failed to match the given parameters to a valid function signature.");
  747. lua_error(state);
  748. break;
  749. }
  750. default:
  751. {
  752. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  753. lua_error(state);
  754. break;
  755. }
  756. }
  757. return 0;
  758. }
  759. int lua_ParticleEmitter_getParticlesCount(lua_State* state)
  760. {
  761. // Get the number of parameters.
  762. int paramCount = lua_gettop(state);
  763. // Attempt to match the parameters to a valid binding.
  764. switch (paramCount)
  765. {
  766. case 1:
  767. {
  768. if ((lua_type(state, 1) == LUA_TUSERDATA))
  769. {
  770. ParticleEmitter* instance = getInstance(state);
  771. unsigned int result = instance->getParticlesCount();
  772. // Push the return value onto the stack.
  773. lua_pushunsigned(state, result);
  774. return 1;
  775. }
  776. lua_pushstring(state, "lua_ParticleEmitter_getParticlesCount - Failed to match the given parameters to a valid function signature.");
  777. lua_error(state);
  778. break;
  779. }
  780. default:
  781. {
  782. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  783. lua_error(state);
  784. break;
  785. }
  786. }
  787. return 0;
  788. }
  789. int lua_ParticleEmitter_getPosition(lua_State* state)
  790. {
  791. // Get the number of parameters.
  792. int paramCount = lua_gettop(state);
  793. // Attempt to match the parameters to a valid binding.
  794. switch (paramCount)
  795. {
  796. case 1:
  797. {
  798. if ((lua_type(state, 1) == LUA_TUSERDATA))
  799. {
  800. ParticleEmitter* instance = getInstance(state);
  801. void* returnPtr = (void*)&(instance->getPosition());
  802. if (returnPtr)
  803. {
  804. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  805. object->instance = returnPtr;
  806. object->owns = false;
  807. luaL_getmetatable(state, "Vector3");
  808. lua_setmetatable(state, -2);
  809. }
  810. else
  811. {
  812. lua_pushnil(state);
  813. }
  814. return 1;
  815. }
  816. lua_pushstring(state, "lua_ParticleEmitter_getPosition - Failed to match the given parameters to a valid function signature.");
  817. lua_error(state);
  818. break;
  819. }
  820. default:
  821. {
  822. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  823. lua_error(state);
  824. break;
  825. }
  826. }
  827. return 0;
  828. }
  829. int lua_ParticleEmitter_getPositionVariance(lua_State* state)
  830. {
  831. // Get the number of parameters.
  832. int paramCount = lua_gettop(state);
  833. // Attempt to match the parameters to a valid binding.
  834. switch (paramCount)
  835. {
  836. case 1:
  837. {
  838. if ((lua_type(state, 1) == LUA_TUSERDATA))
  839. {
  840. ParticleEmitter* instance = getInstance(state);
  841. void* returnPtr = (void*)&(instance->getPositionVariance());
  842. if (returnPtr)
  843. {
  844. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  845. object->instance = returnPtr;
  846. object->owns = false;
  847. luaL_getmetatable(state, "Vector3");
  848. lua_setmetatable(state, -2);
  849. }
  850. else
  851. {
  852. lua_pushnil(state);
  853. }
  854. return 1;
  855. }
  856. lua_pushstring(state, "lua_ParticleEmitter_getPositionVariance - Failed to match the given parameters to a valid function signature.");
  857. lua_error(state);
  858. break;
  859. }
  860. default:
  861. {
  862. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  863. lua_error(state);
  864. break;
  865. }
  866. }
  867. return 0;
  868. }
  869. int lua_ParticleEmitter_getRefCount(lua_State* state)
  870. {
  871. // Get the number of parameters.
  872. int paramCount = lua_gettop(state);
  873. // Attempt to match the parameters to a valid binding.
  874. switch (paramCount)
  875. {
  876. case 1:
  877. {
  878. if ((lua_type(state, 1) == LUA_TUSERDATA))
  879. {
  880. ParticleEmitter* instance = getInstance(state);
  881. unsigned int result = instance->getRefCount();
  882. // Push the return value onto the stack.
  883. lua_pushunsigned(state, result);
  884. return 1;
  885. }
  886. lua_pushstring(state, "lua_ParticleEmitter_getRefCount - Failed to match the given parameters to a valid function signature.");
  887. lua_error(state);
  888. break;
  889. }
  890. default:
  891. {
  892. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  893. lua_error(state);
  894. break;
  895. }
  896. }
  897. return 0;
  898. }
  899. int lua_ParticleEmitter_getRotationAxis(lua_State* state)
  900. {
  901. // Get the number of parameters.
  902. int paramCount = lua_gettop(state);
  903. // Attempt to match the parameters to a valid binding.
  904. switch (paramCount)
  905. {
  906. case 1:
  907. {
  908. if ((lua_type(state, 1) == LUA_TUSERDATA))
  909. {
  910. ParticleEmitter* instance = getInstance(state);
  911. void* returnPtr = (void*)&(instance->getRotationAxis());
  912. if (returnPtr)
  913. {
  914. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  915. object->instance = returnPtr;
  916. object->owns = false;
  917. luaL_getmetatable(state, "Vector3");
  918. lua_setmetatable(state, -2);
  919. }
  920. else
  921. {
  922. lua_pushnil(state);
  923. }
  924. return 1;
  925. }
  926. lua_pushstring(state, "lua_ParticleEmitter_getRotationAxis - Failed to match the given parameters to a valid function signature.");
  927. lua_error(state);
  928. break;
  929. }
  930. default:
  931. {
  932. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  933. lua_error(state);
  934. break;
  935. }
  936. }
  937. return 0;
  938. }
  939. int lua_ParticleEmitter_getRotationAxisVariance(lua_State* state)
  940. {
  941. // Get the number of parameters.
  942. int paramCount = lua_gettop(state);
  943. // Attempt to match the parameters to a valid binding.
  944. switch (paramCount)
  945. {
  946. case 1:
  947. {
  948. if ((lua_type(state, 1) == LUA_TUSERDATA))
  949. {
  950. ParticleEmitter* instance = getInstance(state);
  951. void* returnPtr = (void*)&(instance->getRotationAxisVariance());
  952. if (returnPtr)
  953. {
  954. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  955. object->instance = returnPtr;
  956. object->owns = false;
  957. luaL_getmetatable(state, "Vector3");
  958. lua_setmetatable(state, -2);
  959. }
  960. else
  961. {
  962. lua_pushnil(state);
  963. }
  964. return 1;
  965. }
  966. lua_pushstring(state, "lua_ParticleEmitter_getRotationAxisVariance - Failed to match the given parameters to a valid function signature.");
  967. lua_error(state);
  968. break;
  969. }
  970. default:
  971. {
  972. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  973. lua_error(state);
  974. break;
  975. }
  976. }
  977. return 0;
  978. }
  979. int lua_ParticleEmitter_getRotationPerParticleSpeedMax(lua_State* state)
  980. {
  981. // Get the number of parameters.
  982. int paramCount = lua_gettop(state);
  983. // Attempt to match the parameters to a valid binding.
  984. switch (paramCount)
  985. {
  986. case 1:
  987. {
  988. if ((lua_type(state, 1) == LUA_TUSERDATA))
  989. {
  990. ParticleEmitter* instance = getInstance(state);
  991. float result = instance->getRotationPerParticleSpeedMax();
  992. // Push the return value onto the stack.
  993. lua_pushnumber(state, result);
  994. return 1;
  995. }
  996. lua_pushstring(state, "lua_ParticleEmitter_getRotationPerParticleSpeedMax - Failed to match the given parameters to a valid function signature.");
  997. lua_error(state);
  998. break;
  999. }
  1000. default:
  1001. {
  1002. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1003. lua_error(state);
  1004. break;
  1005. }
  1006. }
  1007. return 0;
  1008. }
  1009. int lua_ParticleEmitter_getRotationPerParticleSpeedMin(lua_State* state)
  1010. {
  1011. // Get the number of parameters.
  1012. int paramCount = lua_gettop(state);
  1013. // Attempt to match the parameters to a valid binding.
  1014. switch (paramCount)
  1015. {
  1016. case 1:
  1017. {
  1018. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1019. {
  1020. ParticleEmitter* instance = getInstance(state);
  1021. float result = instance->getRotationPerParticleSpeedMin();
  1022. // Push the return value onto the stack.
  1023. lua_pushnumber(state, result);
  1024. return 1;
  1025. }
  1026. lua_pushstring(state, "lua_ParticleEmitter_getRotationPerParticleSpeedMin - Failed to match the given parameters to a valid function signature.");
  1027. lua_error(state);
  1028. break;
  1029. }
  1030. default:
  1031. {
  1032. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1033. lua_error(state);
  1034. break;
  1035. }
  1036. }
  1037. return 0;
  1038. }
  1039. int lua_ParticleEmitter_getRotationSpeedMax(lua_State* state)
  1040. {
  1041. // Get the number of parameters.
  1042. int paramCount = lua_gettop(state);
  1043. // Attempt to match the parameters to a valid binding.
  1044. switch (paramCount)
  1045. {
  1046. case 1:
  1047. {
  1048. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1049. {
  1050. ParticleEmitter* instance = getInstance(state);
  1051. float result = instance->getRotationSpeedMax();
  1052. // Push the return value onto the stack.
  1053. lua_pushnumber(state, result);
  1054. return 1;
  1055. }
  1056. lua_pushstring(state, "lua_ParticleEmitter_getRotationSpeedMax - Failed to match the given parameters to a valid function signature.");
  1057. lua_error(state);
  1058. break;
  1059. }
  1060. default:
  1061. {
  1062. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1063. lua_error(state);
  1064. break;
  1065. }
  1066. }
  1067. return 0;
  1068. }
  1069. int lua_ParticleEmitter_getRotationSpeedMin(lua_State* state)
  1070. {
  1071. // Get the number of parameters.
  1072. int paramCount = lua_gettop(state);
  1073. // Attempt to match the parameters to a valid binding.
  1074. switch (paramCount)
  1075. {
  1076. case 1:
  1077. {
  1078. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1079. {
  1080. ParticleEmitter* instance = getInstance(state);
  1081. float result = instance->getRotationSpeedMin();
  1082. // Push the return value onto the stack.
  1083. lua_pushnumber(state, result);
  1084. return 1;
  1085. }
  1086. lua_pushstring(state, "lua_ParticleEmitter_getRotationSpeedMin - Failed to match the given parameters to a valid function signature.");
  1087. lua_error(state);
  1088. break;
  1089. }
  1090. default:
  1091. {
  1092. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1093. lua_error(state);
  1094. break;
  1095. }
  1096. }
  1097. return 0;
  1098. }
  1099. int lua_ParticleEmitter_getSizeEndMax(lua_State* state)
  1100. {
  1101. // Get the number of parameters.
  1102. int paramCount = lua_gettop(state);
  1103. // Attempt to match the parameters to a valid binding.
  1104. switch (paramCount)
  1105. {
  1106. case 1:
  1107. {
  1108. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1109. {
  1110. ParticleEmitter* instance = getInstance(state);
  1111. float result = instance->getSizeEndMax();
  1112. // Push the return value onto the stack.
  1113. lua_pushnumber(state, result);
  1114. return 1;
  1115. }
  1116. lua_pushstring(state, "lua_ParticleEmitter_getSizeEndMax - Failed to match the given parameters to a valid function signature.");
  1117. lua_error(state);
  1118. break;
  1119. }
  1120. default:
  1121. {
  1122. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1123. lua_error(state);
  1124. break;
  1125. }
  1126. }
  1127. return 0;
  1128. }
  1129. int lua_ParticleEmitter_getSizeEndMin(lua_State* state)
  1130. {
  1131. // Get the number of parameters.
  1132. int paramCount = lua_gettop(state);
  1133. // Attempt to match the parameters to a valid binding.
  1134. switch (paramCount)
  1135. {
  1136. case 1:
  1137. {
  1138. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1139. {
  1140. ParticleEmitter* instance = getInstance(state);
  1141. float result = instance->getSizeEndMin();
  1142. // Push the return value onto the stack.
  1143. lua_pushnumber(state, result);
  1144. return 1;
  1145. }
  1146. lua_pushstring(state, "lua_ParticleEmitter_getSizeEndMin - Failed to match the given parameters to a valid function signature.");
  1147. lua_error(state);
  1148. break;
  1149. }
  1150. default:
  1151. {
  1152. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1153. lua_error(state);
  1154. break;
  1155. }
  1156. }
  1157. return 0;
  1158. }
  1159. int lua_ParticleEmitter_getSizeStartMax(lua_State* state)
  1160. {
  1161. // Get the number of parameters.
  1162. int paramCount = lua_gettop(state);
  1163. // Attempt to match the parameters to a valid binding.
  1164. switch (paramCount)
  1165. {
  1166. case 1:
  1167. {
  1168. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1169. {
  1170. ParticleEmitter* instance = getInstance(state);
  1171. float result = instance->getSizeStartMax();
  1172. // Push the return value onto the stack.
  1173. lua_pushnumber(state, result);
  1174. return 1;
  1175. }
  1176. lua_pushstring(state, "lua_ParticleEmitter_getSizeStartMax - Failed to match the given parameters to a valid function signature.");
  1177. lua_error(state);
  1178. break;
  1179. }
  1180. default:
  1181. {
  1182. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1183. lua_error(state);
  1184. break;
  1185. }
  1186. }
  1187. return 0;
  1188. }
  1189. int lua_ParticleEmitter_getSizeStartMin(lua_State* state)
  1190. {
  1191. // Get the number of parameters.
  1192. int paramCount = lua_gettop(state);
  1193. // Attempt to match the parameters to a valid binding.
  1194. switch (paramCount)
  1195. {
  1196. case 1:
  1197. {
  1198. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1199. {
  1200. ParticleEmitter* instance = getInstance(state);
  1201. float result = instance->getSizeStartMin();
  1202. // Push the return value onto the stack.
  1203. lua_pushnumber(state, result);
  1204. return 1;
  1205. }
  1206. lua_pushstring(state, "lua_ParticleEmitter_getSizeStartMin - Failed to match the given parameters to a valid function signature.");
  1207. lua_error(state);
  1208. break;
  1209. }
  1210. default:
  1211. {
  1212. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1213. lua_error(state);
  1214. break;
  1215. }
  1216. }
  1217. return 0;
  1218. }
  1219. int lua_ParticleEmitter_getSpriteFrameCount(lua_State* state)
  1220. {
  1221. // Get the number of parameters.
  1222. int paramCount = lua_gettop(state);
  1223. // Attempt to match the parameters to a valid binding.
  1224. switch (paramCount)
  1225. {
  1226. case 1:
  1227. {
  1228. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1229. {
  1230. ParticleEmitter* instance = getInstance(state);
  1231. unsigned int result = instance->getSpriteFrameCount();
  1232. // Push the return value onto the stack.
  1233. lua_pushunsigned(state, result);
  1234. return 1;
  1235. }
  1236. lua_pushstring(state, "lua_ParticleEmitter_getSpriteFrameCount - Failed to match the given parameters to a valid function signature.");
  1237. lua_error(state);
  1238. break;
  1239. }
  1240. default:
  1241. {
  1242. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1243. lua_error(state);
  1244. break;
  1245. }
  1246. }
  1247. return 0;
  1248. }
  1249. int lua_ParticleEmitter_getSpriteFrameDuration(lua_State* state)
  1250. {
  1251. // Get the number of parameters.
  1252. int paramCount = lua_gettop(state);
  1253. // Attempt to match the parameters to a valid binding.
  1254. switch (paramCount)
  1255. {
  1256. case 1:
  1257. {
  1258. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1259. {
  1260. ParticleEmitter* instance = getInstance(state);
  1261. long result = instance->getSpriteFrameDuration();
  1262. // Push the return value onto the stack.
  1263. lua_pushinteger(state, result);
  1264. return 1;
  1265. }
  1266. lua_pushstring(state, "lua_ParticleEmitter_getSpriteFrameDuration - Failed to match the given parameters to a valid function signature.");
  1267. lua_error(state);
  1268. break;
  1269. }
  1270. default:
  1271. {
  1272. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1273. lua_error(state);
  1274. break;
  1275. }
  1276. }
  1277. return 0;
  1278. }
  1279. int lua_ParticleEmitter_getSpriteFrameRandomOffset(lua_State* state)
  1280. {
  1281. // Get the number of parameters.
  1282. int paramCount = lua_gettop(state);
  1283. // Attempt to match the parameters to a valid binding.
  1284. switch (paramCount)
  1285. {
  1286. case 1:
  1287. {
  1288. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1289. {
  1290. ParticleEmitter* instance = getInstance(state);
  1291. int result = instance->getSpriteFrameRandomOffset();
  1292. // Push the return value onto the stack.
  1293. lua_pushinteger(state, result);
  1294. return 1;
  1295. }
  1296. lua_pushstring(state, "lua_ParticleEmitter_getSpriteFrameRandomOffset - Failed to match the given parameters to a valid function signature.");
  1297. lua_error(state);
  1298. break;
  1299. }
  1300. default:
  1301. {
  1302. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1303. lua_error(state);
  1304. break;
  1305. }
  1306. }
  1307. return 0;
  1308. }
  1309. int lua_ParticleEmitter_getSpriteHeight(lua_State* state)
  1310. {
  1311. // Get the number of parameters.
  1312. int paramCount = lua_gettop(state);
  1313. // Attempt to match the parameters to a valid binding.
  1314. switch (paramCount)
  1315. {
  1316. case 1:
  1317. {
  1318. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1319. {
  1320. ParticleEmitter* instance = getInstance(state);
  1321. unsigned int result = instance->getSpriteHeight();
  1322. // Push the return value onto the stack.
  1323. lua_pushunsigned(state, result);
  1324. return 1;
  1325. }
  1326. lua_pushstring(state, "lua_ParticleEmitter_getSpriteHeight - Failed to match the given parameters to a valid function signature.");
  1327. lua_error(state);
  1328. break;
  1329. }
  1330. default:
  1331. {
  1332. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1333. lua_error(state);
  1334. break;
  1335. }
  1336. }
  1337. return 0;
  1338. }
  1339. int lua_ParticleEmitter_getSpriteWidth(lua_State* state)
  1340. {
  1341. // Get the number of parameters.
  1342. int paramCount = lua_gettop(state);
  1343. // Attempt to match the parameters to a valid binding.
  1344. switch (paramCount)
  1345. {
  1346. case 1:
  1347. {
  1348. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1349. {
  1350. ParticleEmitter* instance = getInstance(state);
  1351. unsigned int result = instance->getSpriteWidth();
  1352. // Push the return value onto the stack.
  1353. lua_pushunsigned(state, result);
  1354. return 1;
  1355. }
  1356. lua_pushstring(state, "lua_ParticleEmitter_getSpriteWidth - Failed to match the given parameters to a valid function signature.");
  1357. lua_error(state);
  1358. break;
  1359. }
  1360. default:
  1361. {
  1362. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1363. lua_error(state);
  1364. break;
  1365. }
  1366. }
  1367. return 0;
  1368. }
  1369. int lua_ParticleEmitter_getTexture(lua_State* state)
  1370. {
  1371. // Get the number of parameters.
  1372. int paramCount = lua_gettop(state);
  1373. // Attempt to match the parameters to a valid binding.
  1374. switch (paramCount)
  1375. {
  1376. case 1:
  1377. {
  1378. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1379. {
  1380. ParticleEmitter* instance = getInstance(state);
  1381. void* returnPtr = (void*)instance->getTexture();
  1382. if (returnPtr)
  1383. {
  1384. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1385. object->instance = returnPtr;
  1386. object->owns = false;
  1387. luaL_getmetatable(state, "Texture");
  1388. lua_setmetatable(state, -2);
  1389. }
  1390. else
  1391. {
  1392. lua_pushnil(state);
  1393. }
  1394. return 1;
  1395. }
  1396. lua_pushstring(state, "lua_ParticleEmitter_getTexture - Failed to match the given parameters to a valid function signature.");
  1397. lua_error(state);
  1398. break;
  1399. }
  1400. default:
  1401. {
  1402. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1403. lua_error(state);
  1404. break;
  1405. }
  1406. }
  1407. return 0;
  1408. }
  1409. int lua_ParticleEmitter_getTextureBlending(lua_State* state)
  1410. {
  1411. // Get the number of parameters.
  1412. int paramCount = lua_gettop(state);
  1413. // Attempt to match the parameters to a valid binding.
  1414. switch (paramCount)
  1415. {
  1416. case 1:
  1417. {
  1418. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1419. {
  1420. ParticleEmitter* instance = getInstance(state);
  1421. ParticleEmitter::TextureBlending result = instance->getTextureBlending();
  1422. // Push the return value onto the stack.
  1423. lua_pushstring(state, lua_stringFromEnum_ParticleEmitterTextureBlending(result));
  1424. return 1;
  1425. }
  1426. lua_pushstring(state, "lua_ParticleEmitter_getTextureBlending - Failed to match the given parameters to a valid function signature.");
  1427. lua_error(state);
  1428. break;
  1429. }
  1430. default:
  1431. {
  1432. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1433. lua_error(state);
  1434. break;
  1435. }
  1436. }
  1437. return 0;
  1438. }
  1439. int lua_ParticleEmitter_getVelocity(lua_State* state)
  1440. {
  1441. // Get the number of parameters.
  1442. int paramCount = lua_gettop(state);
  1443. // Attempt to match the parameters to a valid binding.
  1444. switch (paramCount)
  1445. {
  1446. case 1:
  1447. {
  1448. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1449. {
  1450. ParticleEmitter* instance = getInstance(state);
  1451. void* returnPtr = (void*)&(instance->getVelocity());
  1452. if (returnPtr)
  1453. {
  1454. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1455. object->instance = returnPtr;
  1456. object->owns = false;
  1457. luaL_getmetatable(state, "Vector3");
  1458. lua_setmetatable(state, -2);
  1459. }
  1460. else
  1461. {
  1462. lua_pushnil(state);
  1463. }
  1464. return 1;
  1465. }
  1466. lua_pushstring(state, "lua_ParticleEmitter_getVelocity - Failed to match the given parameters to a valid function signature.");
  1467. lua_error(state);
  1468. break;
  1469. }
  1470. default:
  1471. {
  1472. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1473. lua_error(state);
  1474. break;
  1475. }
  1476. }
  1477. return 0;
  1478. }
  1479. int lua_ParticleEmitter_getVelocityVariance(lua_State* state)
  1480. {
  1481. // Get the number of parameters.
  1482. int paramCount = lua_gettop(state);
  1483. // Attempt to match the parameters to a valid binding.
  1484. switch (paramCount)
  1485. {
  1486. case 1:
  1487. {
  1488. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1489. {
  1490. ParticleEmitter* instance = getInstance(state);
  1491. void* returnPtr = (void*)&(instance->getVelocityVariance());
  1492. if (returnPtr)
  1493. {
  1494. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1495. object->instance = returnPtr;
  1496. object->owns = false;
  1497. luaL_getmetatable(state, "Vector3");
  1498. lua_setmetatable(state, -2);
  1499. }
  1500. else
  1501. {
  1502. lua_pushnil(state);
  1503. }
  1504. return 1;
  1505. }
  1506. lua_pushstring(state, "lua_ParticleEmitter_getVelocityVariance - Failed to match the given parameters to a valid function signature.");
  1507. lua_error(state);
  1508. break;
  1509. }
  1510. default:
  1511. {
  1512. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1513. lua_error(state);
  1514. break;
  1515. }
  1516. }
  1517. return 0;
  1518. }
  1519. int lua_ParticleEmitter_isActive(lua_State* state)
  1520. {
  1521. // Get the number of parameters.
  1522. int paramCount = lua_gettop(state);
  1523. // Attempt to match the parameters to a valid binding.
  1524. switch (paramCount)
  1525. {
  1526. case 1:
  1527. {
  1528. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1529. {
  1530. ParticleEmitter* instance = getInstance(state);
  1531. bool result = instance->isActive();
  1532. // Push the return value onto the stack.
  1533. lua_pushboolean(state, result);
  1534. return 1;
  1535. }
  1536. lua_pushstring(state, "lua_ParticleEmitter_isActive - Failed to match the given parameters to a valid function signature.");
  1537. lua_error(state);
  1538. break;
  1539. }
  1540. default:
  1541. {
  1542. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1543. lua_error(state);
  1544. break;
  1545. }
  1546. }
  1547. return 0;
  1548. }
  1549. int lua_ParticleEmitter_isEllipsoid(lua_State* state)
  1550. {
  1551. // Get the number of parameters.
  1552. int paramCount = lua_gettop(state);
  1553. // Attempt to match the parameters to a valid binding.
  1554. switch (paramCount)
  1555. {
  1556. case 1:
  1557. {
  1558. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1559. {
  1560. ParticleEmitter* instance = getInstance(state);
  1561. bool result = instance->isEllipsoid();
  1562. // Push the return value onto the stack.
  1563. lua_pushboolean(state, result);
  1564. return 1;
  1565. }
  1566. lua_pushstring(state, "lua_ParticleEmitter_isEllipsoid - Failed to match the given parameters to a valid function signature.");
  1567. lua_error(state);
  1568. break;
  1569. }
  1570. default:
  1571. {
  1572. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1573. lua_error(state);
  1574. break;
  1575. }
  1576. }
  1577. return 0;
  1578. }
  1579. int lua_ParticleEmitter_isSpriteAnimated(lua_State* state)
  1580. {
  1581. // Get the number of parameters.
  1582. int paramCount = lua_gettop(state);
  1583. // Attempt to match the parameters to a valid binding.
  1584. switch (paramCount)
  1585. {
  1586. case 1:
  1587. {
  1588. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1589. {
  1590. ParticleEmitter* instance = getInstance(state);
  1591. bool result = instance->isSpriteAnimated();
  1592. // Push the return value onto the stack.
  1593. lua_pushboolean(state, result);
  1594. return 1;
  1595. }
  1596. lua_pushstring(state, "lua_ParticleEmitter_isSpriteAnimated - Failed to match the given parameters to a valid function signature.");
  1597. lua_error(state);
  1598. break;
  1599. }
  1600. default:
  1601. {
  1602. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1603. lua_error(state);
  1604. break;
  1605. }
  1606. }
  1607. return 0;
  1608. }
  1609. int lua_ParticleEmitter_isSpriteLooped(lua_State* state)
  1610. {
  1611. // Get the number of parameters.
  1612. int paramCount = lua_gettop(state);
  1613. // Attempt to match the parameters to a valid binding.
  1614. switch (paramCount)
  1615. {
  1616. case 1:
  1617. {
  1618. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1619. {
  1620. ParticleEmitter* instance = getInstance(state);
  1621. bool result = instance->isSpriteLooped();
  1622. // Push the return value onto the stack.
  1623. lua_pushboolean(state, result);
  1624. return 1;
  1625. }
  1626. lua_pushstring(state, "lua_ParticleEmitter_isSpriteLooped - Failed to match the given parameters to a valid function signature.");
  1627. lua_error(state);
  1628. break;
  1629. }
  1630. default:
  1631. {
  1632. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1633. lua_error(state);
  1634. break;
  1635. }
  1636. }
  1637. return 0;
  1638. }
  1639. int lua_ParticleEmitter_isStarted(lua_State* state)
  1640. {
  1641. // Get the number of parameters.
  1642. int paramCount = lua_gettop(state);
  1643. // Attempt to match the parameters to a valid binding.
  1644. switch (paramCount)
  1645. {
  1646. case 1:
  1647. {
  1648. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1649. {
  1650. ParticleEmitter* instance = getInstance(state);
  1651. bool result = instance->isStarted();
  1652. // Push the return value onto the stack.
  1653. lua_pushboolean(state, result);
  1654. return 1;
  1655. }
  1656. lua_pushstring(state, "lua_ParticleEmitter_isStarted - Failed to match the given parameters to a valid function signature.");
  1657. lua_error(state);
  1658. break;
  1659. }
  1660. default:
  1661. {
  1662. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1663. lua_error(state);
  1664. break;
  1665. }
  1666. }
  1667. return 0;
  1668. }
  1669. int lua_ParticleEmitter_release(lua_State* state)
  1670. {
  1671. // Get the number of parameters.
  1672. int paramCount = lua_gettop(state);
  1673. // Attempt to match the parameters to a valid binding.
  1674. switch (paramCount)
  1675. {
  1676. case 1:
  1677. {
  1678. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1679. {
  1680. ParticleEmitter* instance = getInstance(state);
  1681. instance->release();
  1682. return 0;
  1683. }
  1684. lua_pushstring(state, "lua_ParticleEmitter_release - Failed to match the given parameters to a valid function signature.");
  1685. lua_error(state);
  1686. break;
  1687. }
  1688. default:
  1689. {
  1690. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1691. lua_error(state);
  1692. break;
  1693. }
  1694. }
  1695. return 0;
  1696. }
  1697. int lua_ParticleEmitter_setAcceleration(lua_State* state)
  1698. {
  1699. // Get the number of parameters.
  1700. int paramCount = lua_gettop(state);
  1701. // Attempt to match the parameters to a valid binding.
  1702. switch (paramCount)
  1703. {
  1704. case 3:
  1705. {
  1706. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1707. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  1708. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  1709. {
  1710. // Get parameter 1 off the stack.
  1711. bool param1Valid;
  1712. gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
  1713. if (!param1Valid)
  1714. {
  1715. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
  1716. lua_error(state);
  1717. }
  1718. // Get parameter 2 off the stack.
  1719. bool param2Valid;
  1720. gameplay::ScriptUtil::LuaArray<Vector3> param2 = gameplay::ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", true, &param2Valid);
  1721. if (!param2Valid)
  1722. {
  1723. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector3'.");
  1724. lua_error(state);
  1725. }
  1726. ParticleEmitter* instance = getInstance(state);
  1727. instance->setAcceleration(*param1, *param2);
  1728. return 0;
  1729. }
  1730. lua_pushstring(state, "lua_ParticleEmitter_setAcceleration - Failed to match the given parameters to a valid function signature.");
  1731. lua_error(state);
  1732. break;
  1733. }
  1734. default:
  1735. {
  1736. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1737. lua_error(state);
  1738. break;
  1739. }
  1740. }
  1741. return 0;
  1742. }
  1743. int lua_ParticleEmitter_setColor(lua_State* state)
  1744. {
  1745. // Get the number of parameters.
  1746. int paramCount = lua_gettop(state);
  1747. // Attempt to match the parameters to a valid binding.
  1748. switch (paramCount)
  1749. {
  1750. case 5:
  1751. {
  1752. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1753. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  1754. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  1755. (lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL) &&
  1756. (lua_type(state, 5) == LUA_TUSERDATA || lua_type(state, 5) == LUA_TNIL))
  1757. {
  1758. // Get parameter 1 off the stack.
  1759. bool param1Valid;
  1760. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  1761. if (!param1Valid)
  1762. {
  1763. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  1764. lua_error(state);
  1765. }
  1766. // Get parameter 2 off the stack.
  1767. bool param2Valid;
  1768. gameplay::ScriptUtil::LuaArray<Vector4> param2 = gameplay::ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true, &param2Valid);
  1769. if (!param2Valid)
  1770. {
  1771. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'.");
  1772. lua_error(state);
  1773. }
  1774. // Get parameter 3 off the stack.
  1775. bool param3Valid;
  1776. gameplay::ScriptUtil::LuaArray<Vector4> param3 = gameplay::ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true, &param3Valid);
  1777. if (!param3Valid)
  1778. {
  1779. lua_pushstring(state, "Failed to convert parameter 3 to type 'Vector4'.");
  1780. lua_error(state);
  1781. }
  1782. // Get parameter 4 off the stack.
  1783. bool param4Valid;
  1784. gameplay::ScriptUtil::LuaArray<Vector4> param4 = gameplay::ScriptUtil::getObjectPointer<Vector4>(5, "Vector4", true, &param4Valid);
  1785. if (!param4Valid)
  1786. {
  1787. lua_pushstring(state, "Failed to convert parameter 4 to type 'Vector4'.");
  1788. lua_error(state);
  1789. }
  1790. ParticleEmitter* instance = getInstance(state);
  1791. instance->setColor(*param1, *param2, *param3, *param4);
  1792. return 0;
  1793. }
  1794. lua_pushstring(state, "lua_ParticleEmitter_setColor - Failed to match the given parameters to a valid function signature.");
  1795. lua_error(state);
  1796. break;
  1797. }
  1798. default:
  1799. {
  1800. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  1801. lua_error(state);
  1802. break;
  1803. }
  1804. }
  1805. return 0;
  1806. }
  1807. int lua_ParticleEmitter_setEllipsoid(lua_State* state)
  1808. {
  1809. // Get the number of parameters.
  1810. int paramCount = lua_gettop(state);
  1811. // Attempt to match the parameters to a valid binding.
  1812. switch (paramCount)
  1813. {
  1814. case 2:
  1815. {
  1816. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1817. lua_type(state, 2) == LUA_TBOOLEAN)
  1818. {
  1819. // Get parameter 1 off the stack.
  1820. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  1821. ParticleEmitter* instance = getInstance(state);
  1822. instance->setEllipsoid(param1);
  1823. return 0;
  1824. }
  1825. lua_pushstring(state, "lua_ParticleEmitter_setEllipsoid - Failed to match the given parameters to a valid function signature.");
  1826. lua_error(state);
  1827. break;
  1828. }
  1829. default:
  1830. {
  1831. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1832. lua_error(state);
  1833. break;
  1834. }
  1835. }
  1836. return 0;
  1837. }
  1838. int lua_ParticleEmitter_setEmissionRate(lua_State* state)
  1839. {
  1840. // Get the number of parameters.
  1841. int paramCount = lua_gettop(state);
  1842. // Attempt to match the parameters to a valid binding.
  1843. switch (paramCount)
  1844. {
  1845. case 2:
  1846. {
  1847. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1848. lua_type(state, 2) == LUA_TNUMBER)
  1849. {
  1850. // Get parameter 1 off the stack.
  1851. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  1852. ParticleEmitter* instance = getInstance(state);
  1853. instance->setEmissionRate(param1);
  1854. return 0;
  1855. }
  1856. lua_pushstring(state, "lua_ParticleEmitter_setEmissionRate - Failed to match the given parameters to a valid function signature.");
  1857. lua_error(state);
  1858. break;
  1859. }
  1860. default:
  1861. {
  1862. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1863. lua_error(state);
  1864. break;
  1865. }
  1866. }
  1867. return 0;
  1868. }
  1869. int lua_ParticleEmitter_setEnergy(lua_State* state)
  1870. {
  1871. // Get the number of parameters.
  1872. int paramCount = lua_gettop(state);
  1873. // Attempt to match the parameters to a valid binding.
  1874. switch (paramCount)
  1875. {
  1876. case 3:
  1877. {
  1878. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1879. lua_type(state, 2) == LUA_TNUMBER &&
  1880. lua_type(state, 3) == LUA_TNUMBER)
  1881. {
  1882. // Get parameter 1 off the stack.
  1883. long param1 = (long)luaL_checklong(state, 2);
  1884. // Get parameter 2 off the stack.
  1885. long param2 = (long)luaL_checklong(state, 3);
  1886. ParticleEmitter* instance = getInstance(state);
  1887. instance->setEnergy(param1, param2);
  1888. return 0;
  1889. }
  1890. lua_pushstring(state, "lua_ParticleEmitter_setEnergy - Failed to match the given parameters to a valid function signature.");
  1891. lua_error(state);
  1892. break;
  1893. }
  1894. default:
  1895. {
  1896. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1897. lua_error(state);
  1898. break;
  1899. }
  1900. }
  1901. return 0;
  1902. }
  1903. int lua_ParticleEmitter_setOrbit(lua_State* state)
  1904. {
  1905. // Get the number of parameters.
  1906. int paramCount = lua_gettop(state);
  1907. // Attempt to match the parameters to a valid binding.
  1908. switch (paramCount)
  1909. {
  1910. case 4:
  1911. {
  1912. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1913. lua_type(state, 2) == LUA_TBOOLEAN &&
  1914. lua_type(state, 3) == LUA_TBOOLEAN &&
  1915. lua_type(state, 4) == LUA_TBOOLEAN)
  1916. {
  1917. // Get parameter 1 off the stack.
  1918. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  1919. // Get parameter 2 off the stack.
  1920. bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
  1921. // Get parameter 3 off the stack.
  1922. bool param3 = gameplay::ScriptUtil::luaCheckBool(state, 4);
  1923. ParticleEmitter* instance = getInstance(state);
  1924. instance->setOrbit(param1, param2, param3);
  1925. return 0;
  1926. }
  1927. lua_pushstring(state, "lua_ParticleEmitter_setOrbit - Failed to match the given parameters to a valid function signature.");
  1928. lua_error(state);
  1929. break;
  1930. }
  1931. default:
  1932. {
  1933. lua_pushstring(state, "Invalid number of parameters (expected 4).");
  1934. lua_error(state);
  1935. break;
  1936. }
  1937. }
  1938. return 0;
  1939. }
  1940. int lua_ParticleEmitter_setParticleCountMax(lua_State* state)
  1941. {
  1942. // Get the number of parameters.
  1943. int paramCount = lua_gettop(state);
  1944. // Attempt to match the parameters to a valid binding.
  1945. switch (paramCount)
  1946. {
  1947. case 2:
  1948. {
  1949. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1950. lua_type(state, 2) == LUA_TNUMBER)
  1951. {
  1952. // Get parameter 1 off the stack.
  1953. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  1954. ParticleEmitter* instance = getInstance(state);
  1955. instance->setParticleCountMax(param1);
  1956. return 0;
  1957. }
  1958. lua_pushstring(state, "lua_ParticleEmitter_setParticleCountMax - Failed to match the given parameters to a valid function signature.");
  1959. lua_error(state);
  1960. break;
  1961. }
  1962. default:
  1963. {
  1964. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1965. lua_error(state);
  1966. break;
  1967. }
  1968. }
  1969. return 0;
  1970. }
  1971. int lua_ParticleEmitter_setPosition(lua_State* state)
  1972. {
  1973. // Get the number of parameters.
  1974. int paramCount = lua_gettop(state);
  1975. // Attempt to match the parameters to a valid binding.
  1976. switch (paramCount)
  1977. {
  1978. case 3:
  1979. {
  1980. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1981. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  1982. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  1983. {
  1984. // Get parameter 1 off the stack.
  1985. bool param1Valid;
  1986. gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
  1987. if (!param1Valid)
  1988. {
  1989. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
  1990. lua_error(state);
  1991. }
  1992. // Get parameter 2 off the stack.
  1993. bool param2Valid;
  1994. gameplay::ScriptUtil::LuaArray<Vector3> param2 = gameplay::ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", true, &param2Valid);
  1995. if (!param2Valid)
  1996. {
  1997. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector3'.");
  1998. lua_error(state);
  1999. }
  2000. ParticleEmitter* instance = getInstance(state);
  2001. instance->setPosition(*param1, *param2);
  2002. return 0;
  2003. }
  2004. lua_pushstring(state, "lua_ParticleEmitter_setPosition - Failed to match the given parameters to a valid function signature.");
  2005. lua_error(state);
  2006. break;
  2007. }
  2008. default:
  2009. {
  2010. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2011. lua_error(state);
  2012. break;
  2013. }
  2014. }
  2015. return 0;
  2016. }
  2017. int lua_ParticleEmitter_setRotation(lua_State* state)
  2018. {
  2019. // Get the number of parameters.
  2020. int paramCount = lua_gettop(state);
  2021. // Attempt to match the parameters to a valid binding.
  2022. switch (paramCount)
  2023. {
  2024. case 5:
  2025. {
  2026. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2027. lua_type(state, 2) == LUA_TNUMBER &&
  2028. lua_type(state, 3) == LUA_TNUMBER &&
  2029. (lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL) &&
  2030. (lua_type(state, 5) == LUA_TUSERDATA || lua_type(state, 5) == LUA_TNIL))
  2031. {
  2032. // Get parameter 1 off the stack.
  2033. float param1 = (float)luaL_checknumber(state, 2);
  2034. // Get parameter 2 off the stack.
  2035. float param2 = (float)luaL_checknumber(state, 3);
  2036. // Get parameter 3 off the stack.
  2037. bool param3Valid;
  2038. gameplay::ScriptUtil::LuaArray<Vector3> param3 = gameplay::ScriptUtil::getObjectPointer<Vector3>(4, "Vector3", true, &param3Valid);
  2039. if (!param3Valid)
  2040. {
  2041. lua_pushstring(state, "Failed to convert parameter 3 to type 'Vector3'.");
  2042. lua_error(state);
  2043. }
  2044. // Get parameter 4 off the stack.
  2045. bool param4Valid;
  2046. gameplay::ScriptUtil::LuaArray<Vector3> param4 = gameplay::ScriptUtil::getObjectPointer<Vector3>(5, "Vector3", true, &param4Valid);
  2047. if (!param4Valid)
  2048. {
  2049. lua_pushstring(state, "Failed to convert parameter 4 to type 'Vector3'.");
  2050. lua_error(state);
  2051. }
  2052. ParticleEmitter* instance = getInstance(state);
  2053. instance->setRotation(param1, param2, *param3, *param4);
  2054. return 0;
  2055. }
  2056. lua_pushstring(state, "lua_ParticleEmitter_setRotation - Failed to match the given parameters to a valid function signature.");
  2057. lua_error(state);
  2058. break;
  2059. }
  2060. default:
  2061. {
  2062. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  2063. lua_error(state);
  2064. break;
  2065. }
  2066. }
  2067. return 0;
  2068. }
  2069. int lua_ParticleEmitter_setRotationPerParticle(lua_State* state)
  2070. {
  2071. // Get the number of parameters.
  2072. int paramCount = lua_gettop(state);
  2073. // Attempt to match the parameters to a valid binding.
  2074. switch (paramCount)
  2075. {
  2076. case 3:
  2077. {
  2078. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2079. lua_type(state, 2) == LUA_TNUMBER &&
  2080. lua_type(state, 3) == LUA_TNUMBER)
  2081. {
  2082. // Get parameter 1 off the stack.
  2083. float param1 = (float)luaL_checknumber(state, 2);
  2084. // Get parameter 2 off the stack.
  2085. float param2 = (float)luaL_checknumber(state, 3);
  2086. ParticleEmitter* instance = getInstance(state);
  2087. instance->setRotationPerParticle(param1, param2);
  2088. return 0;
  2089. }
  2090. lua_pushstring(state, "lua_ParticleEmitter_setRotationPerParticle - Failed to match the given parameters to a valid function signature.");
  2091. lua_error(state);
  2092. break;
  2093. }
  2094. default:
  2095. {
  2096. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2097. lua_error(state);
  2098. break;
  2099. }
  2100. }
  2101. return 0;
  2102. }
  2103. int lua_ParticleEmitter_setSize(lua_State* state)
  2104. {
  2105. // Get the number of parameters.
  2106. int paramCount = lua_gettop(state);
  2107. // Attempt to match the parameters to a valid binding.
  2108. switch (paramCount)
  2109. {
  2110. case 5:
  2111. {
  2112. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2113. lua_type(state, 2) == LUA_TNUMBER &&
  2114. lua_type(state, 3) == LUA_TNUMBER &&
  2115. lua_type(state, 4) == LUA_TNUMBER &&
  2116. lua_type(state, 5) == LUA_TNUMBER)
  2117. {
  2118. // Get parameter 1 off the stack.
  2119. float param1 = (float)luaL_checknumber(state, 2);
  2120. // Get parameter 2 off the stack.
  2121. float param2 = (float)luaL_checknumber(state, 3);
  2122. // Get parameter 3 off the stack.
  2123. float param3 = (float)luaL_checknumber(state, 4);
  2124. // Get parameter 4 off the stack.
  2125. float param4 = (float)luaL_checknumber(state, 5);
  2126. ParticleEmitter* instance = getInstance(state);
  2127. instance->setSize(param1, param2, param3, param4);
  2128. return 0;
  2129. }
  2130. lua_pushstring(state, "lua_ParticleEmitter_setSize - Failed to match the given parameters to a valid function signature.");
  2131. lua_error(state);
  2132. break;
  2133. }
  2134. default:
  2135. {
  2136. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  2137. lua_error(state);
  2138. break;
  2139. }
  2140. }
  2141. return 0;
  2142. }
  2143. int lua_ParticleEmitter_setSpriteAnimated(lua_State* state)
  2144. {
  2145. // Get the number of parameters.
  2146. int paramCount = lua_gettop(state);
  2147. // Attempt to match the parameters to a valid binding.
  2148. switch (paramCount)
  2149. {
  2150. case 2:
  2151. {
  2152. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2153. lua_type(state, 2) == LUA_TBOOLEAN)
  2154. {
  2155. // Get parameter 1 off the stack.
  2156. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  2157. ParticleEmitter* instance = getInstance(state);
  2158. instance->setSpriteAnimated(param1);
  2159. return 0;
  2160. }
  2161. lua_pushstring(state, "lua_ParticleEmitter_setSpriteAnimated - Failed to match the given parameters to a valid function signature.");
  2162. lua_error(state);
  2163. break;
  2164. }
  2165. default:
  2166. {
  2167. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2168. lua_error(state);
  2169. break;
  2170. }
  2171. }
  2172. return 0;
  2173. }
  2174. int lua_ParticleEmitter_setSpriteFrameCoords(lua_State* state)
  2175. {
  2176. // Get the number of parameters.
  2177. int paramCount = lua_gettop(state);
  2178. // Attempt to match the parameters to a valid binding.
  2179. switch (paramCount)
  2180. {
  2181. case 3:
  2182. {
  2183. do
  2184. {
  2185. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2186. lua_type(state, 2) == LUA_TNUMBER &&
  2187. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  2188. {
  2189. // Get parameter 1 off the stack.
  2190. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  2191. // Get parameter 2 off the stack.
  2192. bool param2Valid;
  2193. gameplay::ScriptUtil::LuaArray<Rectangle> param2 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", false, &param2Valid);
  2194. if (!param2Valid)
  2195. break;
  2196. ParticleEmitter* instance = getInstance(state);
  2197. instance->setSpriteFrameCoords(param1, param2);
  2198. return 0;
  2199. }
  2200. } while (0);
  2201. lua_pushstring(state, "lua_ParticleEmitter_setSpriteFrameCoords - Failed to match the given parameters to a valid function signature.");
  2202. lua_error(state);
  2203. break;
  2204. }
  2205. case 4:
  2206. {
  2207. do
  2208. {
  2209. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2210. lua_type(state, 2) == LUA_TNUMBER &&
  2211. lua_type(state, 3) == LUA_TNUMBER &&
  2212. lua_type(state, 4) == LUA_TNUMBER)
  2213. {
  2214. // Get parameter 1 off the stack.
  2215. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  2216. // Get parameter 2 off the stack.
  2217. int param2 = (int)luaL_checkint(state, 3);
  2218. // Get parameter 3 off the stack.
  2219. int param3 = (int)luaL_checkint(state, 4);
  2220. ParticleEmitter* instance = getInstance(state);
  2221. instance->setSpriteFrameCoords(param1, param2, param3);
  2222. return 0;
  2223. }
  2224. } while (0);
  2225. lua_pushstring(state, "lua_ParticleEmitter_setSpriteFrameCoords - Failed to match the given parameters to a valid function signature.");
  2226. lua_error(state);
  2227. break;
  2228. }
  2229. default:
  2230. {
  2231. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  2232. lua_error(state);
  2233. break;
  2234. }
  2235. }
  2236. return 0;
  2237. }
  2238. int lua_ParticleEmitter_setSpriteFrameDuration(lua_State* state)
  2239. {
  2240. // Get the number of parameters.
  2241. int paramCount = lua_gettop(state);
  2242. // Attempt to match the parameters to a valid binding.
  2243. switch (paramCount)
  2244. {
  2245. case 2:
  2246. {
  2247. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2248. lua_type(state, 2) == LUA_TNUMBER)
  2249. {
  2250. // Get parameter 1 off the stack.
  2251. long param1 = (long)luaL_checklong(state, 2);
  2252. ParticleEmitter* instance = getInstance(state);
  2253. instance->setSpriteFrameDuration(param1);
  2254. return 0;
  2255. }
  2256. lua_pushstring(state, "lua_ParticleEmitter_setSpriteFrameDuration - Failed to match the given parameters to a valid function signature.");
  2257. lua_error(state);
  2258. break;
  2259. }
  2260. default:
  2261. {
  2262. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2263. lua_error(state);
  2264. break;
  2265. }
  2266. }
  2267. return 0;
  2268. }
  2269. int lua_ParticleEmitter_setSpriteFrameRandomOffset(lua_State* state)
  2270. {
  2271. // Get the number of parameters.
  2272. int paramCount = lua_gettop(state);
  2273. // Attempt to match the parameters to a valid binding.
  2274. switch (paramCount)
  2275. {
  2276. case 2:
  2277. {
  2278. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2279. lua_type(state, 2) == LUA_TNUMBER)
  2280. {
  2281. // Get parameter 1 off the stack.
  2282. int param1 = (int)luaL_checkint(state, 2);
  2283. ParticleEmitter* instance = getInstance(state);
  2284. instance->setSpriteFrameRandomOffset(param1);
  2285. return 0;
  2286. }
  2287. lua_pushstring(state, "lua_ParticleEmitter_setSpriteFrameRandomOffset - Failed to match the given parameters to a valid function signature.");
  2288. lua_error(state);
  2289. break;
  2290. }
  2291. default:
  2292. {
  2293. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2294. lua_error(state);
  2295. break;
  2296. }
  2297. }
  2298. return 0;
  2299. }
  2300. int lua_ParticleEmitter_setSpriteLooped(lua_State* state)
  2301. {
  2302. // Get the number of parameters.
  2303. int paramCount = lua_gettop(state);
  2304. // Attempt to match the parameters to a valid binding.
  2305. switch (paramCount)
  2306. {
  2307. case 2:
  2308. {
  2309. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2310. lua_type(state, 2) == LUA_TBOOLEAN)
  2311. {
  2312. // Get parameter 1 off the stack.
  2313. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  2314. ParticleEmitter* instance = getInstance(state);
  2315. instance->setSpriteLooped(param1);
  2316. return 0;
  2317. }
  2318. lua_pushstring(state, "lua_ParticleEmitter_setSpriteLooped - Failed to match the given parameters to a valid function signature.");
  2319. lua_error(state);
  2320. break;
  2321. }
  2322. default:
  2323. {
  2324. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2325. lua_error(state);
  2326. break;
  2327. }
  2328. }
  2329. return 0;
  2330. }
  2331. int lua_ParticleEmitter_setSpriteTexCoords(lua_State* state)
  2332. {
  2333. // Get the number of parameters.
  2334. int paramCount = lua_gettop(state);
  2335. // Attempt to match the parameters to a valid binding.
  2336. switch (paramCount)
  2337. {
  2338. case 3:
  2339. {
  2340. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2341. lua_type(state, 2) == LUA_TNUMBER &&
  2342. (lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TLIGHTUSERDATA))
  2343. {
  2344. // Get parameter 1 off the stack.
  2345. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  2346. // Get parameter 2 off the stack.
  2347. gameplay::ScriptUtil::LuaArray<float> param2 = gameplay::ScriptUtil::getFloatPointer(3);
  2348. ParticleEmitter* instance = getInstance(state);
  2349. instance->setSpriteTexCoords(param1, param2);
  2350. return 0;
  2351. }
  2352. lua_pushstring(state, "lua_ParticleEmitter_setSpriteTexCoords - Failed to match the given parameters to a valid function signature.");
  2353. lua_error(state);
  2354. break;
  2355. }
  2356. default:
  2357. {
  2358. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2359. lua_error(state);
  2360. break;
  2361. }
  2362. }
  2363. return 0;
  2364. }
  2365. int lua_ParticleEmitter_setTexture(lua_State* state)
  2366. {
  2367. // Get the number of parameters.
  2368. int paramCount = lua_gettop(state);
  2369. // Attempt to match the parameters to a valid binding.
  2370. switch (paramCount)
  2371. {
  2372. case 3:
  2373. {
  2374. do
  2375. {
  2376. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2377. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  2378. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  2379. {
  2380. // Get parameter 1 off the stack.
  2381. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  2382. // Get parameter 2 off the stack.
  2383. ParticleEmitter::TextureBlending param2 = (ParticleEmitter::TextureBlending)lua_enumFromString_ParticleEmitterTextureBlending(luaL_checkstring(state, 3));
  2384. ParticleEmitter* instance = getInstance(state);
  2385. instance->setTexture(param1, param2);
  2386. return 0;
  2387. }
  2388. } while (0);
  2389. do
  2390. {
  2391. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2392. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  2393. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  2394. {
  2395. // Get parameter 1 off the stack.
  2396. bool param1Valid;
  2397. gameplay::ScriptUtil::LuaArray<Texture> param1 = gameplay::ScriptUtil::getObjectPointer<Texture>(2, "Texture", false, &param1Valid);
  2398. if (!param1Valid)
  2399. break;
  2400. // Get parameter 2 off the stack.
  2401. ParticleEmitter::TextureBlending param2 = (ParticleEmitter::TextureBlending)lua_enumFromString_ParticleEmitterTextureBlending(luaL_checkstring(state, 3));
  2402. ParticleEmitter* instance = getInstance(state);
  2403. instance->setTexture(param1, param2);
  2404. return 0;
  2405. }
  2406. } while (0);
  2407. lua_pushstring(state, "lua_ParticleEmitter_setTexture - Failed to match the given parameters to a valid function signature.");
  2408. lua_error(state);
  2409. break;
  2410. }
  2411. default:
  2412. {
  2413. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2414. lua_error(state);
  2415. break;
  2416. }
  2417. }
  2418. return 0;
  2419. }
  2420. int lua_ParticleEmitter_setTextureBlending(lua_State* state)
  2421. {
  2422. // Get the number of parameters.
  2423. int paramCount = lua_gettop(state);
  2424. // Attempt to match the parameters to a valid binding.
  2425. switch (paramCount)
  2426. {
  2427. case 2:
  2428. {
  2429. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2430. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2431. {
  2432. // Get parameter 1 off the stack.
  2433. ParticleEmitter::TextureBlending param1 = (ParticleEmitter::TextureBlending)lua_enumFromString_ParticleEmitterTextureBlending(luaL_checkstring(state, 2));
  2434. ParticleEmitter* instance = getInstance(state);
  2435. instance->setTextureBlending(param1);
  2436. return 0;
  2437. }
  2438. lua_pushstring(state, "lua_ParticleEmitter_setTextureBlending - Failed to match the given parameters to a valid function signature.");
  2439. lua_error(state);
  2440. break;
  2441. }
  2442. default:
  2443. {
  2444. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2445. lua_error(state);
  2446. break;
  2447. }
  2448. }
  2449. return 0;
  2450. }
  2451. int lua_ParticleEmitter_setVelocity(lua_State* state)
  2452. {
  2453. // Get the number of parameters.
  2454. int paramCount = lua_gettop(state);
  2455. // Attempt to match the parameters to a valid binding.
  2456. switch (paramCount)
  2457. {
  2458. case 3:
  2459. {
  2460. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2461. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2462. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  2463. {
  2464. // Get parameter 1 off the stack.
  2465. bool param1Valid;
  2466. gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
  2467. if (!param1Valid)
  2468. {
  2469. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
  2470. lua_error(state);
  2471. }
  2472. // Get parameter 2 off the stack.
  2473. bool param2Valid;
  2474. gameplay::ScriptUtil::LuaArray<Vector3> param2 = gameplay::ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", true, &param2Valid);
  2475. if (!param2Valid)
  2476. {
  2477. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector3'.");
  2478. lua_error(state);
  2479. }
  2480. ParticleEmitter* instance = getInstance(state);
  2481. instance->setVelocity(*param1, *param2);
  2482. return 0;
  2483. }
  2484. lua_pushstring(state, "lua_ParticleEmitter_setVelocity - Failed to match the given parameters to a valid function signature.");
  2485. lua_error(state);
  2486. break;
  2487. }
  2488. default:
  2489. {
  2490. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2491. lua_error(state);
  2492. break;
  2493. }
  2494. }
  2495. return 0;
  2496. }
  2497. int lua_ParticleEmitter_start(lua_State* state)
  2498. {
  2499. // Get the number of parameters.
  2500. int paramCount = lua_gettop(state);
  2501. // Attempt to match the parameters to a valid binding.
  2502. switch (paramCount)
  2503. {
  2504. case 1:
  2505. {
  2506. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2507. {
  2508. ParticleEmitter* instance = getInstance(state);
  2509. instance->start();
  2510. return 0;
  2511. }
  2512. lua_pushstring(state, "lua_ParticleEmitter_start - Failed to match the given parameters to a valid function signature.");
  2513. lua_error(state);
  2514. break;
  2515. }
  2516. default:
  2517. {
  2518. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2519. lua_error(state);
  2520. break;
  2521. }
  2522. }
  2523. return 0;
  2524. }
  2525. int lua_ParticleEmitter_static_create(lua_State* state)
  2526. {
  2527. // Get the number of parameters.
  2528. int paramCount = lua_gettop(state);
  2529. // Attempt to match the parameters to a valid binding.
  2530. switch (paramCount)
  2531. {
  2532. case 1:
  2533. {
  2534. do
  2535. {
  2536. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
  2537. {
  2538. // Get parameter 1 off the stack.
  2539. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  2540. void* returnPtr = (void*)ParticleEmitter::create(param1);
  2541. if (returnPtr)
  2542. {
  2543. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2544. object->instance = returnPtr;
  2545. object->owns = true;
  2546. luaL_getmetatable(state, "ParticleEmitter");
  2547. lua_setmetatable(state, -2);
  2548. }
  2549. else
  2550. {
  2551. lua_pushnil(state);
  2552. }
  2553. return 1;
  2554. }
  2555. } while (0);
  2556. do
  2557. {
  2558. if ((lua_type(state, 1) == LUA_TUSERDATA || lua_type(state, 1) == LUA_TTABLE || lua_type(state, 1) == LUA_TNIL))
  2559. {
  2560. // Get parameter 1 off the stack.
  2561. bool param1Valid;
  2562. gameplay::ScriptUtil::LuaArray<Properties> param1 = gameplay::ScriptUtil::getObjectPointer<Properties>(1, "Properties", false, &param1Valid);
  2563. if (!param1Valid)
  2564. break;
  2565. void* returnPtr = (void*)ParticleEmitter::create(param1);
  2566. if (returnPtr)
  2567. {
  2568. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2569. object->instance = returnPtr;
  2570. object->owns = true;
  2571. luaL_getmetatable(state, "ParticleEmitter");
  2572. lua_setmetatable(state, -2);
  2573. }
  2574. else
  2575. {
  2576. lua_pushnil(state);
  2577. }
  2578. return 1;
  2579. }
  2580. } while (0);
  2581. lua_pushstring(state, "lua_ParticleEmitter_static_create - Failed to match the given parameters to a valid function signature.");
  2582. lua_error(state);
  2583. break;
  2584. }
  2585. case 3:
  2586. {
  2587. do
  2588. {
  2589. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  2590. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  2591. lua_type(state, 3) == LUA_TNUMBER)
  2592. {
  2593. // Get parameter 1 off the stack.
  2594. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  2595. // Get parameter 2 off the stack.
  2596. ParticleEmitter::TextureBlending param2 = (ParticleEmitter::TextureBlending)lua_enumFromString_ParticleEmitterTextureBlending(luaL_checkstring(state, 2));
  2597. // Get parameter 3 off the stack.
  2598. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 3);
  2599. void* returnPtr = (void*)ParticleEmitter::create(param1, param2, param3);
  2600. if (returnPtr)
  2601. {
  2602. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2603. object->instance = returnPtr;
  2604. object->owns = true;
  2605. luaL_getmetatable(state, "ParticleEmitter");
  2606. lua_setmetatable(state, -2);
  2607. }
  2608. else
  2609. {
  2610. lua_pushnil(state);
  2611. }
  2612. return 1;
  2613. }
  2614. } while (0);
  2615. lua_pushstring(state, "lua_ParticleEmitter_static_create - Failed to match the given parameters to a valid function signature.");
  2616. lua_error(state);
  2617. break;
  2618. }
  2619. default:
  2620. {
  2621. lua_pushstring(state, "Invalid number of parameters (expected 1 or 3).");
  2622. lua_error(state);
  2623. break;
  2624. }
  2625. }
  2626. return 0;
  2627. }
  2628. int lua_ParticleEmitter_static_getTextureBlendingFromString(lua_State* state)
  2629. {
  2630. // Get the number of parameters.
  2631. int paramCount = lua_gettop(state);
  2632. // Attempt to match the parameters to a valid binding.
  2633. switch (paramCount)
  2634. {
  2635. case 1:
  2636. {
  2637. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
  2638. {
  2639. // Get parameter 1 off the stack.
  2640. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  2641. ParticleEmitter::TextureBlending result = ParticleEmitter::getTextureBlendingFromString(param1);
  2642. // Push the return value onto the stack.
  2643. lua_pushstring(state, lua_stringFromEnum_ParticleEmitterTextureBlending(result));
  2644. return 1;
  2645. }
  2646. lua_pushstring(state, "lua_ParticleEmitter_static_getTextureBlendingFromString - Failed to match the given parameters to a valid function signature.");
  2647. lua_error(state);
  2648. break;
  2649. }
  2650. default:
  2651. {
  2652. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2653. lua_error(state);
  2654. break;
  2655. }
  2656. }
  2657. return 0;
  2658. }
  2659. int lua_ParticleEmitter_stop(lua_State* state)
  2660. {
  2661. // Get the number of parameters.
  2662. int paramCount = lua_gettop(state);
  2663. // Attempt to match the parameters to a valid binding.
  2664. switch (paramCount)
  2665. {
  2666. case 1:
  2667. {
  2668. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2669. {
  2670. ParticleEmitter* instance = getInstance(state);
  2671. instance->stop();
  2672. return 0;
  2673. }
  2674. lua_pushstring(state, "lua_ParticleEmitter_stop - Failed to match the given parameters to a valid function signature.");
  2675. lua_error(state);
  2676. break;
  2677. }
  2678. default:
  2679. {
  2680. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2681. lua_error(state);
  2682. break;
  2683. }
  2684. }
  2685. return 0;
  2686. }
  2687. int lua_ParticleEmitter_update(lua_State* state)
  2688. {
  2689. // Get the number of parameters.
  2690. int paramCount = lua_gettop(state);
  2691. // Attempt to match the parameters to a valid binding.
  2692. switch (paramCount)
  2693. {
  2694. case 2:
  2695. {
  2696. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2697. lua_type(state, 2) == LUA_TNUMBER)
  2698. {
  2699. // Get parameter 1 off the stack.
  2700. float param1 = (float)luaL_checknumber(state, 2);
  2701. ParticleEmitter* instance = getInstance(state);
  2702. instance->update(param1);
  2703. return 0;
  2704. }
  2705. lua_pushstring(state, "lua_ParticleEmitter_update - Failed to match the given parameters to a valid function signature.");
  2706. lua_error(state);
  2707. break;
  2708. }
  2709. default:
  2710. {
  2711. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2712. lua_error(state);
  2713. break;
  2714. }
  2715. }
  2716. return 0;
  2717. }
  2718. }