lua_ParticleEmitter.cpp 96 KB

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